Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(398)

Side by Side Diff: LayoutTests/accessibility/focusable-div.html

Issue 1086753004: Switch LayoutTests to use renamed methods for deprecated text alternatives (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Re-add linux expectation Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 <!DOCTYPE HTML> 1 <!DOCTYPE HTML>
2 <html> 2 <html>
3 <body> 3 <body>
4 <script src="../resources/js-test.js"></script> 4 <script src="../resources/js-test.js"></script>
5 5
6 <!-- A link always gets its accessible text from contents. --> 6 <!-- A link always gets its accessible text from contents. -->
7 <a id="link" href="#">A</a> 7 <a id="link" href="#">A</a>
8 8
9 <!-- A generic focusable div should also get its accessible text from contents. --> 9 <!-- A generic focusable div should also get its accessible text from contents. -->
10 <div id="div" tabindex="0">B</div> 10 <div id="div" tabindex="0">B</div>
(...skipping 14 matching lines...) Expand all
25 window.testRunner.dumpAsText(); 25 window.testRunner.dumpAsText();
26 26
27 function lastChar(str) { 27 function lastChar(str) {
28 return str.substr(str.length - 1); 28 return str.substr(str.length - 1);
29 } 29 }
30 30
31 var link = document.getElementById('link'); 31 var link = document.getElementById('link');
32 link.focus(); 32 link.focus();
33 shouldBe("document.activeElement == link", "true"); 33 shouldBe("document.activeElement == link", "true");
34 window.axLink = accessibilityController.focusedElement; 34 window.axLink = accessibilityController.focusedElement;
35 shouldBe("lastChar(axLink.title)", "\"A\""); 35 shouldBe("lastChar(axLink.deprecatedTitle)", "\"A\"");
36 36
37 var div = document.getElementById('div'); 37 var div = document.getElementById('div');
38 div.focus(); 38 div.focus();
39 shouldBe("document.activeElement == div", "true"); 39 shouldBe("document.activeElement == div", "true");
40 window.axDiv = accessibilityController.focusedElement; 40 window.axDiv = accessibilityController.focusedElement;
41 shouldBe("lastChar(axDiv.title)", "\"B\""); 41 shouldBe("lastChar(axDiv.deprecatedTitle)", "\"B\"");
42 42
43 var div2 = document.getElementById('div2'); 43 var div2 = document.getElementById('div2');
44 div2.focus(); 44 div2.focus();
45 shouldBe("document.activeElement == div2", "true"); 45 shouldBe("document.activeElement == div2", "true");
46 window.axDiv2 = accessibilityController.focusedElement; 46 window.axDiv2 = accessibilityController.focusedElement;
47 shouldBe("lastChar(axDiv2.title)", "\"C\""); 47 shouldBe("lastChar(axDiv2.deprecatedTitle)", "\"C\"");
48 48
49 var div3 = document.getElementById('div3'); 49 var div3 = document.getElementById('div3');
50 div3.focus(); 50 div3.focus();
51 shouldBe("document.activeElement == div3", "true"); 51 shouldBe("document.activeElement == div3", "true");
52 window.axDiv3 = accessibilityController.focusedElement; 52 window.axDiv3 = accessibilityController.focusedElement;
53 shouldBe("lastChar(axDiv3.description)", "\"D\""); 53 shouldBe("lastChar(axDiv3.deprecatedDescription)", "\"D\"");
54 54
55 var div4 = document.getElementById('div4'); 55 var div4 = document.getElementById('div4');
56 div4.focus(); 56 div4.focus();
57 shouldBe("document.activeElement == div4", "true"); 57 shouldBe("document.activeElement == div4", "true");
58 window.axDiv4 = accessibilityController.focusedElement; 58 window.axDiv4 = accessibilityController.focusedElement;
59 shouldBe("axDiv4.title.indexOf('Link')", "-1"); 59 shouldBe("axDiv4.deprecatedTitle.indexOf('Link')", "-1");
60 60
61 var div5 = document.getElementById('div5'); 61 var div5 = document.getElementById('div5');
62 div5.focus(); 62 div5.focus();
63 shouldBe("document.activeElement == div5", "true"); 63 shouldBe("document.activeElement == div5", "true");
64 window.axDiv5 = accessibilityController.focusedElement; 64 window.axDiv5 = accessibilityController.focusedElement;
65 shouldBe("axDiv5.title.indexOf('Link')", "-1"); 65 shouldBe("axDiv5.deprecatedTitle.indexOf('Link')", "-1");
66 shouldBe("axDiv5.title.indexOf('Initial text before link') >= 0", "true"); 66 shouldBe("axDiv5.deprecatedTitle.indexOf('Initial text before link') >= 0", "true");
67 67
68 var div6 = document.getElementById('div6'); 68 var div6 = document.getElementById('div6');
69 div6.focus(); 69 div6.focus();
70 shouldBe("document.activeElement == div6", "true"); 70 shouldBe("document.activeElement == div6", "true");
71 window.axDiv6 = accessibilityController.focusedElement; 71 window.axDiv6 = accessibilityController.focusedElement;
72 shouldBe("axDiv6.title.indexOf('List item')", "-1"); 72 shouldBe("axDiv6.deprecatedTitle.indexOf('List item')", "-1");
73 73
74 var div7 = document.getElementById('div7'); 74 var div7 = document.getElementById('div7');
75 div7.focus(); 75 div7.focus();
76 shouldBe("document.activeElement == div7", "true"); 76 shouldBe("document.activeElement == div7", "true");
77 window.axDiv7 = accessibilityController.focusedElement; 77 window.axDiv7 = accessibilityController.focusedElement;
78 shouldBe("axDiv7.title.indexOf('List item')", "-1"); 78 shouldBe("axDiv7.deprecatedTitle.indexOf('List item')", "-1");
79 shouldBe("axDiv7.title.indexOf('Initial text before list') >= 0", "true"); 79 shouldBe("axDiv7.deprecatedTitle.indexOf('Initial text before list') >= 0", "true");
80 } 80 }
81 81
82 </script> 82 </script>
83 83
84 </body> 84 </body>
85 </html> 85 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698