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

Side by Side Diff: third_party/WebKit/LayoutTests/accessibility/button-title-uses-inner-img-alt.html

Issue 1417213006: Switch all LayoutTests to use new AX name calculation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: refactor stringValueOfControl Created 5 years, 1 month 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 <style> 6 <style>
7 button { 7 button {
8 padding: 30px; 8 padding: 30px;
9 } 9 }
10 </style> 10 </style>
11 11
12 <button id="cake">Button with image of <img alt="cake" src="resources/cake.png" width="40px"></button> 12 <button id="cake">Button with image of <img alt="cake" src="resources/cake.png" width="40px"></button>
13 13
14 <div id="console"></div> 14 <div id="console"></div>
15 <script> 15 <script>
16 description("This test makes sure that a generic focusable div can get accessibi lity focus and gets its accessible text from contents.."); 16 description("This test makes sure that a generic focusable div can get accessibi lity focus and gets its accessible text from contents..");
17 17
18 if (window.testRunner && window.accessibilityController) { 18 if (window.testRunner && window.accessibilityController) {
19 window.testRunner.dumpAsText(); 19 window.testRunner.dumpAsText();
20 20
21 var button = document.getElementById('cake'); 21 var button = document.getElementById('cake');
22 button.focus(); 22 button.focus();
23 shouldBe("document.activeElement == button", "true"); 23 shouldBe("document.activeElement == button", "true");
24 window.axButton = accessibilityController.focusedElement; 24 window.axButton = accessibilityController.focusedElement;
25 shouldBe("axButton.deprecatedTitle.indexOf('Button with image of cake') >= 0 ", "true"); 25 shouldBe("axButton.name.indexOf('Button with image of cake') >= 0", "true");
26 } 26 }
27 27
28 </script> 28 </script>
29 29
30 </body> 30 </body>
31 </html> 31 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698