Title: [295344] trunk/LayoutTests
Revision
295344
Author
[email protected]
Date
2022-06-07 07:09:37 -0700 (Tue, 07 Jun 2022)

Log Message

AX ITM: Fix for accessibility/aria-toggle-button-with-title.html in isolated tree mode.
https://bugs.webkit.org/show_bug.cgi?id=241240

Reviewed by Chris Fleizach and Tyler Wilcock.

This test was flaky in isolated tree mode.

* LayoutTests/accessibility/aria-toggle-button-with-title-expected.txt:
* LayoutTests/accessibility/aria-toggle-button-with-title.html:
* LayoutTests/platform/glib/accessibility/aria-toggle-button-with-title-expected.txt:

Canonical link: https://commits.webkit.org/251360@main

Modified Paths

Diff

Modified: trunk/LayoutTests/accessibility/aria-toggle-button-with-title-expected.txt (295343 => 295344)


--- trunk/LayoutTests/accessibility/aria-toggle-button-with-title-expected.txt	2022-06-07 13:43:49 UTC (rev 295343)
+++ trunk/LayoutTests/accessibility/aria-toggle-button-with-title-expected.txt	2022-06-07 14:09:37 UTC (rev 295344)
@@ -1,15 +1,11 @@
-Toggle button
-Button title
 This tests that a toggle button properly exposes the title when there isn't a direct relation and textUnderElement is required to be used.
+PASS: tbutton1.role === 'AXRole: AXCheckBox'
+PASS: tbutton1.title === 'AXTitle: Toggle button'
+PASS: button.role === 'AXRole: AXButton'
+PASS: button.title === 'AXTitle: Button title'
 
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
 PASS successfullyParsed is true
 
 TEST COMPLETE
-Role: AXRole: AXCheckBox
-PASS tbutton1.title is 'AXTitle: Toggle button'
-Role: AXRole: AXButton
-PASS button.title is 'AXTitle: Button title'
-
+Toggle button
+Button title

Modified: trunk/LayoutTests/accessibility/aria-toggle-button-with-title.html (295343 => 295344)


--- trunk/LayoutTests/accessibility/aria-toggle-button-with-title.html	2022-06-07 13:43:49 UTC (rev 295343)
+++ trunk/LayoutTests/accessibility/aria-toggle-button-with-title.html	2022-06-07 14:09:37 UTC (rev 295344)
@@ -1,41 +1,35 @@
 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
 <html>
 <head>
-<script src=""
-<script>
-
-function runTest()
-{
-  if (window.accessibilityController) {
-
-    tbutton1 = accessibilityController.accessibleElementById("tbutton");
-    debug("Role: " + tbutton1.role);
-    shouldBe("tbutton1.title", "'AXTitle: Toggle button'");
-
-    button = accessibilityController.accessibleElementById("button");
-    debug("Role: " + button.role);
-    shouldBe("button.title", "'AXTitle: Button title'");
-  }
-}
-</script>
-
+<script src=""
+<script src=""
 </head>
-<body id="body" _onload_="runTest()">
+<body>
 
-<a id="tbutton" tabindex="0" class="button" role="button" aria-pressed="true">Toggle button</a>
+<a id="tbutton" role="button" aria-pressed="true">Toggle button</a>
 
 <div>
-<button type="button" id="button" role="button"/>
-<label>Button title</label>
+    <button type="button" id="button" role="button"/>
+    <label>Button title</label>
 </div>
 
-<p id="description"></p>
-<div id="console"></div>
-
 <script>
-description("This tests that a toggle button properly exposes the title when there isn't a direct relation and textUnderElement is required to be used.");
+    if (window.accessibilityController) {
+        var output = "This tests that a toggle button properly exposes the title when there isn't a direct relation and textUnderElement is required to be used.\n";
 
+        tbutton1 = accessibilityController.accessibleElementById("tbutton");
+        if (accessibilityController.platformName == "atspi")
+            output += expect("tbutton1.role", "'AXRole: AXToggleButton'");
+        else
+            output += expect("tbutton1.role", "'AXRole: AXCheckBox'");
+        output += expect("tbutton1.title", "'AXTitle: Toggle button'");
+
+        button = accessibilityController.accessibleElementById("button");
+        output += expect("button.role", "'AXRole: AXButton'");
+        output += expect("button.title", "'AXTitle: Button title'");
+
+        debug(output);
+    }
 </script>
-<script src=""
 </body>
 </html>

Modified: trunk/LayoutTests/platform/glib/accessibility/aria-toggle-button-with-title-expected.txt (295343 => 295344)


--- trunk/LayoutTests/platform/glib/accessibility/aria-toggle-button-with-title-expected.txt	2022-06-07 13:43:49 UTC (rev 295343)
+++ trunk/LayoutTests/platform/glib/accessibility/aria-toggle-button-with-title-expected.txt	2022-06-07 14:09:37 UTC (rev 295344)
@@ -1,15 +1,11 @@
-Toggle button
-Button title
 This tests that a toggle button properly exposes the title when there isn't a direct relation and textUnderElement is required to be used.
+PASS: tbutton1.role === 'AXRole: AXToggleButton'
+PASS: tbutton1.title === 'AXTitle: Toggle button'
+PASS: button.role === 'AXRole: AXButton'
+PASS: button.title === 'AXTitle: Button title'
 
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
 PASS successfullyParsed is true
 
 TEST COMPLETE
-Role: AXRole: AXToggleButton
-PASS tbutton1.title is 'AXTitle: Toggle button'
-Role: AXRole: AXButton
-PASS button.title is 'AXTitle: Button title'
-
+Toggle button
+Button title

Modified: trunk/LayoutTests/platform/win/TestExpectations (295343 => 295344)


--- trunk/LayoutTests/platform/win/TestExpectations	2022-06-07 13:43:49 UTC (rev 295343)
+++ trunk/LayoutTests/platform/win/TestExpectations	2022-06-07 14:09:37 UTC (rev 295344)
@@ -1776,7 +1776,6 @@
 [ Debug ] accessibility/aria-required.html [ Skip ] # Crash (Debug Assertion)
 webkit.org/b/140867 [ Debug ] accessibility/aria-tab-role-on-buttons.html [ Skip ]
 webkit.org/b/140867 [ Debug ] accessibility/aria-tab-roles.html [ Skip ]
-webkit.org/b/140867 [ Debug ] accessibility/aria-toggle-button-with-title.html [ Skip ]
 [ Debug ] accessibility/button-press-action.html [ Skip ] # Crash (Debug Assertion)
 webkit.org/b/140867 [ Debug ] accessibility/button-title-uses-inner-img-alt.html [ Skip ]
 [ Debug ] accessibility/canvas-description-and-role.html [ Skip ] # Crash (Debug Assertion)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to