Changeset 285937 in webkit
- Timestamp:
- Nov 17, 2021, 10:50:01 AM (5 years ago)
- Location:
- trunk/LayoutTests
- Files:
-
- 10 edited
-
ChangeLog (modified) (1 diff)
-
accessibility/add-children-pseudo-element-expected.txt (modified) (2 diffs)
-
accessibility/add-children-pseudo-element.html (modified) (3 diffs)
-
accessibility/aria-checkbox-checked.html (modified) (1 diff)
-
accessibility/aria-checkbox-text.html (modified) (1 diff)
-
accessibility/aria-toggle-button-with-title.html (modified) (1 diff)
-
accessibility/auto-fill-types-expected.txt (modified) (1 diff)
-
accessibility/auto-fill-types.html (modified) (2 diffs)
-
accessibility/ax-value-with-search-expected.txt (modified) (2 diffs)
-
accessibility/ax-value-with-search.html (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r285936 r285937 1 2021-11-17 Tyler Wilcock <tyler_w@apple.com> 2 3 AX: Fix 5 tests in --release --accessibility-isolated-tree mode 4 https://bugs.webkit.org/show_bug.cgi?id=233232 5 6 Reviewed by Chris Fleizach. 7 8 Fix all of these tests in --release --accessibility-isolated-tree 9 mode by asynchronously waiting for document changes (when necessary). 10 Some tests are changed to use accessibleElementById instead of 11 element.focus() + accessibilityController.focusedElement for selecting 12 elements in JS, as the former doesn't require asynchronous waiting for static elements. 13 14 * accessibility/add-children-pseudo-element-expected.txt: 15 * accessibility/add-children-pseudo-element.html: 16 * accessibility/aria-checkbox-checked.html: 17 * accessibility/aria-checkbox-text.html: 18 * accessibility/aria-toggle-button-with-title.html: 19 * accessibility/auto-fill-types-expected.txt: 20 * accessibility/auto-fill-types.html: 21 * accessibility/ax-value-with-search-expected.txt: 22 * accessibility/ax-value-with-search.html: 23 1 24 2021-11-17 Dean Jackson <dino@apple.com> 2 25 -
trunk/LayoutTests/accessibility/add-children-pseudo-element-expected.txt
r267644 r285937 1 Language Email2 1 Make sure that we are updating the render block flow element's children correctly. 3 2 … … 6 5 7 6 PASS element.childrenCount is 3 8 PASS element.childrenCount is27 PASS element.childrenCount === 2 9 8 PASS successfullyParsed is true 10 9 -
trunk/LayoutTests/accessibility/add-children-pseudo-element.html
r227151 r285937 2 2 <html> 3 3 <head> 4 <script src="../resources/js-test-pre.js"></script> 5 </head> 6 4 <script src="../resources/js-test.js"></script> 5 <script src="../resources/accessibility-helper.js"></script> 7 6 <style> 8 7 .pseudo::after { … … 19 18 } 20 19 </style> 20 </head> 21 <body> 21 22 22 <body id="body"> 23 <div id="content"> 24 <div style="float: left;"> 25 <span>Language</span> 26 <input> 27 </div> 23 28 24 <div id="container">25 <div id="test" style="float : left;">26 <span>Language</span>27 <input id="test">29 <div id="float" style="display: inline-block;" class="pseudo"> 30 <span required="" style="color: rgb(194, 0, 0);">Email</span> 31 <input type="text" required="" aria-required="true" value="" onkeyup="hidePseudo();"> 32 </div> 28 33 </div> 29 30 <div id="float" style="display: inline-block;" class="pseudo">31 <span required="" style="color: rgb(194, 0, 0);">Email</span>32 <input type="text" required="" aria-required="true" value="" onkeyup="hidePseudo();">33 </div>34 35 </div>36 37 <p id="description"></p>38 <div id="console"></div>39 34 40 35 <script> … … 42 37 description("Make sure that we are updating the render block flow element's children correctly."); 43 38 44 if (window.accessibilityController) { 45 var element = accessibilityController.accessibleElementById("float"); 46 if (accessibilityController.platformName != "atk") 47 shouldBe("element.childrenCount", "3"); 48 else 49 shouldBe("element.childrenCount", "2"); 50 51 eventSender.keyDown('\t'); 52 eventSender.keyDown('\t'); 53 54 if (accessibilityController.platformName != "atk") 55 shouldBe("element.childrenCount", "2"); 56 else 57 shouldBe("element.childrenCount", "1"); 58 showPseudo(); 59 60 function hidePseudo() { 61 document.getElementById("float").className += "hidden" 62 } 63 64 function showPseudo() { 65 document.getElementById("float").className = "pseudo"; 66 } 67 68 // Make sure getting the attributes of its children won't cause crash 69 element.attributesOfChildren(); 39 function hidePseudo() { 40 document.getElementById("float").className += "hidden" 70 41 } 71 42 43 function showPseudo() { 44 document.getElementById("float").className = "pseudo"; 45 } 46 47 if (window.accessibilityController) { 48 window.jsTestIsAsync = true; 49 50 var element; 51 setTimeout(async function() { 52 element = accessibilityController.accessibleElementById("float"); 53 if (accessibilityController.platformName != "atk") 54 shouldBe("element.childrenCount", "3"); 55 else 56 shouldBe("element.childrenCount", "2"); 57 58 eventSender.keyDown('\t'); 59 eventSender.keyDown('\t'); 60 61 // Asynchronously wait for and verify the result of the onkeyup hidePseudo() invocation. 62 if (accessibilityController.platformName != "atk") 63 await expectAsyncExpression("element.childrenCount", "2"); 64 else 65 await expectAsyncExpression("element.childrenCount", "1"); 66 67 showPseudo(); 68 69 // Make sure getting the attributes of its children won't cause crash. 70 element.attributesOfChildren(); 71 72 document.getElementById("content").style.visibility = "hidden"; 73 74 finishJSTest(); 75 }, 0); 76 } 72 77 </script> 73 74 <script src="../resources/js-test-post.js"></script>75 78 </body> 76 79 </html> 80 -
trunk/LayoutTests/accessibility/aria-checkbox-checked.html
r155274 r285937 36 36 37 37 for (var i = 0; i < answers.length; i++) { 38 var checkbox = document.getElementById(answers[i][0]); 39 checkbox.focus(); 40 checkbox = accessibilityController.focusedElement; 38 var checkbox = accessibilityController.accessibleElementById(answers[i][0]); 41 39 shouldBe("checkbox.isChecked", answers[i][1]); 42 40 } -
trunk/LayoutTests/accessibility/aria-checkbox-text.html
r155274 r285937 20 20 21 21 if (window.accessibilityController) { 22 23 var checkbox = document.getElementById("check1"); 24 checkbox.focus(); 25 checkbox = accessibilityController.focusedElement; 22 var checkbox = accessibilityController.accessibleElementById("check1"); 26 23 debug("checkbox.title is " + checkbox.title); 27 24 28 checkbox = document.getElementById("check2"); 29 checkbox.focus(); 30 checkbox = accessibilityController.focusedElement; 25 checkbox = accessibilityController.accessibleElementById("check2"); 31 26 debug("checkbox.title is " + checkbox.title); 32 27 33 checkbox = document.getElementById("check3"); 34 checkbox.focus(); 35 checkbox = accessibilityController.focusedElement; 28 checkbox = accessibilityController.accessibleElementById("check3"); 36 29 debug("checkbox.title is " + checkbox.title); 37 30 } -
trunk/LayoutTests/accessibility/aria-toggle-button-with-title.html
r182012 r285937 9 9 if (window.accessibilityController) { 10 10 11 document.getElementById("tbutton").focus(); 12 tbutton1 = accessibilityController.focusedElement; 11 tbutton1 = accessibilityController.accessibleElementById("tbutton"); 13 12 debug("Role: " + tbutton1.role); 14 13 shouldBe("tbutton1.title", "'AXTitle: Toggle button'"); 15 14 16 document.getElementById("button").focus(); 17 button = accessibilityController.focusedElement; 15 button = accessibilityController.accessibleElementById("button"); 18 16 debug("Role: " + button.role); 19 17 shouldBe("button.title", "'AXTitle: Button title'"); -
trunk/LayoutTests/accessibility/auto-fill-types-expected.txt
r238751 r285937 1 2 1 This tests that the auto-filled buttons show up. 3 2 -
trunk/LayoutTests/accessibility/auto-fill-types.html
r225707 r285937 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 11 <p id="description"></p>12 <div id="console"></div>13 10 14 11 <script> … … 17 14 18 15 if (window.accessibilityController) { 19 var textField = document.getElementById("textfield"); 20 var axTextField = accessibilityController.accessibleElementById("textfield"); 21 debug("Initial auto-fill available: " + axTextField.boolAttributeValue("AXValueAutofillAvailable")); 22 debug("Auto-fill type: " + axTextField.stringAttributeValue("AXValueAutofillType")); 16 window.jsTestIsAsync = true; 23 17 24 window.internals.setShowAutoFillButton(document.getElementById("textfield"), "Contacts"); 25 var contactsButton = axTextField.childAtIndex(1); 26 debug("Contact button role: " + contactsButton.role); 27 debug("Contact button label: " + contactsButton.description); 28 debug("Auto-fill type: " + axTextField.stringAttributeValue("AXValueAutofillType")); 18 var textField, axTextField, contactsButton, credentialsButton; 19 setTimeout(async function() { 20 textField = document.getElementById("textfield"); 21 axTextField = accessibilityController.accessibleElementById("textfield"); 22 debug("Initial auto-fill available: " + axTextField.boolAttributeValue("AXValueAutofillAvailable")); 23 debug("Auto-fill type: " + axTextField.stringAttributeValue("AXValueAutofillType")); 29 24 30 window.internals.setShowAutoFillButton(document.getElementById("textfield"), "Credentials"); 31 var credentialsButton = axTextField.childAtIndex(1); 32 debug("Credentials button role: " + credentialsButton.role); 33 debug("Credentials button label: " + credentialsButton.description); 34 debug("Auto-fill type: " + axTextField.stringAttributeValue("AXValueAutofillType")); 25 window.internals.setShowAutoFillButton(document.getElementById("textfield"), "Contacts"); 26 // Wait for contacts autofill button to render. 27 await waitFor(() => { 28 contactsButton = axTextField.childAtIndex(1); 29 return contactsButton && axTextField.stringAttributeValue("AXValueAutofillType") === "contacts"; 30 }); 31 debug("Contact button role: " + contactsButton.role); 32 debug("Contact button label: " + contactsButton.description); 33 debug("Auto-fill type: " + axTextField.stringAttributeValue("AXValueAutofillType")); 35 34 36 debug("Post auto-fill available: " + axTextField.boolAttributeValue("AXValueAutofillAvailable")); 35 window.internals.setShowAutoFillButton(document.getElementById("textfield"), "Credentials"); 36 // Wait for credentials autofill button to render. 37 await waitFor(() => { 38 credentialsButton = axTextField.childAtIndex(1); 39 return credentialsButton && axTextField.stringAttributeValue("AXValueAutofillType") === "credentials"; 40 }); 41 debug("Credentials button role: " + credentialsButton.role); 42 debug("Credentials button label: " + credentialsButton.description); 43 debug("Auto-fill type: " + axTextField.stringAttributeValue("AXValueAutofillType")); 44 45 debug("Post auto-fill available: " + axTextField.boolAttributeValue("AXValueAutofillAvailable")); 46 47 finishJSTest(); 48 }, 0); 37 49 } 38 39 50 </script> 40 41 <script src="../resources/js-test-post.js"></script>42 51 </body> 43 52 </html> 53 -
trunk/LayoutTests/accessibility/ax-value-with-search-expected.txt
r189862 r285937 1 2 1 This tests that a search field is returns its accessibilityValue correctly. 3 2 … … 5 4 6 5 7 PASS search .stringValue is 'AXValue: hello'8 PASS search .stringValue is'AXValue: test'6 PASS searchInput.stringValue is 'AXValue: hello' 7 PASS searchInput.stringValue === 'AXValue: test' 9 8 PASS successfullyParsed is true 10 9 -
trunk/LayoutTests/accessibility/ax-value-with-search.html
r189862 r285937 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 <input type="search" value="hello" id="search"> 9 10 <p id="description"></p> 11 <div id="console"></div> 9 <input type="search" value="hello" id="searchInput"> 12 10 13 11 <script> … … 16 14 17 15 if (window.accessibilityController) { 16 window.jsTestIsAsync = true; 18 17 19 var search = accessibilityController.accessibleElementById("search"); 20 shouldBe("search.stringValue", "'AXValue: hello'"); 21 document.getElementById('search').value = 'test'; 22 shouldBe("search.stringValue", "'AXValue: test'"); 18 var searchInput; 19 setTimeout(async function() { 20 searchInput = accessibilityController.accessibleElementById("searchInput"); 21 shouldBe("searchInput.stringValue", "'AXValue: hello'"); 22 23 document.getElementById("searchInput").value = "test"; 24 await expectAsyncExpression("searchInput.stringValue", "'AXValue: test'"); 25 26 finishJSTest(); 27 }, 0); 23 28 } 24 25 29 </script> 26 27 <script src="../resources/js-test-post.js"></script>28 30 </body> 29 31 </html> 32
Note:
See TracChangeset
for help on using the changeset viewer.