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

Side by Side Diff: third_party/WebKit/LayoutTests/accessibility/canvas-description-and-role.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: Fix canvas-fallback-content-labels-expected.txt 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>canvas { display: inline; border: 1px solid #000; }</style> 6 <style>canvas { display: inline; border: 1px solid #000; }</style>
7 <!-- No whitespace between canvases on purpose, so there's the same 7 <!-- No whitespace between canvases on purpose, so there's the same
8 number of children of the container element on all platforms. --> 8 number of children of the container element on all platforms. -->
9 <div id="container" tabIndex=0 aria-label="Container"><canvas id="canvas1" w idth="100" height="100" aria-label="Canvas label">Fallback text</canvas><canvas id="canvas2" width="100" height="100"><button>Inner button</button></canvas><can vas id="canvas3-skipped" width="100" height="100"></canvas></div> 9 <div id="container" tabIndex=0 aria-label="Container"><canvas id="canvas1" w idth="100" height="100" aria-label="Canvas label">Fallback text</canvas><canvas id="canvas2" width="100" height="100"><button>Inner button</button></canvas><can vas id="canvas3-skipped" width="100" height="100"></canvas></div>
10 10
11 <div id="console"></div> 11 <div id="console"></div>
12 <script> 12 <script>
13 description("This test makes sure that a canvas with and without fallback conten t each has the right role and description.") 13 description("This test makes sure that a canvas with and without fallback conten t each has the right role and description.")
14 14
15 if (window.testRunner && window.accessibilityController) { 15 if (window.testRunner && window.accessibilityController) {
16 window.testRunner.dumpAsText(); 16 window.testRunner.dumpAsText();
17 17
18 document.getElementById('container').focus(); 18 document.getElementById('container').focus();
19 var axContainer = accessibilityController.focusedElement; 19 var axContainer = accessibilityController.focusedElement;
20 20
21 shouldBe("axContainer.childrenCount", "2"); 21 shouldBe("axContainer.childrenCount", "2");
22 22
23 var axCanvas1 = axContainer.childAtIndex(0); 23 var axCanvas1 = axContainer.childAtIndex(0);
24 debug('Canvas 1 description: ' + axCanvas1.deprecatedDescription); 24 debug('Canvas 1 description: ' + axCanvas1.name);
25 debug('Canvas 1 role: ' + axCanvas1.role); 25 debug('Canvas 1 role: ' + axCanvas1.role);
26 26
27 var axCanvas2 = axContainer.childAtIndex(1); 27 var axCanvas2 = axContainer.childAtIndex(1);
28 debug('Canvas 2 description: ' + axCanvas2.deprecatedDescription); 28 debug('Canvas 2 description: ' + axCanvas2.name);
29 debug('Canvas 2 role: ' + axCanvas2.role); 29 debug('Canvas 2 role: ' + axCanvas2.role);
30 } 30 }
31 31
32 </script> 32 </script>
33 33
34 </body> 34 </body>
35 </html> 35 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698