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

Side by Side Diff: third_party/WebKit/LayoutTests/accessibility/legend.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 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 <script src="../resources/accessibility-helper.js"></script> 5 <script src="../resources/accessibility-helper.js"></script>
6 </head> 6 </head>
7 <body id="body"> 7 <body id="body">
8 8
9 <fieldset> 9 <fieldset>
10 <legend>Choose a shipping method:</legend> 10 <legend>Choose a shipping method:</legend>
11 <input id="overnight" type="radio" name="shipping" value="overnight" />Overn ight 11 <input id="overnight" type="radio" name="shipping" value="overnight" />Overn ight
12 </fieldset> 12 </fieldset>
13 13
14 <div>End of test</div> 14 <div>End of test</div>
15 15
16 <p id="description"></p> 16 <p id="description"></p>
17 <div id="console"></div> 17 <div id="console"></div>
18 18
19 <script> 19 <script>
20 20
21 description("This tests that a fieldset's title ui element is the legend."); 21 description("This tests that a fieldset's title ui element is the legend.");
22 22
23 if (window.accessibilityController) { 23 if (window.accessibilityController) {
24 document.body.focus(); 24 document.body.focus();
25 var body = accessibilityController.focusedElement; 25 var body = accessibilityController.focusedElement;
26 var fieldset = body.childAtIndex(0); 26 var fieldset = body.childAtIndex(0);
27 var titleUIElement = fieldset.deprecatedTitleUIElement(); 27 var titleUIElement = fieldset.nameElementAtIndex(0);
28 28
29 // Print out the tree of accessible objects, indicating the titleUIEleme nt so 29 // Print out the tree of accessible objects, indicating the titleUIEleme nt so
30 // that each platform can verify their expected object has been found 30 // that each platform can verify their expected object has been found
31 buildAccessibilityTree(body, 0, 0, 0, titleUIElement, "<< fieldset's tit leUIElement"); 31 buildAccessibilityTree(body, 0, 0, 0, titleUIElement, "<< fieldset's tit leUIElement");
32 32
33 // Verify that we have gotten the titleUIElement and it has the expected text, 33 // Verify that we have gotten the titleUIElement and it has the expected text,
34 // which should be in the last descendant regardless of platform. 34 // which should be in the last descendant regardless of platform.
35 shouldBeTrue("titleUIElement != null"); 35 shouldBeTrue("titleUIElement != null");
36 var titleUIElementText = titleUIElement; 36 var titleUIElementText = titleUIElement;
37 while (titleUIElementText && titleUIElementText.childrenCount) 37 while (titleUIElementText && titleUIElementText.childrenCount)
38 titleUIElementText = titleUIElementText.childAtIndex(0); 38 titleUIElementText = titleUIElementText.childAtIndex(0);
39 39
40 shouldBe("titleUIElementText.stringValue", "'AXValue: Choose a shipping method:'"); 40 shouldBe("titleUIElementText.stringValue", "'AXValue: Choose a shipping method:'");
41 } 41 }
42 </script> 42 </script>
43 43
44 </body> 44 </body>
45 </html> 45 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698