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

Side by Side Diff: third_party/WebKit/LayoutTests/accessibility/aria-text-role.html

Issue 1435113003: Make use of new AX name calc in Chromium. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix issue with ariaTextAlternative 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 PUBLIC "-//IETF//DTD HTML//EN"> 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../resources/js-test.js"></script> 4 <script src="../resources/js-test.js"></script>
5 </head> 5 </head>
6 <body id="body"> 6 <body id="body">
7 7
8 <div id="textrole" tabindex=0 role="text" aria-label="all at once"> 8 <div id="textrole" tabindex=0 role="text" aria-label="all at once">
9 <b>hello world</b> 9 <b>hello world</b>
10 <i>this is a test</i> 10 <i>this is a test</i>
11 <a href="#">more test</a> 11 <a href="#">more test</a>
12 </div> 12 </div>
13 13
14 <p id="description"></p> 14 <p id="description"></p>
15 <div id="console"></div> 15 <div id="console"></div>
16 16
17 <script> 17 <script>
18 18
19 description("This tests that you can set an ARIA text role and that it will not have children through hit testing"); 19 description("This tests that you can set an ARIA text role and that it will not have children through hit testing");
20 20
21 if (window.accessibilityController) { 21 if (window.accessibilityController) {
22 22
23 document.getElementById("textrole").focus(); 23 document.getElementById("textrole").focus();
24 var textrole = accessibilityController.focusedElement; 24 var textrole = accessibilityController.focusedElement;
25 shouldBe("textrole.role", "'AXRole: AXStaticText'"); 25 shouldBe("textrole.role", "'AXRole: AXStaticText'");
26 shouldBe("textrole.stringValue", "'AXValue: all at once'"); 26 shouldBe("textrole.name", "'all at once'");
27 27
28 // now check the hit-testing 28 // now check the hit-testing
29 var x = textrole.clickPointX; 29 var x = textrole.clickPointX;
30 var y = textrole.clickPointY; 30 var y = textrole.clickPointY;
31 shouldBe("textrole.elementAtPoint(x, y).isEqual(textrole)", "true"); 31 shouldBe("textrole.elementAtPoint(x, y).isEqual(textrole)", "true");
32 } 32 }
33 33
34 </script> 34 </script>
35 35
36 </body> 36 </body>
37 </html> 37 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698