Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(54)

Side by Side Diff: content/browser/accessibility/dump_accessibility_tree_browsertest.cc

Issue 15741009: Native Android accessibility. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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"
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 ASSERT_TRUE(file_util::PathExists(test_path)) 140 ASSERT_TRUE(file_util::PathExists(test_path))
141 << test_path.LossyDisplayName(); 141 << test_path.LossyDisplayName();
142 142
143 base::FilePath html_file = test_path.Append(base::FilePath(file_path)); 143 base::FilePath html_file = test_path.Append(base::FilePath(file_path));
144 // Output the test path to help anyone who encounters a failure and needs 144 // Output the test path to help anyone who encounters a failure and needs
145 // to know where to look. 145 // to know where to look.
146 printf("Testing: %s\n", html_file.MaybeAsASCII().c_str()); 146 printf("Testing: %s\n", html_file.MaybeAsASCII().c_str());
147 147
148 std::string html_contents; 148 std::string html_contents;
149 file_util::ReadFileToString(html_file, &html_contents); 149 file_util::ReadFileToString(html_file, &html_contents);
150 LOG(ERROR) << "HTML CONTENTS:\n" << html_contents;
David Trainor- moved to gerrit 2013/06/04 20:27:18 Remove?
dmazzoni 2013/06/07 20:23:16 Done.
150 151
151 // Read the expected file. 152 // Read the expected file.
152 std::string expected_contents_raw; 153 std::string expected_contents_raw;
153 base::FilePath expected_file = 154 base::FilePath expected_file =
154 base::FilePath(html_file.RemoveExtension().value() + 155 base::FilePath(html_file.RemoveExtension().value() +
155 AccessibilityTreeFormatter::GetExpectedFileSuffix()); 156 AccessibilityTreeFormatter::GetExpectedFileSuffix());
156 file_util::ReadFileToString(expected_file, &expected_contents_raw); 157 file_util::ReadFileToString(expected_file, &expected_contents_raw);
157 158
158 // Tolerate Windows-style line endings (\r\n) in the expected file: 159 // Tolerate Windows-style line endings (\r\n) in the expected file:
159 // normalize by deleting all \r from the file (if any) to leave only \n. 160 // normalize by deleting all \r from the file (if any) to leave only \n.
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
452 453
453 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, AccessibilityUl) { 454 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, AccessibilityUl) {
454 RunTest(FILE_PATH_LITERAL("ul.html")); 455 RunTest(FILE_PATH_LITERAL("ul.html"));
455 } 456 }
456 457
457 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, AccessibilityWbr) { 458 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, AccessibilityWbr) {
458 RunTest(FILE_PATH_LITERAL("wbr.html")); 459 RunTest(FILE_PATH_LITERAL("wbr.html"));
459 } 460 }
460 461
461 } // namespace content 462 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698