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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/events/select-element.html

Issue 2100243002: Remove non-standardize key code names from event_sender. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix inspector tests that were missed by sed Created 4 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 <body> 5 <body>
6 <p>This test verifies that the Home/End/PageUp/PageDown keys work correctly for &lt;select&gt; elements. 6 <p>This test verifies that the Home/End/PageUp/PageDown keys work correctly for &lt;select&gt; elements.
7 Since it requires <CODE>eventSender.keyDown</CODE>, it will not run solo in the web browser; it must be run with <KBD>run-webkit-tests</KBD>.</p> 7 Since it requires <CODE>eventSender.keyDown</CODE>, it will not run solo in the web browser; it must be run with <KBD>run-webkit-tests</KBD>.</p>
8 <hr> 8 <hr>
9 <form> 9 <form>
10 <select name="singleselect" id="ss" size="4" multiple="true"> 10 <select name="singleselect" id="ss" size="4" multiple="true">
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 nowSelected = getSelectedIndices(select); 113 nowSelected = getSelectedIndices(select);
114 if (!equalArrays(nowSelected, expectedIndices)) { 114 if (!equalArrays(nowSelected, expectedIndices)) {
115 log('selected indices should be ' + dumpArray(expectedIndices) + ' (is ' + 115 log('selected indices should be ' + dumpArray(expectedIndices) + ' (is ' +
116 dumpArray(nowSelected) + ') after a ' + key); 116 dumpArray(nowSelected) + ') after a ' + key);
117 return false; 117 return false;
118 } 118 }
119 return true; 119 return true;
120 } 120 }
121 121
122 function testPageDownNoDisabledElements() { 122 function testPageDownNoDisabledElements() {
123 shouldBe('sendKeyAndExpectIndex("ss", "pageDown", 0, 3)', 'true'); 123 shouldBe('sendKeyAndExpectIndex("ss", "PageDown", 0, 3)', 'true');
124 shouldBe('sendKeyAndExpectIndex("ss", "pageDown", 1, 4)', 'true'); 124 shouldBe('sendKeyAndExpectIndex("ss", "PageDown", 1, 4)', 'true');
125 shouldBe('sendKeyAndExpectIndex("ss", "pageDown", 2, 5)', 'true'); 125 shouldBe('sendKeyAndExpectIndex("ss", "PageDown", 2, 5)', 'true');
126 shouldBe('sendKeyAndExpectIndex("ss", "pageDown", 3, 6)', 'true'); 126 shouldBe('sendKeyAndExpectIndex("ss", "PageDown", 3, 6)', 'true');
127 shouldBe('sendKeyAndExpectIndex("ss", "pageDown", 4, 6)', 'true'); 127 shouldBe('sendKeyAndExpectIndex("ss", "PageDown", 4, 6)', 'true');
128 shouldBe('sendKeyAndExpectIndex("ss", "pageDown", 5, 6)', 'true'); 128 shouldBe('sendKeyAndExpectIndex("ss", "PageDown", 5, 6)', 'true');
129 shouldBe('sendKeyAndExpectIndex("ss", "pageDown", 6, 6)', 'true'); 129 shouldBe('sendKeyAndExpectIndex("ss", "PageDown", 6, 6)', 'true');
130 } 130 }
131 131
132 function testPageUpNoDisabledElements() { 132 function testPageUpNoDisabledElements() {
133 shouldBe('sendKeyAndExpectIndex("ss", "pageUp", 6, 3)', 'true'); 133 shouldBe('sendKeyAndExpectIndex("ss", "PageUp", 6, 3)', 'true');
134 shouldBe('sendKeyAndExpectIndex("ss", "pageUp", 5, 2)', 'true'); 134 shouldBe('sendKeyAndExpectIndex("ss", "PageUp", 5, 2)', 'true');
135 shouldBe('sendKeyAndExpectIndex("ss", "pageUp", 4, 1)', 'true'); 135 shouldBe('sendKeyAndExpectIndex("ss", "PageUp", 4, 1)', 'true');
136 shouldBe('sendKeyAndExpectIndex("ss", "pageUp", 3, 0)', 'true'); 136 shouldBe('sendKeyAndExpectIndex("ss", "PageUp", 3, 0)', 'true');
137 shouldBe('sendKeyAndExpectIndex("ss", "pageUp", 2, 0)', 'true'); 137 shouldBe('sendKeyAndExpectIndex("ss", "PageUp", 2, 0)', 'true');
138 shouldBe('sendKeyAndExpectIndex("ss", "pageUp", 1, 0)', 'true'); 138 shouldBe('sendKeyAndExpectIndex("ss", "PageUp", 1, 0)', 'true');
139 shouldBe('sendKeyAndExpectIndex("ss", "pageUp", 0, 0)', 'true'); 139 shouldBe('sendKeyAndExpectIndex("ss", "PageUp", 0, 0)', 'true');
140 } 140 }
141 141
142 function testHomeNoDisabledElements() { 142 function testHomeNoDisabledElements() {
143 shouldBe('sendKeyAndExpectIndex("ss", "home", 6, 0)', 'true'); 143 shouldBe('sendKeyAndExpectIndex("ss", "Home", 6, 0)', 'true');
144 shouldBe('sendKeyAndExpectIndex("ss", "home", 5, 0)', 'true'); 144 shouldBe('sendKeyAndExpectIndex("ss", "Home", 5, 0)', 'true');
145 shouldBe('sendKeyAndExpectIndex("ss", "home", 4, 0)', 'true'); 145 shouldBe('sendKeyAndExpectIndex("ss", "Home", 4, 0)', 'true');
146 shouldBe('sendKeyAndExpectIndex("ss", "home", 3, 0)', 'true'); 146 shouldBe('sendKeyAndExpectIndex("ss", "Home", 3, 0)', 'true');
147 shouldBe('sendKeyAndExpectIndex("ss", "home", 2, 0)', 'true'); 147 shouldBe('sendKeyAndExpectIndex("ss", "Home", 2, 0)', 'true');
148 shouldBe('sendKeyAndExpectIndex("ss", "home", 1, 0)', 'true'); 148 shouldBe('sendKeyAndExpectIndex("ss", "Home", 1, 0)', 'true');
149 shouldBe('sendKeyAndExpectIndex("ss", "home", 0, 0)', 'true'); 149 shouldBe('sendKeyAndExpectIndex("ss", "Home", 0, 0)', 'true');
150 } 150 }
151 151
152 function testEndNoDisabledElements() { 152 function testEndNoDisabledElements() {
153 shouldBe('sendKeyAndExpectIndex("ss", "end", 6, 6)', 'true'); 153 shouldBe('sendKeyAndExpectIndex("ss", "End", 6, 6)', 'true');
154 shouldBe('sendKeyAndExpectIndex("ss", "end", 5, 6)', 'true'); 154 shouldBe('sendKeyAndExpectIndex("ss", "End", 5, 6)', 'true');
155 shouldBe('sendKeyAndExpectIndex("ss", "end", 4, 6)', 'true'); 155 shouldBe('sendKeyAndExpectIndex("ss", "End", 4, 6)', 'true');
156 shouldBe('sendKeyAndExpectIndex("ss", "end", 3, 6)', 'true'); 156 shouldBe('sendKeyAndExpectIndex("ss", "End", 3, 6)', 'true');
157 shouldBe('sendKeyAndExpectIndex("ss", "end", 2, 6)', 'true'); 157 shouldBe('sendKeyAndExpectIndex("ss", "End", 2, 6)', 'true');
158 shouldBe('sendKeyAndExpectIndex("ss", "end", 1, 6)', 'true'); 158 shouldBe('sendKeyAndExpectIndex("ss", "End", 1, 6)', 'true');
159 shouldBe('sendKeyAndExpectIndex("ss", "end", 0, 6)', 'true'); 159 shouldBe('sendKeyAndExpectIndex("ss", "End", 0, 6)', 'true');
160 } 160 }
161 161
162 function testPageDownWithDisabledElements() { 162 function testPageDownWithDisabledElements() {
163 shouldBe('sendKeyAndExpectIndex("ssd", "pageDown", 0, 4)', 'true'); 163 shouldBe('sendKeyAndExpectIndex("ssd", "PageDown", 0, 4)', 'true');
164 shouldBe('sendKeyAndExpectIndex("ssd", "pageDown", 1, 4)', 'true'); 164 shouldBe('sendKeyAndExpectIndex("ssd", "PageDown", 1, 4)', 'true');
165 shouldBe('sendKeyAndExpectIndex("ssd", "pageDown", 2, 5)', 'true'); 165 shouldBe('sendKeyAndExpectIndex("ssd", "PageDown", 2, 5)', 'true');
166 shouldBe('sendKeyAndExpectIndex("ssd", "pageDown", 4, 6)', 'true'); 166 shouldBe('sendKeyAndExpectIndex("ssd", "PageDown", 4, 6)', 'true');
167 shouldBe('sendKeyAndExpectIndex("ssd", "pageDown", 5, 6)', 'true'); 167 shouldBe('sendKeyAndExpectIndex("ssd", "PageDown", 5, 6)', 'true');
168 shouldBe('sendKeyAndExpectIndex("ssd", "pageDown", 6, 6)', 'true'); 168 shouldBe('sendKeyAndExpectIndex("ssd", "PageDown", 6, 6)', 'true');
169 shouldBe('sendKeyAndExpectIndex("ssd", "pageDown", 7, 6)', 'true'); 169 shouldBe('sendKeyAndExpectIndex("ssd", "PageDown", 7, 6)', 'true');
170 } 170 }
171 171
172 function testPageUpWithDisabledElements() { 172 function testPageUpWithDisabledElements() {
173 shouldBe('sendKeyAndExpectIndex("ssd", "pageUp", 7, 4)', 'true'); 173 shouldBe('sendKeyAndExpectIndex("ssd", "PageUp", 7, 4)', 'true');
174 shouldBe('sendKeyAndExpectIndex("ssd", "pageUp", 6, 2)', 'true'); 174 shouldBe('sendKeyAndExpectIndex("ssd", "PageUp", 6, 2)', 'true');
175 shouldBe('sendKeyAndExpectIndex("ssd", "pageUp", 5, 2)', 'true'); 175 shouldBe('sendKeyAndExpectIndex("ssd", "PageUp", 5, 2)', 'true');
176 shouldBe('sendKeyAndExpectIndex("ssd", "pageUp", 4, 1)', 'true'); 176 shouldBe('sendKeyAndExpectIndex("ssd", "PageUp", 4, 1)', 'true');
177 shouldBe('sendKeyAndExpectIndex("ssd", "pageUp", 2, 1)', 'true'); 177 shouldBe('sendKeyAndExpectIndex("ssd", "PageUp", 2, 1)', 'true');
178 shouldBe('sendKeyAndExpectIndex("ssd", "pageUp", 1, 1)', 'true'); 178 shouldBe('sendKeyAndExpectIndex("ssd", "PageUp", 1, 1)', 'true');
179 shouldBe('sendKeyAndExpectIndex("ssd", "pageUp", 0, 1)', 'true'); 179 shouldBe('sendKeyAndExpectIndex("ssd", "PageUp", 0, 1)', 'true');
180 } 180 }
181 181
182 function testHomeWithDisabledElements() { 182 function testHomeWithDisabledElements() {
183 shouldBe('sendKeyAndExpectIndex("ssd", "home", 7, 1)', 'true'); 183 shouldBe('sendKeyAndExpectIndex("ssd", "Home", 7, 1)', 'true');
184 shouldBe('sendKeyAndExpectIndex("ssd", "home", 6, 1)', 'true'); 184 shouldBe('sendKeyAndExpectIndex("ssd", "Home", 6, 1)', 'true');
185 shouldBe('sendKeyAndExpectIndex("ssd", "home", 5, 1)', 'true'); 185 shouldBe('sendKeyAndExpectIndex("ssd", "Home", 5, 1)', 'true');
186 shouldBe('sendKeyAndExpectIndex("ssd", "home", 4, 1)', 'true'); 186 shouldBe('sendKeyAndExpectIndex("ssd", "Home", 4, 1)', 'true');
187 shouldBe('sendKeyAndExpectIndex("ssd", "home", 3, 1)', 'true'); 187 shouldBe('sendKeyAndExpectIndex("ssd", "Home", 3, 1)', 'true');
188 shouldBe('sendKeyAndExpectIndex("ssd", "home", 2, 1)', 'true'); 188 shouldBe('sendKeyAndExpectIndex("ssd", "Home", 2, 1)', 'true');
189 shouldBe('sendKeyAndExpectIndex("ssd", "home", 1, 1)', 'true'); 189 shouldBe('sendKeyAndExpectIndex("ssd", "Home", 1, 1)', 'true');
190 shouldBe('sendKeyAndExpectIndex("ssd", "home", 0, 1)', 'true'); 190 shouldBe('sendKeyAndExpectIndex("ssd", "Home", 0, 1)', 'true');
191 } 191 }
192 192
193 function testEndWithDisabledElements() { 193 function testEndWithDisabledElements() {
194 shouldBe('sendKeyAndExpectIndex("ssd", "end", 7, 6)', 'true'); 194 shouldBe('sendKeyAndExpectIndex("ssd", "End", 7, 6)', 'true');
195 shouldBe('sendKeyAndExpectIndex("ssd", "end", 6, 6)', 'true'); 195 shouldBe('sendKeyAndExpectIndex("ssd", "End", 6, 6)', 'true');
196 shouldBe('sendKeyAndExpectIndex("ssd", "end", 5, 6)', 'true'); 196 shouldBe('sendKeyAndExpectIndex("ssd", "End", 5, 6)', 'true');
197 shouldBe('sendKeyAndExpectIndex("ssd", "end", 4, 6)', 'true'); 197 shouldBe('sendKeyAndExpectIndex("ssd", "End", 4, 6)', 'true');
198 shouldBe('sendKeyAndExpectIndex("ssd", "end", 3, 6)', 'true'); 198 shouldBe('sendKeyAndExpectIndex("ssd", "End", 3, 6)', 'true');
199 shouldBe('sendKeyAndExpectIndex("ssd", "end", 2, 6)', 'true'); 199 shouldBe('sendKeyAndExpectIndex("ssd", "End", 2, 6)', 'true');
200 shouldBe('sendKeyAndExpectIndex("ssd", "end", 1, 6)', 'true'); 200 shouldBe('sendKeyAndExpectIndex("ssd", "End", 1, 6)', 'true');
201 shouldBe('sendKeyAndExpectIndex("ssd", "end", 0, 6)', 'true'); 201 shouldBe('sendKeyAndExpectIndex("ssd", "End", 0, 6)', 'true');
202 } 202 }
203 203
204 function testVariousShiftKeysNoDisabledElements() { 204 function testVariousShiftKeysNoDisabledElements() {
205 var select = document.getElementById("ss"); 205 var select = document.getElementById("ss");
206 select.focus(); 206 select.focus();
207 clearSelection(select); 207 clearSelection(select);
208 select.selectedIndex = 0; 208 select.selectedIndex = 0;
209 209
210 shouldBe('sendWithShiftKeyAndExpectIndices("ss", "pageDown", [0, 1, 2, 3])', 'true'); 210 shouldBe('sendWithShiftKeyAndExpectIndices("ss", "PageDown", [0, 1, 2, 3])', 'true');
211 shouldBe('sendWithShiftKeyAndExpectIndices("ss", "pageDown", [0, 1, 2, 3, 4, 5, 6])', 'true'); 211 shouldBe('sendWithShiftKeyAndExpectIndices("ss", "PageDown", [0, 1, 2, 3, 4, 5, 6])', 'true');
212 shouldBe('sendWithShiftKeyAndExpectIndices("ss", "pageDown", [0, 1, 2, 3, 4, 5, 6])', 'true'); 212 shouldBe('sendWithShiftKeyAndExpectIndices("ss", "PageDown", [0, 1, 2, 3, 4, 5, 6])', 'true');
213 shouldBe('sendWithShiftKeyAndExpectIndices("ss", "pageUp", [0, 1, 2, 3])', ' true'); 213 shouldBe('sendWithShiftKeyAndExpectIndices("ss", "PageUp", [0, 1, 2, 3])', ' true');
214 shouldBe('sendWithShiftKeyAndExpectIndices("ss", "pageUp", [0])', 'true'); 214 shouldBe('sendWithShiftKeyAndExpectIndices("ss", "PageUp", [0])', 'true');
215 shouldBe('sendWithShiftKeyAndExpectIndices("ss", "pageUp", [0])', 'true'); 215 shouldBe('sendWithShiftKeyAndExpectIndices("ss", "PageUp", [0])', 'true');
216 shouldBe('sendWithShiftKeyAndExpectIndices("ss", "end", [0, 1, 2, 3, 4, 5, 6 ])', 'true'); 216 shouldBe('sendWithShiftKeyAndExpectIndices("ss", "End", [0, 1, 2, 3, 4, 5, 6 ])', 'true');
217 shouldBe('sendWithShiftKeyAndExpectIndices("ss", "end", [0, 1, 2, 3, 4, 5, 6 ])', 'true'); 217 shouldBe('sendWithShiftKeyAndExpectIndices("ss", "End", [0, 1, 2, 3, 4, 5, 6 ])', 'true');
218 shouldBe('sendWithShiftKeyAndExpectIndices("ss", "home", [0])', 'true'); 218 shouldBe('sendWithShiftKeyAndExpectIndices("ss", "Home", [0])', 'true');
219 shouldBe('sendWithShiftKeyAndExpectIndices("ss", "home", [0])', 'true'); 219 shouldBe('sendWithShiftKeyAndExpectIndices("ss", "Home", [0])', 'true');
220 220
221 clearSelection(select); 221 clearSelection(select);
222 select.selectedIndex = 3; 222 select.selectedIndex = 3;
223 shouldBe('sendWithShiftKeyAndExpectIndices("ss", "pageDown", [3, 4, 5, 6])', 'true'); 223 shouldBe('sendWithShiftKeyAndExpectIndices("ss", "PageDown", [3, 4, 5, 6])', 'true');
224 shouldBe('sendWithShiftKeyAndExpectIndices("ss", "pageDown", [3, 4, 5, 6])', 'true'); 224 shouldBe('sendWithShiftKeyAndExpectIndices("ss", "PageDown", [3, 4, 5, 6])', 'true');
225 shouldBe('sendWithShiftKeyAndExpectIndices("ss", "pageUp", [3])', 'true'); 225 shouldBe('sendWithShiftKeyAndExpectIndices("ss", "PageUp", [3])', 'true');
226 shouldBe('sendWithShiftKeyAndExpectIndices("ss", "pageUp", [0, 1, 2, 3])', ' true'); 226 shouldBe('sendWithShiftKeyAndExpectIndices("ss", "PageUp", [0, 1, 2, 3])', ' true');
227 shouldBe('sendWithShiftKeyAndExpectIndices("ss", "pageUp", [0, 1, 2, 3])', ' true'); 227 shouldBe('sendWithShiftKeyAndExpectIndices("ss", "PageUp", [0, 1, 2, 3])', ' true');
228 shouldBe('sendWithShiftKeyAndExpectIndices("ss", "pageUp", [0, 1, 2, 3])', ' true'); 228 shouldBe('sendWithShiftKeyAndExpectIndices("ss", "PageUp", [0, 1, 2, 3])', ' true');
229 shouldBe('sendWithShiftKeyAndExpectIndices("ss", "end", [3, 4, 5, 6])', 'tru e'); 229 shouldBe('sendWithShiftKeyAndExpectIndices("ss", "End", [3, 4, 5, 6])', 'tru e');
230 shouldBe('sendWithShiftKeyAndExpectIndices("ss", "end", [3, 4, 5, 6])', 'tru e'); 230 shouldBe('sendWithShiftKeyAndExpectIndices("ss", "End", [3, 4, 5, 6])', 'tru e');
231 shouldBe('sendWithShiftKeyAndExpectIndices("ss", "home", [0, 1, 2, 3])', 'tr ue'); 231 shouldBe('sendWithShiftKeyAndExpectIndices("ss", "Home", [0, 1, 2, 3])', 'tr ue');
232 shouldBe('sendWithShiftKeyAndExpectIndices("ss", "home", [0, 1, 2, 3])', 'tr ue'); 232 shouldBe('sendWithShiftKeyAndExpectIndices("ss", "Home", [0, 1, 2, 3])', 'tr ue');
233 } 233 }
234 234
235 function testVariousShiftKeysWithDisabledElements() { 235 function testVariousShiftKeysWithDisabledElements() {
236 var select = document.getElementById('ssd'); 236 var select = document.getElementById('ssd');
237 select.focus(); 237 select.focus();
238 clearSelection(select); 238 clearSelection(select);
239 select.selectedIndex = 1; 239 select.selectedIndex = 1;
240 240
241 shouldBe('sendWithShiftKeyAndExpectIndices("ssd", "pageDown", [1, 2, 4])', ' true'); 241 shouldBe('sendWithShiftKeyAndExpectIndices("ssd", "PageDown", [1, 2, 4])', ' true');
242 shouldBe('sendWithShiftKeyAndExpectIndices("ssd", "pageDown", [1, 2, 4, 5, 6 ])', 'true'); 242 shouldBe('sendWithShiftKeyAndExpectIndices("ssd", "PageDown", [1, 2, 4, 5, 6 ])', 'true');
243 shouldBe('sendWithShiftKeyAndExpectIndices("ssd", "pageDown", [1, 2, 4, 5, 6 ])', 'true'); 243 shouldBe('sendWithShiftKeyAndExpectIndices("ssd", "PageDown", [1, 2, 4, 5, 6 ])', 'true');
244 shouldBe('sendWithShiftKeyAndExpectIndices("ssd", "pageUp", [1, 2])', 'true' ); 244 shouldBe('sendWithShiftKeyAndExpectIndices("ssd", "PageUp", [1, 2])', 'true' );
245 shouldBe('sendWithShiftKeyAndExpectIndices("ssd", "pageUp", [1])', 'true'); 245 shouldBe('sendWithShiftKeyAndExpectIndices("ssd", "PageUp", [1])', 'true');
246 shouldBe('sendWithShiftKeyAndExpectIndices("ssd", "pageUp", [1])', 'true'); 246 shouldBe('sendWithShiftKeyAndExpectIndices("ssd", "PageUp", [1])', 'true');
247 shouldBe('sendWithShiftKeyAndExpectIndices("ssd", "end", [1, 2, 4, 5, 6])', 'true'); 247 shouldBe('sendWithShiftKeyAndExpectIndices("ssd", "End", [1, 2, 4, 5, 6])', 'true');
248 shouldBe('sendWithShiftKeyAndExpectIndices("ssd", "end", [1, 2, 4, 5, 6])', 'true'); 248 shouldBe('sendWithShiftKeyAndExpectIndices("ssd", "End", [1, 2, 4, 5, 6])', 'true');
249 shouldBe('sendWithShiftKeyAndExpectIndices("ssd", "home", [1])', 'true'); 249 shouldBe('sendWithShiftKeyAndExpectIndices("ssd", "Home", [1])', 'true');
250 shouldBe('sendWithShiftKeyAndExpectIndices("ssd", "home", [1])', 'true'); 250 shouldBe('sendWithShiftKeyAndExpectIndices("ssd", "Home", [1])', 'true');
251 251
252 clearSelection(select); 252 clearSelection(select);
253 select.selectedIndex = 4; 253 select.selectedIndex = 4;
254 shouldBe('sendWithShiftKeyAndExpectIndices("ssd", "pageDown", [4, 5, 6])', ' true'); 254 shouldBe('sendWithShiftKeyAndExpectIndices("ssd", "PageDown", [4, 5, 6])', ' true');
255 shouldBe('sendWithShiftKeyAndExpectIndices("ssd", "pageDown", [4, 5, 6])', ' true'); 255 shouldBe('sendWithShiftKeyAndExpectIndices("ssd", "PageDown", [4, 5, 6])', ' true');
256 shouldBe('sendWithShiftKeyAndExpectIndices("ssd", "pageUp", [2, 4])', 'true' ); 256 shouldBe('sendWithShiftKeyAndExpectIndices("ssd", "PageUp", [2, 4])', 'true' );
257 shouldBe('sendWithShiftKeyAndExpectIndices("ssd", "pageUp", [1, 2, 4])', 'tr ue'); 257 shouldBe('sendWithShiftKeyAndExpectIndices("ssd", "PageUp", [1, 2, 4])', 'tr ue');
258 shouldBe('sendWithShiftKeyAndExpectIndices("ssd", "pageUp", [1, 2, 4])', 'tr ue'); 258 shouldBe('sendWithShiftKeyAndExpectIndices("ssd", "PageUp", [1, 2, 4])', 'tr ue');
259 shouldBe('sendWithShiftKeyAndExpectIndices("ssd", "end", [4, 5, 6])', 'true' ); 259 shouldBe('sendWithShiftKeyAndExpectIndices("ssd", "End", [4, 5, 6])', 'true' );
260 shouldBe('sendWithShiftKeyAndExpectIndices("ssd", "end", [4, 5, 6])', 'true' ); 260 shouldBe('sendWithShiftKeyAndExpectIndices("ssd", "End", [4, 5, 6])', 'true' );
261 shouldBe('sendWithShiftKeyAndExpectIndices("ssd", "home", [1, 2, 4])', 'true '); 261 shouldBe('sendWithShiftKeyAndExpectIndices("ssd", "Home", [1, 2, 4])', 'true ');
262 shouldBe('sendWithShiftKeyAndExpectIndices("ssd", "home", [1, 2, 4])', 'true '); 262 shouldBe('sendWithShiftKeyAndExpectIndices("ssd", "Home", [1, 2, 4])', 'true ');
263 } 263 }
264 264
265 function testPageDownWithGroup() { 265 function testPageDownWithGroup() {
266 shouldBe('sendKeyAndExpectIndex("ssg", "pageDown", 0, 3)', 'true'); 266 shouldBe('sendKeyAndExpectIndex("ssg", "PageDown", 0, 3)', 'true');
267 shouldBe('sendKeyAndExpectIndex("ssg", "pageDown", 1, 3)', 'true'); 267 shouldBe('sendKeyAndExpectIndex("ssg", "PageDown", 1, 3)', 'true');
268 shouldBe('sendKeyAndExpectIndex("ssg", "pageDown", 2, 4)', 'true'); 268 shouldBe('sendKeyAndExpectIndex("ssg", "PageDown", 2, 4)', 'true');
269 shouldBe('sendKeyAndExpectIndex("ssg", "pageDown", 3, 5)', 'true'); 269 shouldBe('sendKeyAndExpectIndex("ssg", "PageDown", 3, 5)', 'true');
270 shouldBe('sendKeyAndExpectIndex("ssg", "pageDown", 4, 6)', 'true'); 270 shouldBe('sendKeyAndExpectIndex("ssg", "PageDown", 4, 6)', 'true');
271 shouldBe('sendKeyAndExpectIndex("ssg", "pageDown", 5, 6)', 'true'); 271 shouldBe('sendKeyAndExpectIndex("ssg", "PageDown", 5, 6)', 'true');
272 shouldBe('sendKeyAndExpectIndex("ssg", "pageDown", 6, 6)', 'true'); 272 shouldBe('sendKeyAndExpectIndex("ssg", "PageDown", 6, 6)', 'true');
273 } 273 }
274 274
275 function testPageUpWithGroup() { 275 function testPageUpWithGroup() {
276 shouldBe('sendKeyAndExpectIndex("ssg", "pageUp", 6, 4)', 'true'); 276 shouldBe('sendKeyAndExpectIndex("ssg", "PageUp", 6, 4)', 'true');
277 shouldBe('sendKeyAndExpectIndex("ssg", "pageUp", 5, 3)', 'true'); 277 shouldBe('sendKeyAndExpectIndex("ssg", "PageUp", 5, 3)', 'true');
278 shouldBe('sendKeyAndExpectIndex("ssg", "pageUp", 4, 2)', 'true'); 278 shouldBe('sendKeyAndExpectIndex("ssg", "PageUp", 4, 2)', 'true');
279 shouldBe('sendKeyAndExpectIndex("ssg", "pageUp", 3, 1)', 'true'); 279 shouldBe('sendKeyAndExpectIndex("ssg", "PageUp", 3, 1)', 'true');
280 shouldBe('sendKeyAndExpectIndex("ssg", "pageUp", 2, 0)', 'true'); 280 shouldBe('sendKeyAndExpectIndex("ssg", "PageUp", 2, 0)', 'true');
281 shouldBe('sendKeyAndExpectIndex("ssg", "pageUp", 1, 0)', 'true'); 281 shouldBe('sendKeyAndExpectIndex("ssg", "PageUp", 1, 0)', 'true');
282 shouldBe('sendKeyAndExpectIndex("ssg", "pageUp", 0, 0)', 'true'); 282 shouldBe('sendKeyAndExpectIndex("ssg", "PageUp", 0, 0)', 'true');
283 } 283 }
284 284
285 testPageDownNoDisabledElements(); 285 testPageDownNoDisabledElements();
286 testPageUpNoDisabledElements(); 286 testPageUpNoDisabledElements();
287 testHomeNoDisabledElements(); 287 testHomeNoDisabledElements();
288 testEndNoDisabledElements(); 288 testEndNoDisabledElements();
289 testPageDownWithDisabledElements(); 289 testPageDownWithDisabledElements();
290 testPageUpWithDisabledElements(); 290 testPageUpWithDisabledElements();
291 testHomeWithDisabledElements(); 291 testHomeWithDisabledElements();
292 testEndWithDisabledElements(); 292 testEndWithDisabledElements();
293 testVariousShiftKeysNoDisabledElements(); 293 testVariousShiftKeysNoDisabledElements();
294 testVariousShiftKeysWithDisabledElements(); 294 testVariousShiftKeysWithDisabledElements();
295 testPageDownWithGroup(); 295 testPageDownWithGroup();
296 testPageUpWithGroup(); 296 testPageUpWithGroup();
297 </script> 297 </script>
298 298
299 </body> 299 </body>
300 </html> 300 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698