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

Side by Side Diff: LayoutTests/accessibility/radio-button-title-label.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, 5 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 <html> 1 <html>
2 <head> 2 <head>
3 <script src="../resources/js-test.js"></script> 3 <script src="../resources/js-test.js"></script>
4 </head> 4 </head>
5 <script> 5 <script>
6 if (window.testRunner) 6 if (window.testRunner)
7 testRunner.dumpAsText(); 7 testRunner.dumpAsText();
8 </script> 8 </script>
9 <body> 9 <body>
10 10
(...skipping 14 matching lines...) Expand all
25 25
26 description("This test checks that radio buttons expose title ui element s correctly under a variety of cirmcumstances. In general, the <label> should di sappear and act as the title for the radio button."); 26 description("This test checks that radio buttons expose title ui element s correctly under a variety of cirmcumstances. In general, the <label> should di sappear and act as the title for the radio button.");
27 27
28 if (window.accessibilityController) { 28 if (window.accessibilityController) {
29 29
30 // radio button 1 30 // radio button 1
31 document.getElementById("r1").focus(); 31 document.getElementById("r1").focus();
32 32
33 // 1) Even though a checkbox has a title attribute, the title ui ele ment should still be exposed. 33 // 1) Even though a checkbox has a title attribute, the title ui ele ment should still be exposed.
34 var focusedElement = accessibilityController.focusedElement; 34 var focusedElement = accessibilityController.focusedElement;
35 var titleUIElement = focusedElement.titleUIElement(); 35 var titleUIElement = focusedElement.deprecatedTitleUIElement();
36 shouldBe("focusedElement.title", "'AXTitle: LABEL'"); 36 shouldBe("focusedElement.deprecatedTitle", "'AXTitle: LABEL'");
37 shouldBeTrue("!titleUIElement || titleUIElement.title == 'AXTitle: ' "); 37 shouldBeTrue("!titleUIElement || titleUIElement.deprecatedTitle == ' AXTitle: '");
38 38
39 // 2) aria-labeledby should override the native label semantics and return a title for the radio button, instead of a title ui element. 39 // 2) aria-labeledby should override the native label semantics and return a title for the radio button, instead of a title ui element.
40 document.getElementById("r2").focus(); 40 document.getElementById("r2").focus();
41 focusedElement = accessibilityController.focusedElement; 41 focusedElement = accessibilityController.focusedElement;
42 titleUIElement = focusedElement.titleUIElement(); 42 titleUIElement = focusedElement.deprecatedTitleUIElement();
43 shouldBe("focusedElement.description", "'AXDescription: LABEL2a'"); 43 shouldBe("focusedElement.deprecatedDescription", "'AXDescription: LA BEL2a'");
44 shouldBe("focusedElement.title", "'AXTitle: '"); 44 shouldBe("focusedElement.deprecatedTitle", "'AXTitle: '");
45 shouldBeTrue("!titleUIElement || titleUIElement.title == 'AXTitle: ' "); 45 shouldBeTrue("!titleUIElement || titleUIElement.deprecatedTitle == ' AXTitle: '");
46 46
47 // 3) If a radio button has an aria-label and a <label>, the aria-la bel should be the title. 47 // 3) If a radio button has an aria-label and a <label>, the aria-la bel should be the title.
48 document.getElementById("r3").focus(); 48 document.getElementById("r3").focus();
49 focusedElement = accessibilityController.focusedElement; 49 focusedElement = accessibilityController.focusedElement;
50 titleUIElement = focusedElement.titleUIElement(); 50 titleUIElement = focusedElement.deprecatedTitleUIElement();
51 shouldBe("focusedElement.description", "'AXDescription: radio3'"); 51 shouldBe("focusedElement.deprecatedDescription", "'AXDescription: ra dio3'");
52 shouldBe("focusedElement.title", "'AXTitle: '"); 52 shouldBe("focusedElement.deprecatedTitle", "'AXTitle: '");
53 shouldBeTrue("!titleUIElement || titleUIElement.title == 'AXTitle: ' "); 53 shouldBeTrue("!titleUIElement || titleUIElement.deprecatedTitle == ' AXTitle: '");
54 54
55 } 55 }
56 </script> 56 </script>
57 57
58 58
59 </body> 59 </body>
60 </html> 60 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698