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

Side by Side Diff: LayoutTests/accessibility/aria-orientation.html

Issue 1346733002: Added layout test for aria-orientation and cleaned up code. Also exposed hr element with an orienta… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 3 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
« no previous file with comments | « no previous file | LayoutTests/accessibility/aria-orientation-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src="../resources/js-test.js"></script>
3
4 <div id="slider1" role="slider"
5 aria-valuemin="0" aria-valuemax="100" aria-valuenow="50">
6 50
7 </div>
8 <div id="slider2" role="slider" aria-orientation="vertical"
9 aria-valuemin="0" aria-valuemax="100" aria-valuenow="50">
10 50
11 </div>
12 <div id="slider3" role="slider" aria-orientation="horizontal"
13 aria-valuemin="0" aria-valuemax="100" aria-valuenow="50">
14 50
15 </div>
16 <div id="scrollbar1" role="scrollbar"
17 aria-valuemin="0" aria-valuemax="100" aria-valuenow="50">
18 50
19 </div>
20 <div id="scrollbar2" role="scrollbar" aria-orientation="vertical"
21 aria-valuemin="0" aria-valuemax="100" aria-valuenow="50">
22 50
23 </div>
24 <div id="scrollbar3" role="scrollbar" aria-orientation="horizontal"
25 aria-valuemin="0" aria-valuemax="100" aria-valuenow="50">
26 50
27 </div>
28 <div id="separator1" role="separator">
29 </div>
30 <div id="separator2" role="separator" aria-orientation="vertical">
31 </div>
32 <div id="separator3" role="separator" aria-orientation="horizontal">
33 </div>
34 <!-- TODO(nektar): Expose hr element. -->
35 <hr id="separator4">
36
37 <!-- Default orientation should be exposed as defined by the ARIA Spec. -->
38 <div id="toolbar1" role="toolbar"></div>
39 <div id="toolbar2" role="toolbar" aria-orientation="vertical"></div>
40 <div id="toolbar3" role="toolbar" aria-orientation="horizontal"></div>
41 <div id="radiogroup1" role="radiogroup">
42 <span role="radio">Radio button.</span>
43 </div>
44 <div id="radiogroup2" role="radiogroup" aria-orientation="vertical">
45 <span role="radio">Radio button.</span>
46 </div>
47 <div id="radiogroup3" role="radiogroup" aria-orientation="horizontal">
48 <span role="radio">Radio button.</span>
49 </div>
50
51 <script>
52 description("This tests that aria-orientation is reported correctly.");
53
54 if (window.accessibilityController) {
55
56 for (var i = 1; i < 4; ++i) {
57 var sliderId = "slider" + i;
58 var slider = accessibilityController.accessibleElementById(
59 sliderId);
60 if (i == 1 || i == 3)
dmazzoni 2015/09/15 22:43:01 How about if the intended orientation is just an a
61 shouldBe("slider.orientation",
62 "'AXOrientation: AXHorizontalOrientation'");
63 else if (i == 2)
64 shouldBe("slider.orientation",
65 "'AXOrientation: AXVerticalOrientation'");
66 }
67
68 for (var i = 1; i < 4; ++i) {
69 var scrollbarId = "scrollbar" + i;
70 var scrollbar = accessibilityController.accessibleElementById(
71 scrollbarId);
72 if (i == 1 || i == 2)
73 shouldBe("scrollbar.orientation",
74 "'AXOrientation: AXVerticalOrientation'");
75 else if (i == 3)
76 shouldBe("scrollbar.orientation",
77 "'AXOrientation: AXHorizontalOrientation'");
78 }
79
80 for (var i = 1; i < 4; ++i) {
81 var separatorId = "separator" + i;
82 var separator = accessibilityController.accessibleElementById(
83 separatorId);
84 if (i == 1 || i == 3 || i == 4)
85 shouldBe("separator.orientation",
86 "'AXOrientation: AXHorizontalOrientation'");
87 else if (i == 2)
88 shouldBe("separator.orientation",
89 "'AXOrientation: AXVerticalOrientation'");
90 }
91
92 for (var i = 1; i < 4; ++i) {
93 var toolbarId = "toolbar" + i;
94 var toolbar = accessibilityController.accessibleElementById(
95 toolbarId);
96 if (i == 1 || i == 3)
97 shouldBe("toolbar.orientation",
98 "'AXOrientation: AXHorizontalOrientation'");
99 else if (i == 2)
100 shouldBe("toolbar.orientation",
101 "'AXOrientation: AXVerticalOrientation'");
102 }
103
104 for (var i = 1; i < 4; ++i) {
105 var radioGroupId = "radiogroup" + i;
106 var radioGroup = accessibilityController.accessibleElementById(
107 radioGroupId);
108 shouldBe("radioGroup.orientation", "''");
109 }
110
111 }
112 </script>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/accessibility/aria-orientation-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698