OLD | NEW |
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <stddef.h> | 5 #include <stddef.h> |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 | 144 |
145 { | 145 { |
146 base::ThreadRestrictions::ScopedAllowIO allow_io_for_test_verification; | 146 base::ThreadRestrictions::ScopedAllowIO allow_io_for_test_verification; |
147 ASSERT_TRUE(base::PathExists(test_path)) << test_path.LossyDisplayName(); | 147 ASSERT_TRUE(base::PathExists(test_path)) << test_path.LossyDisplayName(); |
148 } | 148 } |
149 | 149 |
150 base::FilePath event_file = test_path.Append(base::FilePath(file_path)); | 150 base::FilePath event_file = test_path.Append(base::FilePath(file_path)); |
151 RunTest(event_file, "accessibility/event"); | 151 RunTest(event_file, "accessibility/event"); |
152 } | 152 } |
153 | 153 |
154 // TODO(dmazzoni): port these tests to run on all platforms. | |
155 #if defined(OS_WIN) || defined(OS_MACOSX) | |
156 | |
157 // This is tasteless, but then so's the snippet it's replacing. | |
158 #if defined(OS_WIN) | |
159 #define DISABLED_ON_WIN(name) DISABLED_ ## name | |
160 #else | |
161 #define DISABLED_ON_WIN(name) name | |
162 #endif | |
163 | |
164 #if defined(OS_MACOSX) | |
165 #define DISABLED_ON_MAC(name) DISABLED_##name | |
166 #else | |
167 #define DISABLED_ON_MAC(name) name | |
168 #endif | |
169 | |
170 #if defined(OS_WIN) || defined(OS_MACOSX) | |
171 #define DISABLED_ON_WIN_AND_MAC(name) DISABLED_ ## name | |
172 #else | |
173 #define DISABLED_ON_WIN_AND_MAC(name) name | |
174 #endif | |
175 | |
176 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, | 154 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, |
177 AccessibilityEventsAriaComboBoxCollapse) { | 155 AccessibilityEventsAriaComboBoxCollapse) { |
178 RunEventTest(FILE_PATH_LITERAL("aria-combo-box-collapse.html")); | 156 RunEventTest(FILE_PATH_LITERAL("aria-combo-box-collapse.html")); |
179 } | 157 } |
180 | 158 |
181 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, | 159 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, |
182 AccessibilityEventsAriaComboBoxExpand) { | 160 AccessibilityEventsAriaComboBoxExpand) { |
183 RunEventTest(FILE_PATH_LITERAL("aria-combo-box-expand.html")); | 161 RunEventTest(FILE_PATH_LITERAL("aria-combo-box-expand.html")); |
184 } | 162 } |
185 | 163 |
186 // https://crbug.com/719030 | |
187 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, | 164 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, |
188 DISABLED_ON_WIN_AND_MAC(AccessibilityEventsAriaComboBoxFocus)) { | 165 AccessibilityEventsAriaTreeCollapse) { |
| 166 RunEventTest(FILE_PATH_LITERAL("aria-tree-collapse.html")); |
| 167 } |
| 168 |
| 169 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, |
| 170 AccessibilityEventsAriaTreeExpand) { |
| 171 RunEventTest(FILE_PATH_LITERAL("aria-tree-expand.html")); |
| 172 } |
| 173 |
| 174 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, |
| 175 AccessibilityEventsAriaTreeItemFocus) { |
| 176 RunEventTest(FILE_PATH_LITERAL("aria-treeitem-focus.html")); |
| 177 } |
| 178 |
| 179 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, |
| 180 AccessibilityEventsAriaComboBoxFocus) { |
189 RunEventTest(FILE_PATH_LITERAL("aria-combo-box-focus.html")); | 181 RunEventTest(FILE_PATH_LITERAL("aria-combo-box-focus.html")); |
190 } | 182 } |
191 | 183 |
192 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, | 184 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, |
193 AccessibilityEventsAriaComboBoxNext) { | 185 AccessibilityEventsAriaComboBoxNext) { |
194 RunEventTest(FILE_PATH_LITERAL("aria-combo-box-next.html")); | 186 RunEventTest(FILE_PATH_LITERAL("aria-combo-box-next.html")); |
195 } | 187 } |
196 | 188 |
197 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, | 189 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, |
198 AccessibilityEventsAriaSliderValueChange) { | 190 AccessibilityEventsAriaSliderValueChange) { |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, | 244 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, |
253 AccessibilityEventsExpandedChange) { | 245 AccessibilityEventsExpandedChange) { |
254 RunEventTest(FILE_PATH_LITERAL("expanded-change.html")); | 246 RunEventTest(FILE_PATH_LITERAL("expanded-change.html")); |
255 } | 247 } |
256 | 248 |
257 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, | 249 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, |
258 AccessibilityEventsInnerHtmlChange) { | 250 AccessibilityEventsInnerHtmlChange) { |
259 RunEventTest(FILE_PATH_LITERAL("inner-html-change.html")); | 251 RunEventTest(FILE_PATH_LITERAL("inner-html-change.html")); |
260 } | 252 } |
261 | 253 |
262 // http://crbug.com/719030 | 254 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, |
263 IN_PROC_BROWSER_TEST_F( | 255 AccessibilityEventsInputTypeTextValueChanged) { |
264 DumpAccessibilityEventsTest, | |
265 DISABLED_ON_MAC(AccessibilityEventsInputTypeTextValueChanged)) { | |
266 RunEventTest(FILE_PATH_LITERAL("input-type-text-value-changed.html")); | 256 RunEventTest(FILE_PATH_LITERAL("input-type-text-value-changed.html")); |
267 } | 257 } |
268 | 258 |
269 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, | 259 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, |
| 260 AccessibilityEventsInvalidStatusChange) { |
| 261 RunEventTest(FILE_PATH_LITERAL("invalid-status-change.html")); |
| 262 } |
| 263 |
| 264 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, |
270 AccessibilityEventsListboxFocus) { | 265 AccessibilityEventsListboxFocus) { |
271 RunEventTest(FILE_PATH_LITERAL("listbox-focus.html")); | 266 RunEventTest(FILE_PATH_LITERAL("listbox-focus.html")); |
272 } | 267 } |
273 | 268 |
274 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, | 269 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, |
275 AccessibilityEventsListboxNext) { | 270 AccessibilityEventsListboxNext) { |
276 RunEventTest(FILE_PATH_LITERAL("listbox-next.html")); | 271 RunEventTest(FILE_PATH_LITERAL("listbox-next.html")); |
277 } | 272 } |
278 | 273 |
279 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, | 274 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, |
| 275 AccessibilityEventsLiveRegionAdd) { |
| 276 RunEventTest(FILE_PATH_LITERAL("live-region-add.html")); |
| 277 } |
| 278 |
| 279 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, |
| 280 AccessibilityEventsLiveRegionChange) { |
| 281 RunEventTest(FILE_PATH_LITERAL("live-region-change.html")); |
| 282 } |
| 283 |
| 284 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, |
| 285 AccessibilityEventsLiveRegionCreate) { |
| 286 RunEventTest(FILE_PATH_LITERAL("live-region-create.html")); |
| 287 } |
| 288 |
| 289 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, |
| 290 AccessibilityEventsLiveRegionRemove) { |
| 291 RunEventTest(FILE_PATH_LITERAL("live-region-remove.html")); |
| 292 } |
| 293 |
| 294 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, |
280 AccessibilityEventsMenuListCollapse) { | 295 AccessibilityEventsMenuListCollapse) { |
281 RunEventTest(FILE_PATH_LITERAL("menulist-collapse.html")); | 296 RunEventTest(FILE_PATH_LITERAL("menulist-collapse.html")); |
282 } | 297 } |
283 | 298 |
284 // https://crbug.com/719030 | 299 // https://crbug.com/719030 |
285 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, | 300 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, |
286 DISABLED_ON_WIN_AND_MAC(AccessibilityEventsMenuListExpand)) { | 301 DISABLED_AccessibilityEventsMenuListExpand) { |
287 RunEventTest(FILE_PATH_LITERAL("menulist-expand.html")); | 302 RunEventTest(FILE_PATH_LITERAL("menulist-expand.html")); |
288 } | 303 } |
289 | 304 |
290 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, | 305 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, |
291 AccessibilityEventsMenuListFocus) { | 306 AccessibilityEventsMenuListFocus) { |
292 RunEventTest(FILE_PATH_LITERAL("menulist-focus.html")); | 307 RunEventTest(FILE_PATH_LITERAL("menulist-focus.html")); |
293 } | 308 } |
294 | 309 |
295 // https://crbug.com/719030 | 310 // https://crbug.com/719030 |
296 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, | 311 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, |
297 DISABLED_ON_WIN_AND_MAC(AccessibilityEventsMenuListNext)) { | 312 DISABLED_AccessibilityEventsMenuListNext) { |
298 RunEventTest(FILE_PATH_LITERAL("menulist-next.html")); | 313 RunEventTest(FILE_PATH_LITERAL("menulist-next.html")); |
299 } | 314 } |
300 | 315 |
301 // http://crbug.com/719030 | 316 // http://crbug.com/719030 |
302 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, | 317 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, |
303 DISABLED_AccessibilityEventsMenuListPopup) { | 318 DISABLED_AccessibilityEventsMenuListPopup) { |
304 RunEventTest(FILE_PATH_LITERAL("menulist-popup.html")); | 319 RunEventTest(FILE_PATH_LITERAL("menulist-popup.html")); |
305 } | 320 } |
306 | 321 |
307 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, | 322 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, |
(...skipping 20 matching lines...) Expand all Loading... |
328 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, | 343 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, |
329 AccessibilityEventsRemoveSubtree) { | 344 AccessibilityEventsRemoveSubtree) { |
330 RunEventTest(FILE_PATH_LITERAL("remove-subtree.html")); | 345 RunEventTest(FILE_PATH_LITERAL("remove-subtree.html")); |
331 } | 346 } |
332 | 347 |
333 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, | 348 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, |
334 AccessibilityEventsTextChanged) { | 349 AccessibilityEventsTextChanged) { |
335 RunEventTest(FILE_PATH_LITERAL("text-changed.html")); | 350 RunEventTest(FILE_PATH_LITERAL("text-changed.html")); |
336 } | 351 } |
337 | 352 |
338 #endif // defined(OS_WIN) || defined(OS_MACOSX) | |
339 | |
340 } // namespace content | 353 } // namespace content |
OLD | NEW |