Title: [154332] trunk/LayoutTests
- Revision
- 154332
- Author
- [email protected]
- Date
- 2013-08-20 09:50:33 -0700 (Tue, 20 Aug 2013)
Log Message
<https://webkit.org/b/120032> Add DRT test to ensure that AccessibilityObject::stringValue()
of <input type="file"> is meaningful
Reviewed by Chris Fleizach.
Adds a DRT test to ensure that AccessibilityObject::stringValue() returns a meaningful string
for a single file- and multiple files-file upload control.
* accessibility/file-upload-button-stringvalue.html: Added.
* platform/mac-wk2/accessibility/file-upload-button-stringvalue-expected.txt: Added.
* platform/mac/accessibility/file-upload-button-stringvalue-expected.txt: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (154331 => 154332)
--- trunk/LayoutTests/ChangeLog 2013-08-20 16:42:20 UTC (rev 154331)
+++ trunk/LayoutTests/ChangeLog 2013-08-20 16:50:33 UTC (rev 154332)
@@ -1,3 +1,17 @@
+2013-08-20 Daniel Bates <[email protected]>
+
+ <https://webkit.org/b/120032> Add DRT test to ensure that AccessibilityObject::stringValue()
+ of <input type="file"> is meaningful
+
+ Reviewed by Chris Fleizach.
+
+ Adds a DRT test to ensure that AccessibilityObject::stringValue() returns a meaningful string
+ for a single file- and multiple files-file upload control.
+
+ * accessibility/file-upload-button-stringvalue.html: Added.
+ * platform/mac-wk2/accessibility/file-upload-button-stringvalue-expected.txt: Added.
+ * platform/mac/accessibility/file-upload-button-stringvalue-expected.txt: Added.
+
2013-08-20 Antti Koivisto <[email protected]>
<https://webkit.org/b/120025> REGRESSION (r154254): fast/frames/frameset-frameborder-inheritance.html failing on Apple MountainLion Debug WK1 (Tests)
Added: trunk/LayoutTests/accessibility/file-upload-button-stringvalue.html (0 => 154332)
--- trunk/LayoutTests/accessibility/file-upload-button-stringvalue.html (rev 0)
+++ trunk/LayoutTests/accessibility/file-upload-button-stringvalue.html 2013-08-20 16:50:33 UTC (rev 154332)
@@ -0,0 +1,66 @@
+<!DOCTYPE html>
+<html>
+<body>
+<form id="form">
+ <input id="singleFileUpload" type="file">
+ <input id="multipleFileUpload" type="file" multiple>
+</form>
+<p>This tests the value of stringValue for a single file- and multiple files-<input type="file"> control.</p>
+<pre id="console"></pre>
+<script>
+if (window.testRunner && window.accessibilityController) {
+ testRunner.dumpAsText();
+ runTest();
+} else
+ log("This test must be run with DumpRenderTree and an implemented AccessibilityController.");
+
+function runTest()
+{
+ var elementIds = ["singleFileUpload", "multipleFileUpload"];
+ var form = document.getElementById("form");
+
+ form.reset();
+ log(""); // Add an empty line; make the expected results pretty.
+ log("Default value (no files selected):");
+ for (var i = 0; i < elementIds.length; ++i)
+ logAccessibilityStringValueForElement(elementIds[i]);
+
+ form.reset();
+ log(""); // Add an empty line; make the expected results pretty.
+ log("Drag and drop a single file:");
+ for (var i = 0; i < elementIds.length; ++i) {
+ dragAndDropFauxFilesOnElement(["file1.txt"], elementIds[i]);
+ logAccessibilityStringValueForElement(elementIds[i]);
+ }
+
+ form.reset();
+ log(""); // Add an empty line; make the expected results pretty.
+ log("Drag and drop two files:");
+ for (var i = 0; i < elementIds.length; ++i) {
+ dragAndDropFauxFilesOnElement(["file1.txt", "file2.txt"], elementIds[i]);
+ logAccessibilityStringValueForElement(elementIds[i]);
+ }
+}
+
+function log(message)
+{
+ document.getElementById("console").appendChild(document.createTextNode(message + "\n"));
+}
+
+function logAccessibilityStringValueForElement(elementId)
+{
+ log('accessibilityController.accessibleElementById("' + elementId + '").stringValue: ' + accessibilityController.accessibleElementById(elementId).stringValue);
+}
+
+function dragAndDropFauxFilesOnElement(files, elementId)
+{
+ if (!window.eventSender || !eventSender.beginDragWithFiles)
+ return;
+ var element = document.getElementById(elementId);
+ eventSender.beginDragWithFiles(files);
+ eventSender.mouseMoveTo(element.offsetLeft, element.offsetTop);
+ eventSender.mouseUp();
+}
+</script>
+</body>
+</html>
Added: trunk/LayoutTests/platform/mac/accessibility/file-upload-button-stringvalue-expected.txt (0 => 154332)
--- trunk/LayoutTests/platform/mac/accessibility/file-upload-button-stringvalue-expected.txt (rev 0)
+++ trunk/LayoutTests/platform/mac/accessibility/file-upload-button-stringvalue-expected.txt 2013-08-20 16:50:33 UTC (rev 154332)
@@ -0,0 +1,16 @@
+
+This tests the value of stringValue for a single file- and multiple files-<input type="file"> control.
+
+
+Default value (no files selected):
+accessibilityController.accessibleElementById("singleFileUpload").stringValue: AXValue: no file selected
+accessibilityController.accessibleElementById("multipleFileUpload").stringValue: AXValue: no files selected
+
+Drag and drop a single file:
+accessibilityController.accessibleElementById("singleFileUpload").stringValue: AXValue: file1.txt
+accessibilityController.accessibleElementById("multipleFileUpload").stringValue: AXValue: file1.txt
+
+Drag and drop two files:
+accessibilityController.accessibleElementById("singleFileUpload").stringValue: AXValue: no file selected
+accessibilityController.accessibleElementById("multipleFileUpload").stringValue: AXValue: 2 files
+
Added: trunk/LayoutTests/platform/mac-wk2/accessibility/file-upload-button-stringvalue-expected.txt (0 => 154332)
--- trunk/LayoutTests/platform/mac-wk2/accessibility/file-upload-button-stringvalue-expected.txt (rev 0)
+++ trunk/LayoutTests/platform/mac-wk2/accessibility/file-upload-button-stringvalue-expected.txt 2013-08-20 16:50:33 UTC (rev 154332)
@@ -0,0 +1,16 @@
+
+This tests the value of stringValue for a single file- and multiple files-<input type="file"> control.
+
+
+Default value (no files selected):
+accessibilityController.accessibleElementById("singleFileUpload").stringValue: AXValue: no file selected
+accessibilityController.accessibleElementById("multipleFileUpload").stringValue: AXValue: no files selected
+
+Drag and drop a single file:
+accessibilityController.accessibleElementById("singleFileUpload").stringValue: AXValue: no file selected
+accessibilityController.accessibleElementById("multipleFileUpload").stringValue: AXValue: no files selected
+
+Drag and drop two files:
+accessibilityController.accessibleElementById("singleFileUpload").stringValue: AXValue: no file selected
+accessibilityController.accessibleElementById("multipleFileUpload").stringValue: AXValue: no files selected
+
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes