Title: [291400] trunk/LayoutTests
Revision
291400
Author
[email protected]
Date
2022-03-17 05:01:21 -0700 (Thu, 17 Mar 2022)

Log Message

Fix for accessibility/aria-option-role.html in isolated tree mode.
https://bugs.webkit.org/show_bug.cgi?id=237975
<rdar://problem/90386629>

Reviewed by Chris Fleizach.

This test was flaky in isolated tree mode due to setting the focus to
the body is async. Solved by retrieving the AX element of the listbox
directly.

* accessibility/aria-option-role.html:
* platform/glib/accessibility/aria-option-role-expected.txt:
* platform/mac/accessibility/aria-option-role-expected.txt:
* platform/win/accessibility/aria-option-role-expected.txt:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (291399 => 291400)


--- trunk/LayoutTests/ChangeLog	2022-03-17 10:07:16 UTC (rev 291399)
+++ trunk/LayoutTests/ChangeLog	2022-03-17 12:01:21 UTC (rev 291400)
@@ -1,3 +1,20 @@
+2022-03-17  Andres Gonzalez  <[email protected]>
+
+        Fix for accessibility/aria-option-role.html in isolated tree mode.
+        https://bugs.webkit.org/show_bug.cgi?id=237975
+        <rdar://problem/90386629>
+
+        Reviewed by Chris Fleizach.
+
+        This test was flaky in isolated tree mode due to setting the focus to
+        the body is async. Solved by retrieving the AX element of the listbox
+        directly.
+
+        * accessibility/aria-option-role.html:
+        * platform/glib/accessibility/aria-option-role-expected.txt:
+        * platform/mac/accessibility/aria-option-role-expected.txt:
+        * platform/win/accessibility/aria-option-role-expected.txt:
+
 2022-03-17  Kimmo Kinnunen  <[email protected]>
 
         WebGL context lost event is not sent again for contexts that are lost and restored

Modified: trunk/LayoutTests/accessibility/aria-option-role.html (291399 => 291400)


--- trunk/LayoutTests/accessibility/aria-option-role.html	2022-03-17 10:07:16 UTC (rev 291399)
+++ trunk/LayoutTests/accessibility/aria-option-role.html	2022-03-17 12:01:21 UTC (rev 291400)
@@ -1,45 +1,37 @@
 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
 <html>
 <head>
-<script src=""
+<script src=""
 </head>
-<body id="body">
+<body>
 
-<div role="listbox">
-<div role="option">option 1</div>
-<div role="option" aria-label="label 2">option 2</div>
+<div role="listbox" id="listbox">
+    <div role="option">option 1</div>
+    <div role="option" aria-label="label 2">option 2</div>
 </div>
 
-<p id="description"></p>
-<div id="console"></div>
-
 <script>
-
     description("This tests that the aria 'option' role works as expected. That is, it becomes a static text element with no children.");
 
     if (window.accessibilityController) {
+        let output = "";
 
-          var body = document.getElementById("body");
-          body.focus();
+        let listBox = accessibilityController.accessibleElementById("listbox");
+        var firstChild = listBox.childAtIndex(0);
+        var secondChild = listBox.childAtIndex(1);
+        output += `firstChild.role is ${firstChild.role}\n`;
+        output += `firstChild.title is ${firstChild.title}\n`;
 
-          var listBox = accessibilityController.focusedElement.childAtIndex(0);
-          var firstChild = listBox.childAtIndex(0);
-          var secondChild = listBox.childAtIndex(1);
-          debug("firstChild.role is " + firstChild.role);
-          debug("firstChild.title is " + firstChild.title);
+        output += `secondChild.role is ${secondChild.role}\n`;
+        if (accessibilityController.platformName == "atspi")
+            output += `secondChild.title is ${secondChild.title}\n`;
+        else
+            output += `secondChild.description is ${secondChild.description}\n`;
+        debug(output);
 
-          debug("secondChild.role is " + secondChild.role);
-          if (accessibilityController.platformName == "atspi")
-              debug("secondChild.title is " + secondChild.title);
-          else
-              debug("secondChild.description is " + secondChild.description);
-
-          shouldBe("firstChild.childrenCount", "0");
-          shouldBe("secondChild.childrenCount", "0");
+        shouldBe("firstChild.childrenCount", "0");
+        shouldBe("secondChild.childrenCount", "0");
     }
-
 </script>
-
-<script src=""
 </body>
 </html>

Modified: trunk/LayoutTests/platform/glib/accessibility/aria-option-role-expected.txt (291399 => 291400)


--- trunk/LayoutTests/platform/glib/accessibility/aria-option-role-expected.txt	2022-03-17 10:07:16 UTC (rev 291399)
+++ trunk/LayoutTests/platform/glib/accessibility/aria-option-role-expected.txt	2022-03-17 12:01:21 UTC (rev 291400)
@@ -1,5 +1,3 @@
-option 1
-option 2
 This tests that the aria 'option' role works as expected. That is, it becomes a static text element with no children.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
@@ -9,9 +7,11 @@
 firstChild.title is AXTitle: option 1
 secondChild.role is AXRole: AXListItem
 secondChild.title is AXTitle: label 2
+
 PASS firstChild.childrenCount is 0
 PASS secondChild.childrenCount is 0
 PASS successfullyParsed is true
 
 TEST COMPLETE
-
+option 1
+option 2

Modified: trunk/LayoutTests/platform/mac/accessibility/aria-option-role-expected.txt (291399 => 291400)


--- trunk/LayoutTests/platform/mac/accessibility/aria-option-role-expected.txt	2022-03-17 10:07:16 UTC (rev 291399)
+++ trunk/LayoutTests/platform/mac/accessibility/aria-option-role-expected.txt	2022-03-17 12:01:21 UTC (rev 291400)
@@ -1,5 +1,3 @@
-option 1
-option 2
 This tests that the aria 'option' role works as expected. That is, it becomes a static text element with no children.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
@@ -9,9 +7,11 @@
 firstChild.title is AXTitle: option 1
 secondChild.role is AXRole: AXStaticText
 secondChild.description is AXDescription: label 2
+
 PASS firstChild.childrenCount is 0
 PASS secondChild.childrenCount is 0
 PASS successfullyParsed is true
 
 TEST COMPLETE
-
+option 1
+option 2

Modified: trunk/LayoutTests/platform/win/accessibility/aria-option-role-expected.txt (291399 => 291400)


--- trunk/LayoutTests/platform/win/accessibility/aria-option-role-expected.txt	2022-03-17 10:07:16 UTC (rev 291399)
+++ trunk/LayoutTests/platform/win/accessibility/aria-option-role-expected.txt	2022-03-17 12:01:21 UTC (rev 291400)
@@ -1,5 +1,3 @@
-option 1
-option 2
 This tests that the aria 'option' role works as expected. That is, it becomes a static text element with no children.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
@@ -9,9 +7,11 @@
 firstChild.title is AXTitle: option 1
 secondChild.role is AXRole: AXStaticText
 secondChild.description is AXDescription: label 2
+
 PASS firstChild.childrenCount is 0
 PASS secondChild.childrenCount is 0
 PASS successfullyParsed is true
 
 TEST COMPLETE
-
+option 1
+option 2
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to