Title: [233580] trunk/LayoutTests
Revision
233580
Author
[email protected]
Date
2018-07-06 10:29:55 -0700 (Fri, 06 Jul 2018)

Log Message

AX: setValue on text controls should send out key events
https://bugs.webkit.org/show_bug.cgi?id=186690
<rdar://problem/41169985>

Reviewed by Chris Fleizach.

Editor's clearText function will also dispatch the InputEvent. In the test,
we need to make sure each test case finishes handling all the input events
before moving to the next test case.

* accessibility/mac/set-value-editable-dispatch-events-expected.txt:
* accessibility/mac/set-value-editable-dispatch-events.html:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (233579 => 233580)


--- trunk/LayoutTests/ChangeLog	2018-07-06 17:29:28 UTC (rev 233579)
+++ trunk/LayoutTests/ChangeLog	2018-07-06 17:29:55 UTC (rev 233580)
@@ -1,3 +1,18 @@
+2018-07-06  Nan Wang  <[email protected]>
+
+        AX: setValue on text controls should send out key events
+        https://bugs.webkit.org/show_bug.cgi?id=186690
+        <rdar://problem/41169985>
+
+        Reviewed by Chris Fleizach.
+
+        Editor's clearText function will also dispatch the InputEvent. In the test, 
+        we need to make sure each test case finishes handling all the input events
+        before moving to the next test case.
+
+        * accessibility/mac/set-value-editable-dispatch-events-expected.txt:
+        * accessibility/mac/set-value-editable-dispatch-events.html:
+
 2018-07-06  Truitt Savell  <[email protected]>
 
         Layout Test imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-origin.sub.html is flaky

Modified: trunk/LayoutTests/accessibility/mac/set-value-editable-dispatch-events-expected.txt (233579 => 233580)


--- trunk/LayoutTests/accessibility/mac/set-value-editable-dispatch-events-expected.txt	2018-07-06 17:29:28 UTC (rev 233579)
+++ trunk/LayoutTests/accessibility/mac/set-value-editable-dispatch-events-expected.txt	2018-07-06 17:29:55 UTC (rev 233580)
@@ -1,4 +1,4 @@
-
+Updated value for contenteditable
  
 This tests that setting value to a text control would dispatch input events.
 
@@ -11,12 +11,14 @@
 Value: AXValue: current
 Writable: true
 input event dispatched for contenteditable
+AXValue: Updated value for contenteditable
 
-Test: input
+Test: inputElement
 Role: AXRole: AXTextField
 Value: AXValue: somevalue
 Writable: true
-input event dispatched for input
+input event dispatched for inputElement
+AXValue: Updated value for inputElement
 
 Test: textarea
 Role: AXRole: AXTextArea
@@ -23,6 +25,7 @@
 Value: AXValue: sometext
 Writable: true
 input event dispatched for textarea
+AXValue: Updated value for textarea
 PASS successfullyParsed is true
 
 TEST COMPLETE

Modified: trunk/LayoutTests/accessibility/mac/set-value-editable-dispatch-events.html (233579 => 233580)


--- trunk/LayoutTests/accessibility/mac/set-value-editable-dispatch-events.html	2018-07-06 17:29:28 UTC (rev 233579)
+++ trunk/LayoutTests/accessibility/mac/set-value-editable-dispatch-events.html	2018-07-06 17:29:55 UTC (rev 233580)
@@ -5,7 +5,7 @@
 <div id="content">
 
 <div contenteditable="true" id="contenteditable" _oninput_="updateContenteditable();">current</div>
-<input type="text" id="input" value="somevalue" _oninput_="updateInput();">
+<input type="text" id="inputElement" value="somevalue" _oninput_="updateInput();">
 <textarea id="textarea" _oninput_="updateTextarea();">sometext</textarea>
 
 </div>
@@ -25,18 +25,30 @@
         var textareaValue;
 
        function updateContenteditable(){
-           debug("input event dispatched for contenteditable");
-           testElement("input");
+           contenteditableValue = accessibilityController.accessibleElementById("contenteditable").stringValue;
+           if (contenteditableValue.includes("contenteditable")) {
+               debug("input event dispatched for contenteditable");
+               debug(contenteditableValue);
+               testElement("inputElement");
+           }
        }
 
        function updateInput(){
-          debug("input event dispatched for input");
-          testElement("textarea");
+          inputValue = accessibilityController.accessibleElementById("inputElement").stringValue;
+          if (inputValue.includes("inputElement")) {
+              debug("input event dispatched for inputElement");
+              debug(inputValue);
+              testElement("textarea");
+          }
        }
 
        function updateTextarea(){
-          debug("input event dispatched for textarea");
-          finishJSTest();
+          textareaValue = accessibilityController.accessibleElementById("textarea").stringValue;
+          if (textareaValue.includes("textarea")) {
+              debug("input event dispatched for textarea");
+              debug(textareaValue);
+              finishJSTest();
+          }
        }
 
         function testElement(idValue) {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to