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 <set> | 5 #include <set> |
6 #include <string> | 6 #include <string> |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 printf("\n"); | 131 printf("\n"); |
132 printf("Final accessibility tree after events fired:\n"); | 132 printf("Final accessibility tree after events fired:\n"); |
133 printf("%s\n", base::UTF16ToUTF8(final_tree_).c_str()); | 133 printf("%s\n", base::UTF16ToUTF8(final_tree_).c_str()); |
134 printf("\n"); | 134 printf("\n"); |
135 } | 135 } |
136 | 136 |
137 void DumpAccessibilityEventsTest::RunEventTest( | 137 void DumpAccessibilityEventsTest::RunEventTest( |
138 const base::FilePath::CharType* file_path) { | 138 const base::FilePath::CharType* file_path) { |
139 base::FilePath dir_test_data; | 139 base::FilePath dir_test_data; |
140 ASSERT_TRUE(PathService::Get(DIR_TEST_DATA, &dir_test_data)); | 140 ASSERT_TRUE(PathService::Get(DIR_TEST_DATA, &dir_test_data)); |
141 base::FilePath test_path( | 141 base::FilePath test_path(dir_test_data.AppendASCII("accessibility") |
142 dir_test_data.AppendASCII("accessibility/event")); | 142 .AppendASCII("event")); |
143 ASSERT_TRUE(base::PathExists(test_path)) | 143 ASSERT_TRUE(base::PathExists(test_path)) << test_path.LossyDisplayName(); |
144 << test_path.LossyDisplayName(); | |
145 | 144 |
146 base::FilePath event_file = test_path.Append(base::FilePath(file_path)); | 145 base::FilePath event_file = test_path.Append(base::FilePath(file_path)); |
147 RunTest(event_file, "accessibility/event"); | 146 RunTest(event_file, "accessibility/event"); |
148 } | 147 } |
149 | 148 |
150 // TODO(dmazzoni): port these tests to run on all platforms. | 149 // TODO(dmazzoni): port these tests to run on all platforms. |
151 #if defined(OS_WIN) || defined(OS_MACOSX) | 150 #if defined(OS_WIN) || defined(OS_MACOSX) |
152 | 151 |
153 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, | 152 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, |
154 AccessibilityEventsCheckedStateChanged) { | 153 AccessibilityEventsCheckedStateChanged) { |
155 RunEventTest(FILE_PATH_LITERAL("events-checked-state-changed.html")); | 154 RunEventTest(FILE_PATH_LITERAL("events-checked-state-changed.html")); |
156 } | 155 } |
157 | 156 |
158 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, | 157 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, |
159 AccessibilityEventsInputTypeTextValueChanged) { | 158 AccessibilityEventsInputTypeTextValueChanged) { |
160 RunEventTest(FILE_PATH_LITERAL("events-input-type-text-value-changed.html")); | 159 RunEventTest(FILE_PATH_LITERAL("events-input-type-text-value-changed.html")); |
161 } | 160 } |
162 | 161 |
163 #endif // defined(OS_WIN) | 162 #endif // defined(OS_WIN) |
164 | 163 |
165 } // namespace content | 164 } // namespace content |
OLD | NEW |