Changeset 286948 in webkit
- Timestamp:
- Dec 13, 2021, 8:20:39 AM (5 years ago)
- Location:
- trunk/LayoutTests
- Files:
-
- 11 edited
-
ChangeLog (modified) (1 diff)
-
accessibility/aria-hidden-update-expected.txt (modified) (2 diffs)
-
accessibility/aria-hidden-update.html (modified) (1 diff)
-
accessibility/focusable-div-expected.txt (modified) (1 diff)
-
accessibility/focusable-div.html (modified) (2 diffs)
-
accessibility/mac/css-speech-speak-expected.txt (modified) (1 diff)
-
accessibility/mac/css-speech-speak.html (modified) (1 diff)
-
accessibility/mac/invalid-status-for-input-types-expected.txt (modified) (2 diffs)
-
accessibility/mac/invalid-status-for-input-types.html (modified) (1 diff)
-
platform/glib/TestExpectations (modified) (1 diff)
-
platform/win/TestExpectations (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r286944 r286948 1 2021-12-13 Tyler Wilcock <tyler_w@apple.com> 2 3 AX: Make aria-hidden-update.html, focusable-div.html, mac/invalid-status-for-input-types.html, and mac/css-speech-speak.html pass in --release isolated tree mode 4 https://bugs.webkit.org/show_bug.cgi?id=234198 5 6 Reviewed by Chris Fleizach. 7 8 Make the following tests async or otherwise isolated-tree friendly 9 (i.e. by using accessibleElementById instead of document.getElementById().focus() + 10 accessibilityController.focusedElement to get a JS reference to an AX object). 11 12 * accessibility/aria-hidden-update-expected.txt: 13 * accessibility/aria-hidden-update.html: 14 * accessibility/focusable-div-expected.txt: 15 * accessibility/focusable-div.html: 16 * accessibility/mac/invalid-status-for-input-types-expected.txt: 17 * accessibility/mac/invalid-status-for-input-types.html: 18 Make these tests async. These tests must be async to pass in isolated 19 tree mode because they use JS to dynamically change the page. 20 * accessibility/mac/css-speech-speak-expected.txt: 21 * accessibility/mac/css-speech-speak.html: 22 Use accessibleElementById instead of document.getElementById().focus() + 23 accessibilityController.focusedElement to get references to JS AX objects. 24 25 * platform/glib/TestExpectations: 26 * platform/win/TestExpectations: 27 Skip accessibility/focusable-div.html due to lack of 28 AccessibilityUIElement::domIdentifier implementation. 29 1 30 2021-12-13 Youenn Fablet <youenn@apple.com> 2 31 -
trunk/LayoutTests/accessibility/aria-hidden-update-expected.txt
r68108 r286948 1 Button 12 Button 23 Button 34 1 This test makes sure that when aria-hidden changes, the AX hierarchy is updated. 5 2 … … 7 4 8 5 9 PASS parent.childAtIndex(0).isEqual(button1) is true10 PASS parent.childAtIndex(1).isEqual(button2) is true11 PASS parent.childAtIndex(2).isEqual(button3) is true12 PASS parent.childAtIndex(0).isEqual(button1) is true13 PASS parent.childAtIndex(1).isEqual(button3) istrue14 PASS parent.childAtIndex(0).isEqual(button3) istrue15 PASS parent.childAtIndex(0).isEqual(button2) istrue16 PASS parent.childAtIndex(1).isEqual(button3) istrue6 PASS container.childAtIndex(0).isEqual(button1) is true 7 PASS container.childAtIndex(1).isEqual(button2) is true 8 PASS container.childAtIndex(2).isEqual(button3) is true 9 PASS container.childAtIndex(0).isEqual(button1) is true 10 PASS container.childAtIndex(1).isEqual(button3) === true 11 PASS container.childAtIndex(0).isEqual(button3) === true 12 PASS container.childAtIndex(0).isEqual(button2) === true 13 PASS container.childAtIndex(1).isEqual(button3) === true 17 14 PASS successfullyParsed is true 18 15 19 16 TEST COMPLETE 20 17 Button 1 18 Button 2 19 Button 3 -
trunk/LayoutTests/accessibility/aria-hidden-update.html
r241289 r286948 1 < 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 <body id="body">7 8 <div role="group" tabindex="0" id="parent">7 <body> 8 9 <div role="group" tabindex="0" id="container"> 9 10 <div role="button" id="button1" tabindex="0">Button 1</div> 10 11 <div role="button" id="button2" tabindex="0">Button 2</div> 11 12 <div role="button" id="button3" tabindex="0">Button 3</div> 13 </div> 12 14 13 </div> 15 <script> 16 description("This test makes sure that when aria-hidden changes, the AX hierarchy is updated."); 14 17 18 if (window.accessibilityController) { 19 window.jsTestIsAsync = true; 15 20 16 <p id="description"></p> 17 <div id="console"></div> 18 19 <script> 20 if (window.accessibilityController) { 21 jsTestIsAsync = true; 22 description("This test makes sure that when aria-hidden changes, the AX hierarchy is updated."); 21 var container = accessibilityController.accessibleElementById("container"); 22 var button1 = accessibilityController.accessibleElementById("button1");; 23 var button2 = accessibilityController.accessibleElementById("button2");; 24 var button3 = accessibilityController.accessibleElementById("button3");; 23 25 24 // Get the parent element. 25 document.getElementById("parent").focus(); 26 var parent = accessibilityController.focusedElement; 27 28 // Get all three children. 29 document.getElementById("button1").focus(); 30 var button1 = accessibilityController.focusedElement; 31 document.getElementById("button2").focus(); 32 var button2 = accessibilityController.focusedElement; 33 document.getElementById("button3").focus(); 34 var button3 = accessibilityController.focusedElement; 35 36 // Verify that the 3 children are present. 37 shouldBeTrue("parent.childAtIndex(0).isEqual(button1)"); 38 shouldBeTrue("parent.childAtIndex(1).isEqual(button2)"); 39 shouldBeTrue("parent.childAtIndex(2).isEqual(button3)"); 26 // Verify that the 3 buttons are present as children. 27 shouldBeTrue("container.childAtIndex(0).isEqual(button1)"); 28 shouldBeTrue("container.childAtIndex(1).isEqual(button2)"); 29 shouldBeTrue("container.childAtIndex(2).isEqual(button3)"); 40 30 41 // Make the 2nd button hidden. Only 1 and 3 should be present.42 document.getElementById("button2").setAttribute("aria-hidden", "true");43 setTimeout(function() {44 shouldBeTrue("parent.childAtIndex(0).isEqual(button1)");45 shouldBeTrue("parent.childAtIndex(1).isEqual(button3)");31 // Make the 2nd button hidden. Only 1 and 3 should be present. 32 document.getElementById("button2").setAttribute("aria-hidden", "true"); 33 shouldBeTrue("container.childAtIndex(0).isEqual(button1)"); 34 setTimeout(async function() { 35 await expectAsyncExpression("container.childAtIndex(1).isEqual(button3)", "true"); 46 36 47 // Make the 1st button hidden. Only 3 should be present. 48 document.getElementById("button1").setAttribute("aria-hidden", "true"); 49 setTimeout(function() { 50 shouldBeTrue("parent.childAtIndex(0).isEqual(button3)"); 37 // Make the 1st button hidden. Only 3 should be present. 38 document.getElementById("button1").setAttribute("aria-hidden", "true"); 39 await expectAsyncExpression("container.childAtIndex(0).isEqual(button3)", "true"); 51 40 52 // Make the 2nd button not hidden. 2 and 3 should be present. 53 document.getElementById("button2").setAttribute("aria-hidden", "false"); 54 setTimeout(function() { 55 shouldBeTrue("parent.childAtIndex(0).isEqual(button2)"); 56 shouldBeTrue("parent.childAtIndex(1).isEqual(button3)"); 57 finishJSTest(); 58 }, 0); 59 }, 0); 60 }, 0); 61 } 62 </script> 41 // Make the 2nd button not hidden. 2 and 3 should be present. 42 document.getElementById("button2").setAttribute("aria-hidden", "false"); 43 await expectAsyncExpression("container.childAtIndex(0).isEqual(button2)", "true"); 44 await expectAsyncExpression("container.childAtIndex(1).isEqual(button3)", "true"); 63 45 64 <script src="../resources/js-test-post.js"></script> 46 finishJSTest(); 47 }, 0); 48 } 49 </script> 65 50 </body> 66 51 </html> -
trunk/LayoutTests/accessibility/focusable-div-expected.txt
r201216 r286948 4 4 5 5 6 PASS document.activeElement == link is true6 PASS document.activeElement.id is "link" 7 7 PASS lastChar(axLink.title) is "A" 8 PASS document.activeElement == div is true8 PASS document.activeElement.id is "div" 9 9 PASS lastChar(axDiv.title) is ' ' 10 PASS document.activeElement == div2 is true10 PASS document.activeElement.id is "div2" 11 11 PASS lastChar(axDiv2.title) is ' ' 12 PASS document.activeElement == div3 is true12 PASS document.activeElement.id is "div3" 13 13 PASS lastChar(accNameForDiv3) is "D" 14 PASS document.activeElement == div4 is true14 PASS document.activeElement.id is "div4" 15 15 PASS axDiv4.title.indexOf('Link') is -1 16 PASS document.activeElement == div5 is true16 PASS document.activeElement.id is "div5" 17 17 PASS axDiv5.title.indexOf('Link') is -1 18 18 PASS axDiv5.title.indexOf('Initial text before link') >= 0 is false 19 PASS document.activeElement == div6 is true19 PASS document.activeElement.id is "div6" 20 20 PASS axDiv6.title.indexOf('List item') is -1 21 PASS document.activeElement == div7 is true21 PASS document.activeElement.id is "div7" 22 22 PASS axDiv7.title.indexOf('List item') is -1 23 23 PASS axDiv7.title.indexOf('Initial text before list') >= 0 is false -
trunk/LayoutTests/accessibility/focusable-div.html
r201216 r286948 1 <!DOCTYPE HTML >1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> 2 2 <html> 3 <head> 4 <script src="../resources/js-test.js"></script> 5 <script src="../resources/accessibility-helper.js"></script> 6 </head> 3 7 <body> 4 <script src="../resources/js-test-pre.js"></script>5 <script src="../resources/accessibility-helper.js"></script>6 8 7 9 <div id="content"> 10 <!-- A link always gets its accessible text from contents. --> 11 <a id="link" href="#">A</a> 8 12 9 <!-- A link always gets its accessible text from contents. --> 10 <a id="link" href="#">A</a> 13 <!-- A generic focusable div should not get its accessible text from contents. --> 14 <div id="div" tabindex="0">B</div> 15 <div id="div2" tabindex="0"><div></div>C</div> 16 <div id="div3" tabindex="0" aria-label="D"></div> 11 17 12 <!-- A generic focusable div should not get its accessible text from contents. --> 13 <div id="div" tabindex="0">B</div> 14 <div id="div2" tabindex="0"><div></div>C</div> 15 <div id="div3" tabindex="0" aria-label="D"></div> 18 <!-- A generic focusable div should not get accessible text from children that are focusable or containers. --> 19 <div id="div4" tabindex="0"><a href="#">Link</a></div> 20 <div id="div5" tabindex="0">Initial text before link<a href="#">Link</a></div> 21 <div id="div6" tabindex="0"><ul><li>List item</li></ul></div> 22 <div id="div7" tabindex="0">Initial text before list<ul><li>List item</li></ul></div> 23 </div> 16 24 17 <!-- A generic focusable div should not get accessible text from children that are focusable or containers. -->18 <div id="div4" tabindex="0"><a href="#">Link</a></div>19 <div id="div5" tabindex="0">Initial text before link<a href="#">Link</a></div>20 <div id="div6" tabindex="0"><ul><li>List item</li></ul></div>21 <div id="div7" tabindex="0">Initial text before list<ul><li>List item</li></ul></div>22 </div>23 <div id="console"></div>24 25 <script> 25 description("This test makes sure that a generic focusable div can get accessibility focus. It should not get accessible text from its children automatically though."); 26 27 if (window.testRunner && window.accessibilityController) { 28 window.testRunner.dumpAsText(); 26 description("This test makes sure that a generic focusable div can get accessibility focus. It should not get accessible text from its children automatically though."); 29 27 30 28 function lastChar(str) { … … 32 30 } 33 31 34 var link = document.getElementById('link'); 35 link.focus(); 36 shouldBe("document.activeElement == link", "true"); 37 window.axLink = accessibilityController.focusedElement; 38 shouldBe("lastChar(axLink.title)", "\"A\""); 32 async function waitForFocus(id) { 33 document.getElementById(id).focus(); 34 shouldBe("document.activeElement.id", `"${id}"`); 35 let axFocusedElement; 36 await waitFor(() => { 37 axFocusedElement = accessibilityController.focusedElement; 38 return axFocusedElement && axFocusedElement.domIdentifier === id; 39 }); 40 return axFocusedElement; 41 } 39 42 40 var div = document.getElementById('div'); 41 div.focus(); 42 shouldBe("document.activeElement == div", "true"); 43 window.axDiv = accessibilityController.focusedElement; 44 shouldBe("lastChar(axDiv.title)", "' '"); 43 if (window.accessibilityController) { 44 window.jsTestIsAsync = true; 45 45 46 var div2 = document.getElementById('div2'); 47 div2.focus(); 48 shouldBe("document.activeElement == div2", "true"); 49 window.axDiv2 = accessibilityController.focusedElement; 50 shouldBe("lastChar(axDiv2.title)", "' '"); 46 setTimeout(async function() { 47 window.axLink = await waitForFocus("link"); 48 shouldBe("lastChar(axLink.title)", "\"A\""); 51 49 52 var div3 = document.getElementById('div3'); 53 div3.focus(); 54 shouldBe("document.activeElement == div3", "true"); 55 window.axDiv3 = accessibilityController.focusedElement; 56 var accNameForDiv3 = platformValueForW3CName(axDiv3); 57 shouldBe("lastChar(accNameForDiv3)", "\"D\""); 50 window.axDiv = await waitForFocus("div"); 51 shouldBe("lastChar(axDiv.title)", "' '"); 58 52 59 var div4 = document.getElementById('div4'); 60 div4.focus(); 61 shouldBe("document.activeElement == div4", "true"); 62 window.axDiv4 = accessibilityController.focusedElement; 63 shouldBe("axDiv4.title.indexOf('Link')", "-1"); 53 window.axDiv2 = await waitForFocus("div2"); 54 shouldBe("lastChar(axDiv2.title)", "' '"); 64 55 65 var div5 = document.getElementById('div5'); 66 div5.focus(); 67 shouldBe("document.activeElement == div5", "true"); 68 window.axDiv5 = accessibilityController.focusedElement; 69 shouldBe("axDiv5.title.indexOf('Link')", "-1"); 70 shouldBe("axDiv5.title.indexOf('Initial text before link') >= 0", "false"); 56 window.accNameForDiv3 = platformValueForW3CName(await waitForFocus("div3")); 57 shouldBe("lastChar(accNameForDiv3)", "\"D\""); 71 58 72 var div6 = document.getElementById('div6'); 73 div6.focus(); 74 shouldBe("document.activeElement == div6", "true"); 75 window.axDiv6 = accessibilityController.focusedElement; 76 shouldBe("axDiv6.title.indexOf('List item')", "-1"); 59 window.axDiv4 = await waitForFocus("div4"); 60 shouldBe("axDiv4.title.indexOf('Link')", "-1"); 77 61 78 var div7 = document.getElementById('div7'); 79 div7.focus(); 80 shouldBe("document.activeElement == div7", "true"); 81 window.axDiv7 = accessibilityController.focusedElement; 82 shouldBe("axDiv7.title.indexOf('List item')", "-1"); 83 shouldBe("axDiv7.title.indexOf('Initial text before list') >= 0", "false"); 62 window.axDiv5 = await waitForFocus("div5"); 63 shouldBe("axDiv5.title.indexOf('Link')", "-1"); 64 shouldBe("axDiv5.title.indexOf('Initial text before link') >= 0", "false"); 84 65 85 document.getElementById("content").style.visibility = "hidden";86 } 66 window.axDiv6 = await waitForFocus("div6"); 67 shouldBe("axDiv6.title.indexOf('List item')", "-1"); 87 68 69 window.axDiv7 = await waitForFocus("div7"); 70 shouldBe("axDiv7.title.indexOf('List item')", "-1"); 71 shouldBe("axDiv7.title.indexOf('Initial text before list') >= 0", "false"); 72 73 document.getElementById("content").style.visibility = "hidden"; 74 75 finishJSTest(); 76 }, 0); 77 } 88 78 </script> 89 90 <script src="../resources/js-test-post.js"></script>91 79 </body> 92 80 </html> -
trunk/LayoutTests/accessibility/mac/css-speech-speak-expected.txt
r226432 r286948 13 13 14 14 15 PASS accessibilityController.focusedElement.childAtIndex(0).speakAs is 'normal' 16 PASS accessibilityController.focusedElement.childAtIndex(0).speakAs is 'normal' 17 PASS accessibilityController.focusedElement.childAtIndex(0).speakAs is 'spell-out' 18 PASS accessibilityController.focusedElement.childAtIndex(0).speakAs is 'normal, digits' 19 PASS accessibilityController.focusedElement.childAtIndex(0).speakAs is 'normal, literal-punctuation' 20 PASS accessibilityController.focusedElement.childAtIndex(0).speakAs is 'normal, no-punctuation' 21 PASS accessibilityController.focusedElement.childAtIndex(0).speakAs is 'normal, digits, literal-punctuation' 22 PASS accessibilityController.focusedElement.childAtIndex(0).speakAs is 'spell-out, literal-punctuation' 23 PASS accessibilityController.focusedElement.childAtIndex(0).speakAs is 'normal, digits' 15 Testing #initial 16 PASS element.childAtIndex(0).speakAs is "normal" 17 Testing #speech-normal 18 PASS element.childAtIndex(0).speakAs is "normal" 19 Testing #speech-spellout 20 PASS element.childAtIndex(0).speakAs is "spell-out" 21 Testing #speech-digits 22 PASS element.childAtIndex(0).speakAs is "normal, digits" 23 Testing #speech-literalpunc 24 PASS element.childAtIndex(0).speakAs is "normal, literal-punctuation" 25 Testing #speech-nopunc 26 PASS element.childAtIndex(0).speakAs is "normal, no-punctuation" 27 Testing #speech-digits-and-literal 28 PASS element.childAtIndex(0).speakAs is "normal, digits, literal-punctuation" 29 Testing #speech-spell-and-literal 30 PASS element.childAtIndex(0).speakAs is "spell-out, literal-punctuation" 31 Testing #testlink 32 PASS element.childAtIndex(0).speakAs is "normal, digits" 24 33 PASS successfullyParsed is true 25 34 -
trunk/LayoutTests/accessibility/mac/css-speech-speak.html
r226432 r286948 40 40 description("This tests that using the CSS3-speech property 'speak-as' works as from a WebCore level (not a platform level, that is up to the platforms)"); 41 41 42 var element; 43 function expectValueForId(id, expectedValue) { 44 debug(`Testing #${id}`) 45 element = accessibilityController.accessibleElementById(id); 46 shouldBe("element.childAtIndex(0).speakAs", `"${expectedValue}"`); 47 } 48 42 49 if (window.accessibilityController) { 43 44 document.getElementById("initial").focus(); 45 shouldBe("accessibilityController.focusedElement.childAtIndex(0).speakAs", "'normal'"); 46 47 document.getElementById("speech-normal").focus(); 48 shouldBe("accessibilityController.focusedElement.childAtIndex(0).speakAs", "'normal'"); 49 50 document.getElementById("speech-spellout").focus(); 51 shouldBe("accessibilityController.focusedElement.childAtIndex(0).speakAs", "'spell-out'"); 52 53 document.getElementById("speech-digits").focus(); 54 shouldBe("accessibilityController.focusedElement.childAtIndex(0).speakAs", "'normal, digits'"); 55 56 document.getElementById("speech-literalpunc").focus(); 57 shouldBe("accessibilityController.focusedElement.childAtIndex(0).speakAs", "'normal, literal-punctuation'"); 58 59 document.getElementById("speech-nopunc").focus(); 60 shouldBe("accessibilityController.focusedElement.childAtIndex(0).speakAs", "'normal, no-punctuation'"); 61 62 document.getElementById("speech-digits-and-literal").focus(); 63 shouldBe("accessibilityController.focusedElement.childAtIndex(0).speakAs", "'normal, digits, literal-punctuation'"); 64 65 document.getElementById("speech-spell-and-literal").focus(); 66 shouldBe("accessibilityController.focusedElement.childAtIndex(0).speakAs", "'spell-out, literal-punctuation'"); 67 68 document.getElementById("testlink").focus(); 69 shouldBe("accessibilityController.focusedElement.childAtIndex(0).speakAs", "'normal, digits'"); 50 expectValueForId("initial", "normal"); 51 expectValueForId("speech-normal", "normal"); 52 expectValueForId("speech-spellout", "spell-out"); 53 expectValueForId("speech-digits", "normal, digits"); 54 expectValueForId("speech-literalpunc", "normal, literal-punctuation"); 55 expectValueForId("speech-nopunc", "normal, no-punctuation"); 56 expectValueForId("speech-digits-and-literal", "normal, digits, literal-punctuation"); 57 expectValueForId("speech-spell-and-literal", "spell-out, literal-punctuation"); 58 expectValueForId("testlink", "normal, digits"); 70 59 } 71 60 -
trunk/LayoutTests/accessibility/mac/invalid-status-for-input-types-expected.txt
r267644 r286948 1 2 1 This tests that we are exposing correct invalid status for different types. 3 2 … … 5 4 6 5 7 PASS: AXInvalid is true. 8 PASS: AXInvalid is false. 9 PASS: AXInvalid is true. 10 PASS: AXInvalid is false. 11 PASS: AXInvalid is true. 12 PASS: AXInvalid is false. 6 Testing #number-input-valid 7 PASS input.stringAttributeValue('AXInvalid') is 'false' 8 Testing #url-input-invalid 9 PASS input.stringAttributeValue('AXInvalid') is 'true' 10 Testing #url-input-valid 11 PASS input.stringAttributeValue('AXInvalid') is 'false' 12 Testing #email-input-invalid 13 PASS input.stringAttributeValue('AXInvalid') is 'true' 14 Testing #email-input-valid 15 PASS input.stringAttributeValue('AXInvalid') is 'false' 16 Testing #number-input-invalid 17 PASS input.stringAttributeValue('AXInvalid') is 'true' 18 PASS successfullyParsed is true 13 19 20 TEST COMPLETE 21 -
trunk/LayoutTests/accessibility/mac/invalid-status-for-input-types.html
r207035 r286948 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 <div id="examples"> 9 <input class="ex" data-expected="true" type="number" value="abc"> 10 <input class="ex" data-expected="false" type="number" value="10"> 11 12 <input class="ex" data-expected="true" type="url" value="abc"> 13 <input class="ex" data-expected="false" type="url" value="http://abc.com"> 14 15 <input class="ex" data-expected="true" type="email" value="abc"> 16 <input class="ex" data-expected="false" type="email" value="abc@abc.com"> 17 </div> 9 <input id="number-input-invalid" type="number" value="abc"> 10 <input id="number-input-valid" type="number" value="10"> 18 11 19 <p id="description"></p> 20 <div id="console"></div> 12 <input id="url-input-invalid" type="url" value="abc"> 13 <input id="url-input-valid" type="url" value="http://abc.com"> 14 15 <input id="email-input-invalid" type="email" value="abc"> 16 <input id="email-input-valid" type="email" value="abc@abc.com"> 21 17 22 18 <script> 23 24 19 description("This tests that we are exposing correct invalid status for different types."); 25 20 26 function $(id){ 27 return document.getElementById(id); 28 } 29 30 var result = $('console'); 31 function verify(value, expectation, element) { 32 if (value === expectation) 33 result.innerText += "PASS: AXInvalid is " + value + ".\n"; 34 else 35 result.innerText += "FAIL: AXInvalid is " + value + ". Expected: " + expectation + ". " + (element ? element.outerHTML : "") + "\n"; 21 var input; 22 function expectAXInvalid(id, expectedValue) { 23 debug(`Testing #${id}`); 24 input = accessibilityController.accessibleElementById(id); 25 shouldBe("input.stringAttributeValue('AXInvalid')", `'${expectedValue}'`); 36 26 } 37 27 38 28 if (window.accessibilityController) { 29 window.jsTestIsAsync = true; 39 30 40 var examples = document.querySelectorAll(".ex"); 41 for (var i = 0, c = examples.length; i < c; i++) { 42 var el = examples[i]; 43 el.focus(); 44 if (i == 0) 45 eventSender.keyDown('a'); 46 var expectation = el.getAttribute("data-expected"); 47 var value = accessibilityController.focusedElement.stringAttributeValue('AXInvalid'); 48 verify(value, expectation, el); 49 } 31 expectAXInvalid("number-input-valid", false); 32 expectAXInvalid("url-input-invalid", true); 33 expectAXInvalid("url-input-valid", false); 34 expectAXInvalid("email-input-invalid", true); 35 expectAXInvalid("email-input-valid", false); 36 37 setTimeout(async function() { 38 // For <input type="number" value="abc"> inputs, we must explicitly send a non-number keystroke for it to be 39 // considered invalid at the HTMLInputElement level despite the `value` attribute clearly not being a valid number. 40 document.getElementById("number-input-invalid").focus(); 41 eventSender.keyDown("a"); 42 await waitFor(() => { 43 input = accessibilityController.accessibleElementById("number-input-invalid"); 44 return input && input.stringAttributeValue("AXInvalid") === "true"; 45 }); 46 expectAXInvalid("number-input-invalid", true); 47 48 finishJSTest(); 49 }, 0); 50 50 } 51 52 51 </script> 53 54 <script src="../resources/js-test-post.js"></script>55 52 </body> 56 53 </html> 54 -
trunk/LayoutTests/platform/glib/TestExpectations
r286926 r286948 307 307 # AccessibilityUIElement::isInCell(). 308 308 accessibility/ancestor-computation.html [ Skip ] 309 310 # Need to implement AccessibilityUIElement::domIdentifier() for this test to pass after webkit.org/b/234198. 311 accessibility/focusable-div.html [ Skip ] 309 312 310 313 webkit.org/b/212805 accessibility/svg-text.html [ Failure ] -
trunk/LayoutTests/platform/win/TestExpectations
r286923 r286948 1571 1571 [ Debug ] accessibility/element-haspopup.html [ Skip ] # Crash (Debug Assertion) 1572 1572 [ Debug ] accessibility/first-letter-text-transform-causes-crash.html [ Skip ] # Crash (Debug Assertion) 1573 webkit.org/b/140867 [ Debug ] accessibility/focusable-div.html [ Skip ] 1573 1574 # In addition to the issues raised in the associated bug, also need to implement 1575 # AccessibilityUIElement::domIdentifier() for this test to pass due to webkit.org/b/234198. 1576 webkit.org/b/140867 accessibility/focusable-div.html [ Skip ] 1577 1574 1578 [ Release ] accessibility/frame-disconnect-textmarker-cache-crash.html [ Failure ] 1575 1579 [ Debug ] accessibility/frame-disconnect-textmarker-cache-crash.html [ Skip ] # Crash (Debug Assertion)
Note:
See TracChangeset
for help on using the changeset viewer.