Changeset 286794 in webkit
- Timestamp:
- Dec 9, 2021, 12:02:20 PM (5 years ago)
- Location:
- trunk/LayoutTests
- Files:
-
- 1 deleted
- 14 edited
-
ChangeLog (modified) (1 diff)
-
accessibility/auto-fill-crash-expected.txt (modified) (2 diffs)
-
accessibility/auto-fill-crash.html (modified) (1 diff)
-
accessibility/element-haspopup-expected.txt (modified) (1 diff)
-
accessibility/element-haspopup.html (modified) (1 diff)
-
accessibility/mac/label-element-changing-children-string-value-expected.txt (modified) (2 diffs)
-
accessibility/mac/label-element-changing-children-string-value.html (modified) (2 diffs)
-
accessibility/mac/label-element-changing-textcontent-string-value-expected.txt (modified) (2 diffs)
-
accessibility/mac/label-element-changing-textcontent-string-value.html (modified) (2 diffs)
-
accessibility/mac/update-children-when-aria-role-changes-expected.txt (modified) (2 diffs)
-
accessibility/mac/update-children-when-aria-role-changes.html (modified) (1 diff)
-
accessibility/tabindex-removed-expected.txt (modified) (2 diffs)
-
accessibility/tabindex-removed.html (modified) (2 diffs)
-
platform/glib/accessibility/auto-fill-crash-expected.txt (modified) (2 diffs)
-
platform/win/accessibility/auto-fill-crash-expected.txt (deleted)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r286787 r286794 1 2021-12-09 Tyler Wilcock <tyler_w@apple.com> 2 3 AX: Make 6 more layout tests async so they pass in isolated tree mode 4 https://bugs.webkit.org/show_bug.cgi?id=233966 5 6 Reviewed by Chris Fleizach. 7 8 * accessibility/element-haspopup-expected.txt: 9 * accessibility/element-haspopup.html: 10 Use accessibilityController.accessibleElementById to get a reference 11 to the link1 and link2 AX objects instead of document.getElementById() 12 and accessibilityController.focusedElement. The latter would work, but 13 would require the test to be made unnecessarily async. 14 15 * accessibility/mac/label-element-changing-children-string-value-expected.txt: 16 * accessibility/mac/label-element-changing-children-string-value.html: 17 * accessibility/mac/label-element-changing-textcontent-string-value-expected.txt: 18 * accessibility/mac/label-element-changing-textcontent-string-value.html: 19 * accessibility/mac/update-children-when-aria-role-changes-expected.txt: 20 * accessibility/mac/update-children-when-aria-role-changes.html: 21 * accessibility/tabindex-removed-expected.txt: 22 * accessibility/tabindex-removed.html: 23 Make these tests async. They dynamically change page content with JS, 24 so they must verify expectations asynchronously to pass in isolated 25 tree mode. 26 27 * accessibility/auto-fill-crash.html: 28 Make this test async. 29 * accessibility/auto-fill-crash-expected.txt: 30 * platform/glib/accessibility/auto-fill-crash-expected.txt: 31 Update expectations to reflect the test rewrite. 32 * platform/win/accessibility/auto-fill-crash-expected.txt: 33 Removed because the expectation is the same as the base 34 auto-fill-crash-expected.txt 35 1 36 2021-12-09 Robert Jenner <Jenner@apple.com> 2 37 -
trunk/LayoutTests/accessibility/auto-fill-crash-expected.txt
r284612 r286794 1 2 1 This tests that when an auto fill element is removed we won't crash accessing an old value. 3 2 … … 5 4 6 5 7 PASS textFieldAxObject.childrenCount is28 PASS textFieldAxObject.childAtIndex(childrenCountExpected - 1).description is'AXDescription: contact info AutoFill'9 PASS textFieldAxObject.childrenCount is16 PASS axTextField.childrenCount === 2 7 PASS axTextField.childAtIndex(expectedChildrenCount - 1).description === 'AXDescription: contact info AutoFill' 8 PASS axTextField.childrenCount === 1 10 9 PASS successfullyParsed is true 11 10 -
trunk/LayoutTests/accessibility/auto-fill-crash.html
r284612 r286794 2 2 <html> 3 3 <head> 4 < meta charset="utf-8">5 <script src="../resources/ js-test-pre.js"></script>4 <script src="../resources/js-test.js"></script> 5 <script src="../resources/accessibility-helper.js"></script> 6 6 </head> 7 <body id="body">7 <body> 8 8 9 9 <input type="text" value="hello" id="textfield"> 10 10 11 <p id="description"></p>12 <div id="console"></div>13 14 11 <script> 15 16 12 description("This tests that when an auto fill element is removed we won't crash accessing an old value."); 17 13 18 14 if (window.accessibilityController) { 15 window.jsTestIsAsync = true; 16 17 var platformName = accessibilityController.platformName; 19 18 var axTextField = accessibilityController.accessibleElementById("textfield"); 20 var childrenCountExpected = accessibilityController.platformName == "atk" ? "1" : "2"; 21 window.internals.setShowAutoFillButton(document.getElementById("textfield"), "Contacts"); 22 var textFieldAxObject = accessibilityController.accessibleElementById('textfield'); 23 shouldBe("textFieldAxObject.childrenCount", childrenCountExpected); 24 // Verify the autofill button is represented in the accessibility tree. 25 shouldBe("textFieldAxObject.childAtIndex(childrenCountExpected - 1).description", "'AXDescription: contact info AutoFill'"); 19 var domTextField = document.getElementById("textfield"); 26 20 27 var platform = accessibilityController.platformName; 28 // Windows expects 2 children. 29 childrenCountExpected = "2"; 30 if (platform == "mac" || platform == "ios") 31 childrenCountExpected = "1" 32 else if (platform == "atk") 33 childrenCountExpected = "0" 21 window.internals.setShowAutoFillButton(domTextField, "Contacts"); 22 var expectedChildrenCount = platformName == "atk" ? "1" : "2"; 23 setTimeout(async function() { 24 await expectAsyncExpression("axTextField.childrenCount", expectedChildrenCount); 25 // Verify the autofill button is represented in the accessibility tree. 26 await expectAsyncExpression("axTextField.childAtIndex(expectedChildrenCount - 1).description", "'AXDescription: contact info AutoFill'"); 34 27 35 // Don't crash! 36 window.internals.setShowAutoFillButton(document.getElementById("textfield"), "None"); 37 shouldBe("textFieldAxObject.childrenCount", childrenCountExpected); 28 // Don't crash! 29 window.internals.setShowAutoFillButton(domTextField, "None"); 30 await expectAsyncExpression("axTextField.childrenCount", platformName == "atk" ? "0" : "1"); 31 32 finishJSTest(); 33 }, 0); 38 34 } 39 40 35 </script> 41 42 <script src="../resources/js-test-post.js"></script>43 36 </body> 44 37 </html> 38 -
trunk/LayoutTests/accessibility/element-haspopup-expected.txt
r246715 r286794 11 11 12 12 13 PASS accessibilityController. focusedElement.hasPopup is true14 PASS accessibilityController. focusedElement.hasPopup is false15 PASS p1.hasPopup is true16 PASS p2.hasPopup is false17 PASS p3.hasPopup is false13 PASS accessibilityController.accessibleElementById('link1').hasPopup is true 14 PASS accessibilityController.accessibleElementById('link2').hasPopup is false 15 PASS accessibilityController.accessibleElementById('paragraph1').hasPopup is true 16 PASS accessibilityController.accessibleElementById('paragraph2').hasPopup is false 17 PASS accessibilityController.accessibleElementById('paragraph3').hasPopup is false 18 18 PASS successfullyParsed is true 19 19 -
trunk/LayoutTests/accessibility/element-haspopup.html
r246715 r286794 28 28 29 29 if (window.accessibilityController) { 30 document.getElementById("link1").focus();31 shouldBe("accessibilityController. focusedElement.hasPopup", "true");30 shouldBe("accessibilityController.accessibleElementById('link1').hasPopup", "true"); 31 shouldBe("accessibilityController.accessibleElementById('link2').hasPopup", "false"); 32 32 33 document.getElementById("link2").focus(); 34 shouldBe("accessibilityController.focusedElement.hasPopup", "false"); 35 36 var p1 = accessibilityController.accessibleElementById("paragraph1"); 37 shouldBe("p1.hasPopup", "true"); 38 39 var p2 = accessibilityController.accessibleElementById("paragraph2"); 40 shouldBe("p2.hasPopup", "false"); 41 42 var p3 = accessibilityController.accessibleElementById("paragraph3"); 43 shouldBe("p3.hasPopup", "false"); 33 shouldBe("accessibilityController.accessibleElementById('paragraph1').hasPopup", "true"); 34 shouldBe("accessibilityController.accessibleElementById('paragraph2').hasPopup", "false"); 35 shouldBe("accessibilityController.accessibleElementById('paragraph3').hasPopup", "false"); 44 36 } 45 37 -
trunk/LayoutTests/accessibility/mac/label-element-changing-children-string-value-expected.txt
r202063 r286794 1 firstfoo choice2 1 This tests that if a label element's children change, the string value updates 3 2 … … 7 6 PASS label.role is 'AXRole: AXStaticText' 8 7 PASS initialStringValue is 'AXValue: first choice' 9 PASS mutatedStringValue is'AXValue: first foo choice'8 PASS label.stringValue === 'AXValue: first foo choice' 10 9 PASS successfullyParsed is true 11 10 12 11 TEST COMPLETE 13 12 firstfoo choice -
trunk/LayoutTests/accessibility/mac/label-element-changing-children-string-value.html
r202063 r286794 2 2 <html> 3 3 <head> 4 <script src="../../resources/js-test-pre.js"></script> 4 <script src="../../resources/js-test.js"></script> 5 <script src="../../resources/accessibility-helper.js"></script> 5 6 </head> 6 <body id="body">7 <body> 7 8 8 9 <input type="radio" id="input" /> … … 12 13 </label> 13 14 14 < p id="description"></p>15 <div id="console"></div> 15 <script> 16 description("This tests that if a label element's children change, the string value updates"); 16 17 17 <script> 18 var label, initialStringValue; 19 if (window.accessibilityController) { 20 window.jsTestIsAsync = true; 18 21 19 var label = 0; 20 var initialStringValue = 0; 21 var mutatedStringValue = 0; 22 label = accessibilityController.accessibleElementById("label"); 23 initialStringValue = label.stringValue; 24 let first = document.getElementById("first") 25 let span = document.createElement("span"); 26 let textNode = document.createTextNode("foo"); 27 span.appendChild(textNode); 28 first.appendChild(textNode); 22 29 23 description("This tests that if a label element's children change, the string value updates");24 if (window.accessibilityController) {30 shouldBe("label.role", "'AXRole: AXStaticText'"); 31 shouldBe("initialStringValue", "'AXValue: first choice'"); 25 32 26 if (window.accessibilityController) { 27 28 var body = document.getElementById("body"); 29 body.focus(); 30 31 label = accessibilityController.accessibleElementById("label"); 32 initialStringValue = label.stringValue; 33 var first = document.getElementById("first") 34 var element = document.createElement("span"); 35 var foo = document.createTextNode("foo"); 36 element.appendChild(foo); 37 first.appendChild(foo); 38 mutatedStringValue = label.stringValue; 39 40 shouldBe("label.role", "'AXRole: AXStaticText'"); 41 shouldBe("initialStringValue", "'AXValue: first choice'"); 42 shouldBe("mutatedStringValue", "'AXValue: first foo choice'"); 43 } 33 setTimeout(async function() { 34 await expectAsyncExpression("label.stringValue", "'AXValue: first foo choice'"); 35 finishJSTest(); 36 }, 0); 44 37 } 45 38 </script> 46 47 <script src="../../resources/js-test-post.js"></script>48 39 </body> 49 40 </html> 41 42 43 -
trunk/LayoutTests/accessibility/mac/label-element-changing-textcontent-string-value-expected.txt
r202063 r286794 1 second choice2 1 This tests that if a label element's children's textContent changes, the string value updates 3 2 … … 7 6 PASS label.role is 'AXRole: AXStaticText' 8 7 PASS initialStringValue is 'AXValue: first choice' 9 PASS mutatedStringValue is'AXValue: second choice'8 PASS label.stringValue === 'AXValue: second choice' 10 9 PASS successfullyParsed is true 11 10 12 11 TEST COMPLETE 13 12 second choice -
trunk/LayoutTests/accessibility/mac/label-element-changing-textcontent-string-value.html
r202063 r286794 2 2 <html> 3 3 <head> 4 <script src="../../resources/js-test-pre.js"></script> 4 <script src="../../resources/js-test.js"></script> 5 <script src="../../resources/accessibility-helper.js"></script> 5 6 </head> 6 <body id="body">7 <body> 7 8 8 9 <input type="radio" id="input" /> … … 12 13 </label> 13 14 14 < p id="description"></p>15 <div id="console"></div> 15 <script> 16 description("This tests that if a label element's children's textContent changes, the string value updates"); 16 17 17 <script> 18 var label, initialStringValue; 19 if (window.accessibilityController) { 20 window.jsTestIsAsync = true; 18 21 19 var label = 0; 20 var initialStringValue = 0; 21 var mutatedStringValue = 0; 22 label = accessibilityController.accessibleElementById("label"); 23 initialStringValue = label.stringValue; 24 shouldBe("label.role", "'AXRole: AXStaticText'"); 25 shouldBe("initialStringValue", "'AXValue: first choice'"); 22 26 23 description("This tests that if a label element's children's textContent changes, the string value updates"); 24 if (window.accessibilityController) { 25 26 if (window.accessibilityController) { 27 28 var body = document.getElementById("body"); 29 body.focus(); 30 31 label = accessibilityController.accessibleElementById("label"); 32 initialStringValue = label.stringValue; 33 var first = document.getElementById("first") 34 first.textContent = "second"; 35 mutatedStringValue = label.stringValue; 36 37 shouldBe("label.role", "'AXRole: AXStaticText'"); 38 shouldBe("initialStringValue", "'AXValue: first choice'"); 39 shouldBe("mutatedStringValue", "'AXValue: second choice'"); 40 } 27 document.getElementById("first").textContent = "second"; 28 setTimeout(async function() { 29 await expectAsyncExpression("label.stringValue", "'AXValue: second choice'") 30 finishJSTest(); 31 }, 0); 41 32 } 42 33 </script> 43 44 <script src="../../resources/js-test-post.js"></script>45 34 </body> 46 35 </html> 36 -
trunk/LayoutTests/accessibility/mac/update-children-when-aria-role-changes-expected.txt
r187799 r286794 1 button 12 1 This tests that when an ARIA role changes, the AX hierarchy is updated accordingly. 3 2 … … 5 4 6 5 7 PASS parent.childAtIndex(0).role is 'AXRole: AXButton'8 PASS parent.childAtIndex(1) == null || parent.childAtIndex(1).isValid == false is true9 PASS parent.childAtIndex(0).role is'AXRole: AXStaticText'10 PASS parent.childAtIndex(1).role is'AXRole: AXButton'6 PASS container.childAtIndex(0).role is 'AXRole: AXButton' 7 PASS container.childAtIndex(1) == null || container.childAtIndex(1).isValid == false is true 8 PASS container.childAtIndex(0).role === 'AXRole: AXStaticText' 9 PASS container.childAtIndex(1).role === 'AXRole: AXButton' 11 10 PASS successfullyParsed is true 12 11 13 12 TEST COMPLETE 14 13 button 1 -
trunk/LayoutTests/accessibility/mac/update-children-when-aria-role-changes.html
r187799 r286794 2 2 <html> 3 3 <head> 4 <script src="../../resources/js-test-pre.js"></script> 5 <script> 6 if (window.testRunner) 7 testRunner.dumpAsText(); 8 </script> 4 <script src="../../resources/js-test.js"></script> 5 <script src="../../resources/accessibility-helper.js"></script> 9 6 </head> 10 7 <body> 11 8 12 <div id=" parent" tabindex=0 role="group">9 <div id="container" tabindex=0 role="group"> 13 10 <span role="button" id="button1">button 1</span> 14 11 <span id="button2" title="button 2"></span> 15 12 </div> 16 13 17 <p id="description"></p>18 <div id="console"></div>19 20 14 <script> 21 22 15 description("This tests that when an ARIA role changes, the AX hierarchy is updated accordingly."); 23 16 17 var container; 24 18 if (window.accessibilityController) { 25 document.getElementById("parent").focus(); 26 var parent = accessibilityController.focusedElement; 27 shouldBe("parent.childAtIndex(0).role", "'AXRole: AXButton'"); 28 shouldBeTrue("parent.childAtIndex(1) == null || parent.childAtIndex(1).isValid == false"); 19 window.jsTestIsAsync = true; 20 21 container = accessibilityController.accessibleElementById("container"); 22 shouldBe("container.childAtIndex(0).role", "'AXRole: AXButton'"); 23 shouldBeTrue("container.childAtIndex(1) == null || container.childAtIndex(1).isValid == false"); 29 24 30 25 document.getElementById("button1").removeAttribute("role"); 31 26 document.getElementById("button2").setAttribute("role", "button"); 32 33 shouldBe("parent.childAtIndex(0).role", "'AXRole: AXStaticText'"); 34 shouldBe("parent.childAtIndex(1).role", "'AXRole: AXButton'"); 27 setTimeout(async function() { 28 await expectAsyncExpression("container.childAtIndex(0).role", "'AXRole: AXStaticText'"); 29 await expectAsyncExpression("container.childAtIndex(1).role", "'AXRole: AXButton'"); 30 finishJSTest(); 31 }, 0); 35 32 } 36 37 33 </script> 38 39 <script src="../../resources/js-test-post.js"></script>40 41 34 </body> 42 35 </html> -
trunk/LayoutTests/accessibility/tabindex-removed-expected.txt
r249534 r286794 1 test2 1 This tests that when tabindex is updated on an element, the children are re-computed. 3 2 … … 9 8 PASS group.parentElement().isEqual(main) is true 10 9 PASS main.childAtIndex(0).isEqual(group) is true 11 PASS main.childAtIndex(0).isEqual(button) istrue12 PASS button.parentElement().isEqual(main) istrue10 PASS main.childAtIndex(0).isEqual(button) === true 11 PASS button.parentElement().isEqual(main) === true 13 12 PASS successfullyParsed is true 14 13 15 14 TEST COMPLETE 16 15 test -
trunk/LayoutTests/accessibility/tabindex-removed.html
r249534 r286794 1 <!DOCTYPE HTML >1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> 2 2 <html> 3 3 <head> 4 <script src="../resources/js-test-pre.js"></script> 4 <script src="../resources/js-test.js"></script> 5 <script src="../resources/accessibility-helper.js"></script> 5 6 </head> 6 7 <body> 7 8 8 9 <main id="main"> 9 10 <div style="display:inline" tabindex="0"> 11 <button id="button">test</button> 12 </div> 13 10 <div style="display:inline" tabindex="0"> 11 <button id="button">test</button> 12 </div> 14 13 </main> 15 16 <p id="description"></p>17 <div id="console"></div>18 14 19 15 <script> 20 16 description("This tests that when tabindex is updated on an element, the children are re-computed.") 21 17 18 var button, group, main; 22 19 if (window.accessibilityController) { 23 var main = accessibilityController.accessibleElementById("main"); 24 var group = main.childAtIndex(0); 25 var button = accessibilityController.accessibleElementById("button"); 20 window.jsTestIsAsync = true; 21 22 button = accessibilityController.accessibleElementById("button"); 23 main = accessibilityController.accessibleElementById("main"); 24 group = main.childAtIndex(0); 26 25 27 26 shouldBeTrue("group.childAtIndex(0).parentElement().isEqual(group)"); … … 30 29 shouldBeTrue("main.childAtIndex(0).isEqual(group)"); 31 30 32 // Removing t he tabindex updates children31 // Removing tabindex should cause children to update. 33 32 document.getElementById("main").children[0].removeAttribute("tabindex"); 34 35 shouldBeTrue("main.childAtIndex(0).isEqual(button)"); 36 shouldBeTrue("button.parentElement().isEqual(main)"); 33 setTimeout(async function() { 34 await expectAsyncExpression("main.childAtIndex(0).isEqual(button)", "true"); 35 await expectAsyncExpression("button.parentElement().isEqual(main)", "true"); 36 finishJSTest(); 37 }, 0); 37 38 } 38 39 </script> 39 <script src="../resources/js-test-post.js"></script>40 40 </body> 41 41 </html> -
trunk/LayoutTests/platform/glib/accessibility/auto-fill-crash-expected.txt
r284612 r286794 1 2 1 This tests that when an auto fill element is removed we won't crash accessing an old value. 3 2 … … 5 4 6 5 7 PASS textFieldAxObject.childrenCount is18 PASS textFieldAxObject.childAtIndex(childrenCountExpected - 1).description is'AXDescription: contact info AutoFill'9 PASS textFieldAxObject.childrenCount is06 PASS axTextField.childrenCount === 1 7 PASS axTextField.childAtIndex(expectedChildrenCount - 1).description === 'AXDescription: contact info AutoFill' 8 PASS axTextField.childrenCount === 0 10 9 PASS successfullyParsed is true 11 10
Note:
See TracChangeset
for help on using the changeset viewer.