| 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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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. | 154 // TODO(dmazzoni): port these tests to run on all platforms. |
| 155 // TODO(crbug.com/617146): All tests flaky on Windows 8. | |
| 156 #if defined(OS_WIN) || defined(OS_MACOSX) | 155 #if defined(OS_WIN) || defined(OS_MACOSX) |
| 157 | 156 |
| 158 // This is tasteless, but then so's the snippet it's replacing. | 157 // This is tasteless, but then so's the snippet it's replacing. |
| 159 #if defined(OS_WIN) | 158 #if defined(OS_WIN) |
| 160 #define DISABLED_ON_WIN(name) DISABLED_ ## name | 159 #define DISABLED_ON_WIN(name) DISABLED_ ## name |
| 161 #else | 160 #else |
| 162 #define DISABLED_ON_WIN(name) name | 161 #define DISABLED_ON_WIN(name) name |
| 163 #endif | 162 #endif |
| 164 | 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 |
| 165 #if defined(OS_WIN) || defined(OS_MACOSX) | 170 #if defined(OS_WIN) || defined(OS_MACOSX) |
| 166 #define DISABLED_ON_WIN_AND_MAC(name) DISABLED_ ## name | 171 #define DISABLED_ON_WIN_AND_MAC(name) DISABLED_ ## name |
| 167 #else | 172 #else |
| 168 #define DISABLED_ON_WIN_AND_MAC(name) name | 173 #define DISABLED_ON_WIN_AND_MAC(name) name |
| 169 #endif | 174 #endif |
| 170 | 175 |
| 171 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, | 176 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, |
| 172 AccessibilityEventsAriaComboBoxCollapse) { | 177 AccessibilityEventsAriaComboBoxCollapse) { |
| 173 RunEventTest(FILE_PATH_LITERAL("aria-combo-box-collapse.html")); | 178 RunEventTest(FILE_PATH_LITERAL("aria-combo-box-collapse.html")); |
| 174 } | 179 } |
| 175 | 180 |
| 176 // https://crbug.com/652706 | |
| 177 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, | 181 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, |
| 178 DISABLED_ON_WIN(AccessibilityEventsAriaComboBoxExpand)) { | 182 AccessibilityEventsAriaComboBoxExpand) { |
| 179 RunEventTest(FILE_PATH_LITERAL("aria-combo-box-expand.html")); | 183 RunEventTest(FILE_PATH_LITERAL("aria-combo-box-expand.html")); |
| 180 } | 184 } |
| 181 | 185 |
| 182 // Mac: https://crbug.com/615411, Win: https://crbug.com/652706 | 186 // https://crbug.com/719030 |
| 183 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, | 187 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, |
| 184 DISABLED_ON_WIN_AND_MAC(AccessibilityEventsAriaComboBoxFocus)) { | 188 DISABLED_ON_WIN_AND_MAC(AccessibilityEventsAriaComboBoxFocus)) { |
| 185 RunEventTest(FILE_PATH_LITERAL("aria-combo-box-focus.html")); | 189 RunEventTest(FILE_PATH_LITERAL("aria-combo-box-focus.html")); |
| 186 } | 190 } |
| 187 | 191 |
| 188 // https://crbug.com/652706 | |
| 189 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, | 192 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, |
| 190 DISABLED_ON_WIN(AccessibilityEventsAriaComboBoxNext)) { | 193 AccessibilityEventsAriaComboBoxNext) { |
| 191 RunEventTest(FILE_PATH_LITERAL("aria-combo-box-next.html")); | 194 RunEventTest(FILE_PATH_LITERAL("aria-combo-box-next.html")); |
| 192 } | 195 } |
| 193 | 196 |
| 194 // https://crbug.com/652706 | |
| 195 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, | 197 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, |
| 196 DISABLED_ON_WIN(AccessibilityEventsAddAlert)) { | 198 AccessibilityEventsAddAlert) { |
| 197 RunEventTest(FILE_PATH_LITERAL("add-alert.html")); | 199 RunEventTest(FILE_PATH_LITERAL("add-alert.html")); |
| 198 } | 200 } |
| 199 | 201 |
| 200 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, | 202 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, |
| 201 AccessibilityEventsAddChildOfBody) { | 203 AccessibilityEventsAddChildOfBody) { |
| 202 RunEventTest(FILE_PATH_LITERAL("add-child-of-body.html")); | 204 RunEventTest(FILE_PATH_LITERAL("add-child-of-body.html")); |
| 203 } | 205 } |
| 204 | 206 |
| 205 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, | 207 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, |
| 206 AccessibilityEventsAddHiddenAttribute) { | 208 AccessibilityEventsAddHiddenAttribute) { |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, | 242 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, |
| 241 AccessibilityEventsExpandedChange) { | 243 AccessibilityEventsExpandedChange) { |
| 242 RunEventTest(FILE_PATH_LITERAL("expanded-change.html")); | 244 RunEventTest(FILE_PATH_LITERAL("expanded-change.html")); |
| 243 } | 245 } |
| 244 | 246 |
| 245 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, | 247 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, |
| 246 AccessibilityEventsInnerHtmlChange) { | 248 AccessibilityEventsInnerHtmlChange) { |
| 247 RunEventTest(FILE_PATH_LITERAL("inner-html-change.html")); | 249 RunEventTest(FILE_PATH_LITERAL("inner-html-change.html")); |
| 248 } | 250 } |
| 249 | 251 |
| 250 #if defined(OS_MACOSX) | 252 // http://crbug.com/719030 |
| 251 // Mac failures: http://crbug.com/598527. | 253 IN_PROC_BROWSER_TEST_F( |
| 252 #define MAYBE_AccessibilityEventsInputTypeTextValueChanged \ | 254 DumpAccessibilityEventsTest, |
| 253 DISABLED_AccessibilityEventsInputTypeTextValueChanged | 255 DISABLED_ON_MAC(AccessibilityEventsInputTypeTextValueChanged)) { |
| 254 #else | |
| 255 #define MAYBE_AccessibilityEventsInputTypeTextValueChanged \ | |
| 256 AccessibilityEventsInputTypeTextValueChanged | |
| 257 #endif | |
| 258 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, | |
| 259 MAYBE_AccessibilityEventsInputTypeTextValueChanged) { | |
| 260 RunEventTest(FILE_PATH_LITERAL("input-type-text-value-changed.html")); | 256 RunEventTest(FILE_PATH_LITERAL("input-type-text-value-changed.html")); |
| 261 } | 257 } |
| 262 | 258 |
| 263 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, | 259 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, |
| 264 AccessibilityEventsListboxFocus) { | 260 AccessibilityEventsListboxFocus) { |
| 265 RunEventTest(FILE_PATH_LITERAL("listbox-focus.html")); | 261 RunEventTest(FILE_PATH_LITERAL("listbox-focus.html")); |
| 266 } | 262 } |
| 267 | 263 |
| 268 // Flaky on Windows: http://crbug.com/486861 | |
| 269 // Flaky on Mac: http://crbug.com/588271 | |
| 270 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, | 264 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, |
| 271 AccessibilityEventsListboxNext) { | 265 AccessibilityEventsListboxNext) { |
| 272 RunEventTest(FILE_PATH_LITERAL("listbox-next.html")); | 266 RunEventTest(FILE_PATH_LITERAL("listbox-next.html")); |
| 273 } | 267 } |
| 274 | 268 |
| 275 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, | 269 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, |
| 276 AccessibilityEventsMenuListCollapse) { | 270 AccessibilityEventsMenuListCollapse) { |
| 277 RunEventTest(FILE_PATH_LITERAL("menulist-collapse.html")); | 271 RunEventTest(FILE_PATH_LITERAL("menulist-collapse.html")); |
| 278 } | 272 } |
| 279 | 273 |
| 280 // Mac: https://crbug.com/615411, Win: https://crbug.com/652706 | 274 // https://crbug.com/719030 |
| 281 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, | 275 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, |
| 282 DISABLED_ON_WIN_AND_MAC(AccessibilityEventsMenuListExpand)) { | 276 DISABLED_ON_WIN_AND_MAC(AccessibilityEventsMenuListExpand)) { |
| 283 RunEventTest(FILE_PATH_LITERAL("menulist-expand.html")); | 277 RunEventTest(FILE_PATH_LITERAL("menulist-expand.html")); |
| 284 } | 278 } |
| 285 | 279 |
| 286 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, | 280 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, |
| 287 AccessibilityEventsMenuListFocus) { | 281 AccessibilityEventsMenuListFocus) { |
| 288 RunEventTest(FILE_PATH_LITERAL("menulist-focus.html")); | 282 RunEventTest(FILE_PATH_LITERAL("menulist-focus.html")); |
| 289 } | 283 } |
| 290 | 284 |
| 291 // Mac: https://crbug.com/615411, Win: https://crbug.com/652706 | 285 // https://crbug.com/719030 |
| 292 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, | 286 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, |
| 293 DISABLED_ON_WIN_AND_MAC(AccessibilityEventsMenuListNext)) { | 287 DISABLED_ON_WIN_AND_MAC(AccessibilityEventsMenuListNext)) { |
| 294 RunEventTest(FILE_PATH_LITERAL("menulist-next.html")); | 288 RunEventTest(FILE_PATH_LITERAL("menulist-next.html")); |
| 295 } | 289 } |
| 296 | 290 |
| 297 // Flaky on Windows: http://crbug.com/486861 | 291 // http://crbug.com/719030 |
| 298 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, | 292 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, |
| 299 DISABLED_AccessibilityEventsMenuListPopup) { | 293 DISABLED_AccessibilityEventsMenuListPopup) { |
| 300 RunEventTest(FILE_PATH_LITERAL("menulist-popup.html")); | 294 RunEventTest(FILE_PATH_LITERAL("menulist-popup.html")); |
| 301 } | 295 } |
| 302 | 296 |
| 303 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, | 297 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, |
| 304 AccessibilityEventsNameChange) { | 298 AccessibilityEventsNameChange) { |
| 305 RunEventTest(FILE_PATH_LITERAL("name-change.html")); | 299 RunEventTest(FILE_PATH_LITERAL("name-change.html")); |
| 306 } | 300 } |
| 307 | 301 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 327 } | 321 } |
| 328 | 322 |
| 329 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, | 323 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, |
| 330 AccessibilityEventsTextChanged) { | 324 AccessibilityEventsTextChanged) { |
| 331 RunEventTest(FILE_PATH_LITERAL("text-changed.html")); | 325 RunEventTest(FILE_PATH_LITERAL("text-changed.html")); |
| 332 } | 326 } |
| 333 | 327 |
| 334 #endif // defined(OS_WIN) || defined(OS_MACOSX) | 328 #endif // defined(OS_WIN) || defined(OS_MACOSX) |
| 335 | 329 |
| 336 } // namespace content | 330 } // namespace content |
| OLD | NEW |