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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 base::ThreadRestrictions::ScopedAllowIO allow_io_for_test_verification; | 147 base::ThreadRestrictions::ScopedAllowIO allow_io_for_test_verification; |
148 ASSERT_TRUE(base::PathExists(test_path)) << test_path.LossyDisplayName(); | 148 ASSERT_TRUE(base::PathExists(test_path)) << test_path.LossyDisplayName(); |
149 } | 149 } |
150 | 150 |
151 base::FilePath event_file = test_path.Append(base::FilePath(file_path)); | 151 base::FilePath event_file = test_path.Append(base::FilePath(file_path)); |
152 RunTest(event_file, "accessibility/event"); | 152 RunTest(event_file, "accessibility/event"); |
153 } | 153 } |
154 | 154 |
155 // TODO(dmazzoni): port these tests to run on all platforms. | 155 // TODO(dmazzoni): port these tests to run on all platforms. |
156 // TODO(crbug.com/617146): All tests flaky on Windows 8. | 156 // TODO(crbug.com/617146): All tests flaky on Windows 8. |
157 #if /*defined(OS_WIN) ||*/ defined(OS_MACOSX) | 157 #if defined(OS_WIN) || defined(OS_MACOSX) |
| 158 |
| 159 // This is tasteless, but then so's the snippet it's replacing. |
| 160 #if defined(OS_WIN) |
| 161 #define DISABLED_ON_WIN(name) DISABLED_ ## name |
| 162 #else |
| 163 #define DISABLED_ON_WIN(name) name |
| 164 #endif |
| 165 |
| 166 #if defined(OS_WIN) || defined(OS_MACOSX) |
| 167 #define DISABLED_ON_WIN_AND_MAC(name) DISABLED_ ## name |
| 168 #else |
| 169 #define DISABLED_ON_WIN_AND_MAC(name) name |
| 170 #endif |
158 | 171 |
159 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, | 172 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, |
160 AccessibilityEventsAriaComboBoxCollapse) { | 173 AccessibilityEventsAriaComboBoxCollapse) { |
161 RunEventTest(FILE_PATH_LITERAL("aria-combo-box-collapse.html")); | 174 RunEventTest(FILE_PATH_LITERAL("aria-combo-box-collapse.html")); |
162 } | 175 } |
163 | 176 |
| 177 // https://crbug.com/652706 |
164 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, | 178 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, |
165 AccessibilityEventsAriaComboBoxExpand) { | 179 DISABLED_ON_WIN(AccessibilityEventsAriaComboBoxExpand)) { |
166 RunEventTest(FILE_PATH_LITERAL("aria-combo-box-expand.html")); | 180 RunEventTest(FILE_PATH_LITERAL("aria-combo-box-expand.html")); |
167 } | 181 } |
168 | 182 |
169 #if defined(OS_MACOSX) | 183 // Mac: https://crbug.com/615411, Win: https://crbug.com/652706 |
170 // crbug.com/615411 | |
171 #define MAYBE_AccessibilityEventsAriaComboBoxFocus \ | |
172 DISABLED_AccessibilityEventsAriaComboBoxFocus | |
173 #else | |
174 #define MAYBE_AccessibilityEventsAriaComboBoxFocus \ | |
175 AccessibilityEventsAriaComboBoxFocus | |
176 #endif | |
177 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, | 184 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, |
178 MAYBE_AccessibilityEventsAriaComboBoxFocus) { | 185 DISABLED_ON_WIN_AND_MAC(AccessibilityEventsAriaComboBoxFocus)) { |
179 RunEventTest(FILE_PATH_LITERAL("aria-combo-box-focus.html")); | 186 RunEventTest(FILE_PATH_LITERAL("aria-combo-box-focus.html")); |
180 } | 187 } |
181 | 188 |
| 189 // https://crbug.com/652706 |
182 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, | 190 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, |
183 AccessibilityEventsAriaComboBoxNext) { | 191 DISABLED_ON_WIN(AccessibilityEventsAriaComboBoxNext)) { |
184 RunEventTest(FILE_PATH_LITERAL("aria-combo-box-next.html")); | 192 RunEventTest(FILE_PATH_LITERAL("aria-combo-box-next.html")); |
185 } | 193 } |
186 | 194 |
| 195 // https://crbug.com/652706 |
187 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, | 196 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, |
188 AccessibilityEventsAddAlert) { | 197 DISABLED_ON_WIN(AccessibilityEventsAddAlert)) { |
189 RunEventTest(FILE_PATH_LITERAL("add-alert.html")); | 198 RunEventTest(FILE_PATH_LITERAL("add-alert.html")); |
190 } | 199 } |
191 | 200 |
192 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, | 201 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, |
193 AccessibilityEventsAddChild) { | 202 AccessibilityEventsAddChild) { |
194 RunEventTest(FILE_PATH_LITERAL("add-child.html")); | 203 RunEventTest(FILE_PATH_LITERAL("add-child.html")); |
195 } | 204 } |
196 | 205 |
197 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, | 206 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, |
198 AccessibilityEventsAddHiddenAttribute) { | 207 AccessibilityEventsAddHiddenAttribute) { |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, | 271 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, |
263 AccessibilityEventsListboxNext) { | 272 AccessibilityEventsListboxNext) { |
264 RunEventTest(FILE_PATH_LITERAL("listbox-next.html")); | 273 RunEventTest(FILE_PATH_LITERAL("listbox-next.html")); |
265 } | 274 } |
266 | 275 |
267 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, | 276 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, |
268 AccessibilityEventsMenuListCollapse) { | 277 AccessibilityEventsMenuListCollapse) { |
269 RunEventTest(FILE_PATH_LITERAL("menulist-collapse.html")); | 278 RunEventTest(FILE_PATH_LITERAL("menulist-collapse.html")); |
270 } | 279 } |
271 | 280 |
272 #if defined(OS_MACOSX) | 281 // Mac: https://crbug.com/615411, Win: https://crbug.com/652706 |
273 // crbug.com/615411 | |
274 #define MAYBE_AccessibilityEventsMenuListExpand \ | |
275 DISABLED_AccessibilityEventsMenuListExpand | |
276 #else | |
277 #define MAYBE_AccessibilityEventsMenuListExpand \ | |
278 AccessibilityEventsMenuListExpand | |
279 #endif | |
280 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, | 282 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, |
281 MAYBE_AccessibilityEventsMenuListExpand) { | 283 DISABLED_ON_WIN_AND_MAC(AccessibilityEventsMenuListExpand)) { |
282 RunEventTest(FILE_PATH_LITERAL("menulist-expand.html")); | 284 RunEventTest(FILE_PATH_LITERAL("menulist-expand.html")); |
283 } | 285 } |
284 | 286 |
285 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, | 287 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, |
286 AccessibilityEventsMenuListFocus) { | 288 AccessibilityEventsMenuListFocus) { |
287 RunEventTest(FILE_PATH_LITERAL("menulist-focus.html")); | 289 RunEventTest(FILE_PATH_LITERAL("menulist-focus.html")); |
288 } | 290 } |
289 | 291 |
290 #if defined(OS_MACOSX) | 292 // Mac: https://crbug.com/615411, Win: https://crbug.com/652706 |
291 // crbug.com/615411 | |
292 #define MAYBE_AccessibilityEventsMenuListNext \ | |
293 DISABLED_AccessibilityEventsMenuListNext | |
294 #else | |
295 #define MAYBE_AccessibilityEventsMenuListNext AccessibilityEventsMenuListNext | |
296 #endif | |
297 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, | 293 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, |
298 MAYBE_AccessibilityEventsMenuListNext) { | 294 DISABLED_ON_WIN_AND_MAC(AccessibilityEventsMenuListNext)) { |
299 RunEventTest(FILE_PATH_LITERAL("menulist-next.html")); | 295 RunEventTest(FILE_PATH_LITERAL("menulist-next.html")); |
300 } | 296 } |
301 | 297 |
302 // Flaky on Windows: http://crbug.com/486861 | 298 // Flaky on Windows: http://crbug.com/486861 |
303 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, | 299 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, |
304 DISABLED_AccessibilityEventsMenuListPopup) { | 300 DISABLED_AccessibilityEventsMenuListPopup) { |
305 RunEventTest(FILE_PATH_LITERAL("menulist-popup.html")); | 301 RunEventTest(FILE_PATH_LITERAL("menulist-popup.html")); |
306 } | 302 } |
307 | 303 |
308 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, | 304 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, |
(...skipping 20 matching lines...) Expand all Loading... |
329 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, | 325 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, |
330 AccessibilityEventsRemoveSubtree) { | 326 AccessibilityEventsRemoveSubtree) { |
331 RunEventTest(FILE_PATH_LITERAL("remove-subtree.html")); | 327 RunEventTest(FILE_PATH_LITERAL("remove-subtree.html")); |
332 } | 328 } |
333 | 329 |
334 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, | 330 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, |
335 AccessibilityEventsTextChanged) { | 331 AccessibilityEventsTextChanged) { |
336 RunEventTest(FILE_PATH_LITERAL("text-changed.html")); | 332 RunEventTest(FILE_PATH_LITERAL("text-changed.html")); |
337 } | 333 } |
338 | 334 |
339 #endif // defined(OS_WIN) | 335 #endif // defined(OS_WIN) || defined(OS_MACOSX) |
340 | 336 |
341 } // namespace content | 337 } // namespace content |
OLD | NEW |