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/file_util.h" | 10 #include "base/file_util.h" |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 printf("\nActual\n"); | 226 printf("\nActual\n"); |
227 printf("------\n"); | 227 printf("------\n"); |
228 printf("%s\n", actual_contents.c_str()); | 228 printf("%s\n", actual_contents.c_str()); |
229 } | 229 } |
230 | 230 |
231 if (!base::PathExists(expected_file)) { | 231 if (!base::PathExists(expected_file)) { |
232 base::FilePath actual_file = | 232 base::FilePath actual_file = |
233 base::FilePath(html_file.RemoveExtension().value() + | 233 base::FilePath(html_file.RemoveExtension().value() + |
234 AccessibilityTreeFormatter::GetActualFileSuffix()); | 234 AccessibilityTreeFormatter::GetActualFileSuffix()); |
235 | 235 |
236 EXPECT_TRUE(file_util::WriteFile( | 236 EXPECT_TRUE(base::WriteFile( |
237 actual_file, actual_contents.c_str(), actual_contents.size())); | 237 actual_file, actual_contents.c_str(), actual_contents.size())); |
238 | 238 |
239 ADD_FAILURE() << "No expectation found. Create it by doing:\n" | 239 ADD_FAILURE() << "No expectation found. Create it by doing:\n" |
240 << "mv " << actual_file.LossyDisplayName() << " " | 240 << "mv " << actual_file.LossyDisplayName() << " " |
241 << expected_file.LossyDisplayName(); | 241 << expected_file.LossyDisplayName(); |
242 } | 242 } |
243 } | 243 } |
244 | 244 |
245 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, AccessibilityA) { | 245 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, AccessibilityA) { |
246 RunTest(FILE_PATH_LITERAL("a.html")); | 246 RunTest(FILE_PATH_LITERAL("a.html")); |
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
499 | 499 |
500 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, AccessibilityUl) { | 500 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, AccessibilityUl) { |
501 RunTest(FILE_PATH_LITERAL("ul.html")); | 501 RunTest(FILE_PATH_LITERAL("ul.html")); |
502 } | 502 } |
503 | 503 |
504 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, AccessibilityWbr) { | 504 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, AccessibilityWbr) { |
505 RunTest(FILE_PATH_LITERAL("wbr.html")); | 505 RunTest(FILE_PATH_LITERAL("wbr.html")); |
506 } | 506 } |
507 | 507 |
508 } // namespace content | 508 } // namespace content |
OLD | NEW |