Title: [262987] trunk/LayoutTests
Revision
262987
Author
[email protected]
Date
2020-06-12 16:55:42 -0700 (Fri, 12 Jun 2020)

Log Message

Re-write accessibility/form-control-value-settable.html so that it can pass in both isolated tree mode on and off.
https://bugs.webkit.org/show_bug.cgi?id=213150

Reviewed by Chris Fleizach.

In isolated tree mode, it is necessary to setTimeout after setting the
focus so that the isolated tree can be updated.

* accessibility/form-control-value-settable.html:
* platform/gtk/accessibility/form-control-value-settable-expected.txt:
* platform/mac/accessibility/form-control-value-settable-expected.txt:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (262986 => 262987)


--- trunk/LayoutTests/ChangeLog	2020-06-12 23:45:30 UTC (rev 262986)
+++ trunk/LayoutTests/ChangeLog	2020-06-12 23:55:42 UTC (rev 262987)
@@ -1,3 +1,17 @@
+2020-06-12  Andres Gonzalez  <[email protected]>
+
+        Re-write accessibility/form-control-value-settable.html so that it can pass in both isolated tree mode on and off.
+        https://bugs.webkit.org/show_bug.cgi?id=213150
+
+        Reviewed by Chris Fleizach.
+
+        In isolated tree mode, it is necessary to setTimeout after setting the
+        focus so that the isolated tree can be updated.
+
+        * accessibility/form-control-value-settable.html:
+        * platform/gtk/accessibility/form-control-value-settable-expected.txt:
+        * platform/mac/accessibility/form-control-value-settable-expected.txt:
+
 2020-06-12  Chris Dumez  <[email protected]>
 
         Stop allowing pages served over HTTPS with "Cache-Control: no-store" into the back/forward cache

Modified: trunk/LayoutTests/accessibility/form-control-value-settable.html (262986 => 262987)


--- trunk/LayoutTests/accessibility/form-control-value-settable.html	2020-06-12 23:45:30 UTC (rev 262986)
+++ trunk/LayoutTests/accessibility/form-control-value-settable.html	2020-06-12 23:55:42 UTC (rev 262987)
@@ -32,44 +32,38 @@
 description("This tests whether AXValue is writable for various form controls.");
 
 if (window.testRunner && window.accessibilityController) {
+    jsTestIsAsync = true;
     window.testRunner.dumpAsText();
 
-    function check(id1, id2, expected1) {
-        debug(id1);
-        window.element1 = document.getElementById(id1);
-        element1.focus();
-        shouldBe("document.activeElement == element1", "true");
-        window.axElement1 = accessibilityController.focusedElement;
+    function check(ids, expect, index) {
+        if (index >= ids.length)
+            finishJSTest();
 
-        debug(id2);
-        window.element2 = document.getElementById(id2);
-        element2.focus();
-        shouldBe("document.activeElement == element2", "true");
-        window.axElement2 = accessibilityController.focusedElement;
+        id = ids[index];
+        window.element = document.getElementById(id);
+        element.focus();
+        setTimeout(function() {
+            debug(id);
+            shouldBe("document.activeElement == element", "true");
+            window.axElement = accessibilityController.focusedElement;
+            shouldBe("axElement.isAttributeSettable('AXValue')", String(expect[index]));
 
-        shouldBe("axElement1.isAttributeSettable('AXValue')", String(expected1));
-        // If contentEditable, AXValue is always writable.
-        shouldBe("axElement2.isAttributeSettable('AXValue')", "true");
-        debug("");
+            check(ids, expect, ++index);
+        }, 0);
     }
 
-    // All text-like form controls should have a writable AXValue.
-    check("text1", "text2", true);
-    check("number1", "number2", true);
-    check("textarea1", "textarea2", true);
-
-    // A slider can set AXValue.
-    check("slider1", "slider2", true);
-
+    var ids = ["text1", "text2", "number1", "number2", "textarea1", "textarea2", "slider1", "slider2", "checkbox1", "checkbox2", "radio1", "radio2", "submit1", "submit2", "combobox1", "combobox2", "listbox1", "listbox2"];
+    // All text-like form controls and slider should have a writable AXValue.
     // Other controls whose contents or state can be user modified should have a read-only
     // AXValue for non-ATK-based platforms, unless those controls are inside contentEditable,
     // then everything should have a writable AXValue.
-    isATK = accessibilityController.platformName == "atk";
-    check("checkbox1", "checkbox2", isATK ? true : false);
-    check("radio1", "radio2", isATK ? true : false);
-    check("submit1", "submit2", false);
-    check("combobox1", "combobox2", isATK ? true : false);
-    check("listbox1", "listbox2", isATK ? true : false);
+    var expect;
+    if (accessibilityController.platformName != "atk")
+        expect = [true, true, true, true, true, true, true, true, false, true, false, true, false, true, false, true, false, true];
+    else
+        expect = [true, true, true, true, true, true, true, true, true, true, true, true, false, true, true, true, true, true];
+
+    check(ids, expect, 0);
 }
 
 </script>

Modified: trunk/LayoutTests/platform/gtk/accessibility/form-control-value-settable-expected.txt (262986 => 262987)


--- trunk/LayoutTests/platform/gtk/accessibility/form-control-value-settable-expected.txt	2020-06-12 23:45:30 UTC (rev 262986)
+++ trunk/LayoutTests/platform/gtk/accessibility/form-control-value-settable-expected.txt	2020-06-12 23:55:42 UTC (rev 262987)
@@ -6,68 +6,59 @@
 
 
 text1
-PASS document.activeElement == element1 is true
+PASS document.activeElement == element is true
+PASS axElement1.isAttributeSettable('AXValue') is true
 text2
-PASS document.activeElement == element2 is true
-PASS axElement1.isAttributeSettable('AXValue') is true
+PASS document.activeElement == element is true
 PASS axElement2.isAttributeSettable('AXValue') is true
-
 number1
-PASS document.activeElement == element1 is true
+PASS document.activeElement == element is true
+PASS axElement1.isAttributeSettable('AXValue') is true
 number2
-PASS document.activeElement == element2 is true
-PASS axElement1.isAttributeSettable('AXValue') is true
+PASS document.activeElement == element is true
 PASS axElement2.isAttributeSettable('AXValue') is true
-
 textarea1
-PASS document.activeElement == element1 is true
+PASS document.activeElement == element is true
+PASS axElement1.isAttributeSettable('AXValue') is true
 textarea2
-PASS document.activeElement == element2 is true
-PASS axElement1.isAttributeSettable('AXValue') is true
+PASS document.activeElement == element is true
 PASS axElement2.isAttributeSettable('AXValue') is true
-
 slider1
-PASS document.activeElement == element1 is true
+PASS document.activeElement == element is true
+PASS axElement1.isAttributeSettable('AXValue') is true
 slider2
-PASS document.activeElement == element2 is true
-PASS axElement1.isAttributeSettable('AXValue') is true
+PASS document.activeElement == element is true
 PASS axElement2.isAttributeSettable('AXValue') is true
-
 checkbox1
-PASS document.activeElement == element1 is true
+PASS document.activeElement == element is true
+PASS axElement1.isAttributeSettable('AXValue') is true
 checkbox2
-PASS document.activeElement == element2 is true
-PASS axElement1.isAttributeSettable('AXValue') is true
+PASS document.activeElement == element is true
 PASS axElement2.isAttributeSettable('AXValue') is true
-
 radio1
-PASS document.activeElement == element1 is true
+PASS document.activeElement == element is true
+PASS axElement1.isAttributeSettable('AXValue') is true
 radio2
-PASS document.activeElement == element2 is true
-PASS axElement1.isAttributeSettable('AXValue') is true
+PASS document.activeElement == element is true
 PASS axElement2.isAttributeSettable('AXValue') is true
-
 submit1
-PASS document.activeElement == element1 is true
+PASS document.activeElement == element is true
+PASS axElement1.isAttributeSettable('AXValue') is false
 submit2
-PASS document.activeElement == element2 is true
-PASS axElement1.isAttributeSettable('AXValue') is false
+PASS document.activeElement == element is true
 PASS axElement2.isAttributeSettable('AXValue') is true
-
 combobox1
-PASS document.activeElement == element1 is true
+PASS document.activeElement == element is true
+PASS axElement1.isAttributeSettable('AXValue') is true
 combobox2
-PASS document.activeElement == element2 is true
-PASS axElement1.isAttributeSettable('AXValue') is true
+PASS document.activeElement == element is true
 PASS axElement2.isAttributeSettable('AXValue') is true
-
 listbox1
-PASS document.activeElement == element1 is true
+PASS document.activeElement == element is true
+PASS axElement1.isAttributeSettable('AXValue') is true
 listbox2
-PASS document.activeElement == element2 is true
-PASS axElement1.isAttributeSettable('AXValue') is true
+PASS document.activeElement == element is true
 PASS axElement2.isAttributeSettable('AXValue') is true
-
 PASS successfullyParsed is true
 
 TEST COMPLETE

Modified: trunk/LayoutTests/platform/mac/accessibility/form-control-value-settable-expected.txt (262986 => 262987)


--- trunk/LayoutTests/platform/mac/accessibility/form-control-value-settable-expected.txt	2020-06-12 23:45:30 UTC (rev 262986)
+++ trunk/LayoutTests/platform/mac/accessibility/form-control-value-settable-expected.txt	2020-06-12 23:55:42 UTC (rev 262987)
@@ -6,68 +6,59 @@
 
 
 text1
-PASS document.activeElement == element1 is true
+PASS document.activeElement == element is true
+PASS axElement.isAttributeSettable('AXValue') is true
 text2
-PASS document.activeElement == element2 is true
-PASS axElement1.isAttributeSettable('AXValue') is true
-PASS axElement2.isAttributeSettable('AXValue') is true
-
+PASS document.activeElement == element is true
+PASS axElement.isAttributeSettable('AXValue') is true
 number1
-PASS document.activeElement == element1 is true
+PASS document.activeElement == element is true
+PASS axElement.isAttributeSettable('AXValue') is true
 number2
-PASS document.activeElement == element2 is true
-PASS axElement1.isAttributeSettable('AXValue') is true
-PASS axElement2.isAttributeSettable('AXValue') is true
-
+PASS document.activeElement == element is true
+PASS axElement.isAttributeSettable('AXValue') is true
 textarea1
-PASS document.activeElement == element1 is true
+PASS document.activeElement == element is true
+PASS axElement.isAttributeSettable('AXValue') is true
 textarea2
-PASS document.activeElement == element2 is true
-PASS axElement1.isAttributeSettable('AXValue') is true
-PASS axElement2.isAttributeSettable('AXValue') is true
-
+PASS document.activeElement == element is true
+PASS axElement.isAttributeSettable('AXValue') is true
 slider1
-PASS document.activeElement == element1 is true
+PASS document.activeElement == element is true
+PASS axElement.isAttributeSettable('AXValue') is true
 slider2
-PASS document.activeElement == element2 is true
-PASS axElement1.isAttributeSettable('AXValue') is true
-PASS axElement2.isAttributeSettable('AXValue') is true
-
+PASS document.activeElement == element is true
+PASS axElement.isAttributeSettable('AXValue') is true
 checkbox1
-PASS document.activeElement == element1 is true
+PASS document.activeElement == element is true
+PASS axElement.isAttributeSettable('AXValue') is false
 checkbox2
-PASS document.activeElement == element2 is true
-PASS axElement1.isAttributeSettable('AXValue') is false
-PASS axElement2.isAttributeSettable('AXValue') is true
-
+PASS document.activeElement == element is true
+PASS axElement.isAttributeSettable('AXValue') is true
 radio1
-PASS document.activeElement == element1 is true
+PASS document.activeElement == element is true
+PASS axElement.isAttributeSettable('AXValue') is false
 radio2
-PASS document.activeElement == element2 is true
-PASS axElement1.isAttributeSettable('AXValue') is false
-PASS axElement2.isAttributeSettable('AXValue') is true
-
+PASS document.activeElement == element is true
+PASS axElement.isAttributeSettable('AXValue') is true
 submit1
-PASS document.activeElement == element1 is true
+PASS document.activeElement == element is true
+PASS axElement.isAttributeSettable('AXValue') is false
 submit2
-PASS document.activeElement == element2 is true
-PASS axElement1.isAttributeSettable('AXValue') is false
-PASS axElement2.isAttributeSettable('AXValue') is true
-
+PASS document.activeElement == element is true
+PASS axElement.isAttributeSettable('AXValue') is true
 combobox1
-PASS document.activeElement == element1 is true
+PASS document.activeElement == element is true
+PASS axElement.isAttributeSettable('AXValue') is false
 combobox2
-PASS document.activeElement == element2 is true
-PASS axElement1.isAttributeSettable('AXValue') is false
-PASS axElement2.isAttributeSettable('AXValue') is true
-
+PASS document.activeElement == element is true
+PASS axElement.isAttributeSettable('AXValue') is true
 listbox1
-PASS document.activeElement == element1 is true
+PASS document.activeElement == element is true
+PASS axElement.isAttributeSettable('AXValue') is false
 listbox2
-PASS document.activeElement == element2 is true
-PASS axElement1.isAttributeSettable('AXValue') is false
-PASS axElement2.isAttributeSettable('AXValue') is true
-
+PASS document.activeElement == element is true
+PASS axElement.isAttributeSettable('AXValue') is true
 PASS successfullyParsed is true
 
 TEST COMPLETE
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to