OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <set> | 5 #include <set> |
6 #include <string> | 6 #include <string> |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "base/path_service.h" | 11 #include "base/path_service.h" |
12 #include "base/string_util.h" | 12 #include "base/string_util.h" |
13 #include "base/string16.h" | 13 #include "base/string16.h" |
14 #include "base/strings/string_split.h" | 14 #include "base/strings/string_split.h" |
15 #include "base/utf_string_conversions.h" | 15 #include "base/utf_string_conversions.h" |
16 #include "content/browser/accessibility/browser_accessibility.h" | 16 #include "content/browser/accessibility/browser_accessibility.h" |
17 #include "content/browser/accessibility/browser_accessibility_manager.h" | 17 #include "content/browser/accessibility/browser_accessibility_manager.h" |
18 #include "content/browser/accessibility/dump_accessibility_tree_helper.h" | 18 #include "content/browser/accessibility/dump_accessibility_tree_helper.h" |
19 #include "content/browser/renderer_host/render_view_host_impl.h" | 19 #include "content/browser/renderer_host/render_view_host_impl.h" |
20 #include "content/port/browser/render_widget_host_view_port.h" | 20 #include "content/port/browser/render_widget_host_view_port.h" |
21 #include "content/public/browser/web_contents.h" | 21 #include "content/public/browser/web_contents.h" |
22 #include "content/public/common/content_paths.h" | 22 #include "content/public/common/content_paths.h" |
23 #include "content/public/test/test_utils.h" | 23 #include "content/public/test/test_utils.h" |
24 #include "content/shell/shell.h" | 24 #include "content/shell/shell.h" |
25 #include "content/test/content_browser_test.h" | 25 #include "content/test/content_browser_test.h" |
26 #include "content/test/content_browser_test_utils.h" | 26 #include "content/test/content_browser_test_utils.h" |
27 #include "testing/gtest/include/gtest/gtest.h" | 27 #include "testing/gtest/include/gtest/gtest.h" |
28 | 28 |
| 29 // TODO(dmazzoni): Disabled accessibility tests on Win64. crbug.com/179717 |
| 30 #if defined(OS_WIN) && defined(ARCH_CPU_X86_64) |
| 31 #define MAYBE(x) DISABLED_##x |
| 32 #else |
| 33 #define MAYBE(x) x |
| 34 #endif |
| 35 |
29 namespace content { | 36 namespace content { |
30 | 37 |
31 namespace { | 38 namespace { |
32 | 39 |
33 const char kCommentToken = '#'; | 40 const char kCommentToken = '#'; |
34 const char kMarkSkipFile[] = "#<skip"; | 41 const char kMarkSkipFile[] = "#<skip"; |
35 const char kMarkEndOfFile[] = "<-- End-of-file -->"; | 42 const char kMarkEndOfFile[] = "<-- End-of-file -->"; |
36 const char kSignalDiff[] = "*"; | 43 const char kSignalDiff[] = "*"; |
37 | 44 |
38 } // namespace | 45 } // namespace |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 } | 264 } |
258 | 265 |
259 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, AccessibilityAriaCombobox) { | 266 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, AccessibilityAriaCombobox) { |
260 RunTest(FILE_PATH_LITERAL("aria-combobox.html")); | 267 RunTest(FILE_PATH_LITERAL("aria-combobox.html")); |
261 } | 268 } |
262 | 269 |
263 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, AccessibilityAriaInvalid) { | 270 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, AccessibilityAriaInvalid) { |
264 RunTest(FILE_PATH_LITERAL("aria-invalid.html")); | 271 RunTest(FILE_PATH_LITERAL("aria-invalid.html")); |
265 } | 272 } |
266 | 273 |
267 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, AccessibilityAriaLevel) { | 274 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, |
| 275 MAYBE(AccessibilityAriaLevel)) { |
268 RunTest(FILE_PATH_LITERAL("aria-level.html")); | 276 RunTest(FILE_PATH_LITERAL("aria-level.html")); |
269 } | 277 } |
270 | 278 |
271 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, AccessibilityAriaMenu) { | 279 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, AccessibilityAriaMenu) { |
272 RunTest(FILE_PATH_LITERAL("aria-menu.html")); | 280 RunTest(FILE_PATH_LITERAL("aria-menu.html")); |
273 } | 281 } |
274 | 282 |
275 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, | 283 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, |
276 AccessibilityAriaMenuitemradio) { | 284 AccessibilityAriaMenuitemradio) { |
277 RunTest(FILE_PATH_LITERAL("aria-menuitemradio.html")); | 285 RunTest(FILE_PATH_LITERAL("aria-menuitemradio.html")); |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
358 | 366 |
359 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, AccessibilityHeading) { | 367 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, AccessibilityHeading) { |
360 RunTest(FILE_PATH_LITERAL("heading.html")); | 368 RunTest(FILE_PATH_LITERAL("heading.html")); |
361 } | 369 } |
362 | 370 |
363 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, AccessibilityHR) { | 371 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, AccessibilityHR) { |
364 RunTest(FILE_PATH_LITERAL("hr.html")); | 372 RunTest(FILE_PATH_LITERAL("hr.html")); |
365 } | 373 } |
366 | 374 |
367 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, | 375 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, |
368 AccessibilityIframeCoordinates) { | 376 MAYBE(AccessibilityIframeCoordinates)) { |
369 RunTest(FILE_PATH_LITERAL("iframe-coordinates.html")); | 377 RunTest(FILE_PATH_LITERAL("iframe-coordinates.html")); |
370 } | 378 } |
371 | 379 |
372 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, AccessibilityInputButton) { | 380 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, AccessibilityInputButton) { |
373 RunTest(FILE_PATH_LITERAL("input-button.html")); | 381 RunTest(FILE_PATH_LITERAL("input-button.html")); |
374 } | 382 } |
375 | 383 |
376 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, | 384 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, |
377 AccessibilityInputButtonInMenu) { | 385 AccessibilityInputButtonInMenu) { |
378 RunTest(FILE_PATH_LITERAL("input-button-in-menu.html")); | 386 RunTest(FILE_PATH_LITERAL("input-button-in-menu.html")); |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
435 | 443 |
436 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, AccessibilityUl) { | 444 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, AccessibilityUl) { |
437 RunTest(FILE_PATH_LITERAL("ul.html")); | 445 RunTest(FILE_PATH_LITERAL("ul.html")); |
438 } | 446 } |
439 | 447 |
440 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, AccessibilityWbr) { | 448 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, AccessibilityWbr) { |
441 RunTest(FILE_PATH_LITERAL("wbr.html")); | 449 RunTest(FILE_PATH_LITERAL("wbr.html")); |
442 } | 450 } |
443 | 451 |
444 } // namespace content | 452 } // namespace content |
OLD | NEW |