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/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
(...skipping 23 matching lines...) Expand all Loading... |
34 #endif | 34 #endif |
35 | 35 |
36 namespace content { | 36 namespace content { |
37 | 37 |
38 typedef AccessibilityTreeFormatter::Filter Filter; | 38 typedef AccessibilityTreeFormatter::Filter Filter; |
39 | 39 |
40 // This test takes a snapshot of the platform BrowserAccessibility tree and | 40 // This test takes a snapshot of the platform BrowserAccessibility tree and |
41 // tests it against an expected baseline. | 41 // tests it against an expected baseline. |
42 // | 42 // |
43 // The flow of the test is as outlined below. | 43 // The flow of the test is as outlined below. |
44 // 1. Load an html file from chrome/test/data/accessibility. | 44 // 1. Load an html file from content/test/data/accessibility. |
45 // 2. Read the expectation. | 45 // 2. Read the expectation. |
46 // 3. Browse to the page and serialize the platform specific tree into a human | 46 // 3. Browse to the page and serialize the platform specific tree into a human |
47 // readable string. | 47 // readable string. |
48 // 4. Perform a comparison between actual and expected and fail if they do not | 48 // 4. Perform a comparison between actual and expected and fail if they do not |
49 // exactly match. | 49 // exactly match. |
50 class DumpAccessibilityTreeTest : public DumpAccessibilityTestBase { | 50 class DumpAccessibilityTreeTest : public DumpAccessibilityTestBase { |
51 public: | 51 public: |
52 void AddDefaultFilters(std::vector<Filter>* filters) override { | 52 void AddDefaultFilters(std::vector<Filter>* filters) override { |
53 filters->push_back(Filter(base::ASCIIToUTF16("FOCUSABLE"), Filter::ALLOW)); | 53 filters->push_back(Filter(base::ASCIIToUTF16("FOCUSABLE"), Filter::ALLOW)); |
54 filters->push_back(Filter(base::ASCIIToUTF16("READONLY"), Filter::ALLOW)); | 54 filters->push_back(Filter(base::ASCIIToUTF16("READONLY"), Filter::ALLOW)); |
(...skipping 1111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1166 // crbug.com/281952 | 1166 // crbug.com/281952 |
1167 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, DISABLED_AccessibilityVideo) { | 1167 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, DISABLED_AccessibilityVideo) { |
1168 RunHtmlTest(FILE_PATH_LITERAL("video.html")); | 1168 RunHtmlTest(FILE_PATH_LITERAL("video.html")); |
1169 } | 1169 } |
1170 | 1170 |
1171 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, AccessibilityWbr) { | 1171 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, AccessibilityWbr) { |
1172 RunHtmlTest(FILE_PATH_LITERAL("wbr.html")); | 1172 RunHtmlTest(FILE_PATH_LITERAL("wbr.html")); |
1173 } | 1173 } |
1174 | 1174 |
1175 } // namespace content | 1175 } // namespace content |
OLD | NEW |