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

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

Issue 10539134: TabContentsWrapper -> TabContents, part 57. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: last use Created 8 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 | Annotate | Revision Log
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 <string> 5 #include <string>
6 #include <vector> 6 #include <vector>
7 7
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 // Actual file has been fully checked. 77 // Actual file has been fully checked.
78 return diff_lines; 78 return diff_lines;
79 } 79 }
80 80
81 DumpAccessibilityTreeHelper helper_; 81 DumpAccessibilityTreeHelper helper_;
82 }; 82 };
83 83
84 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, 84 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest,
85 PlatformTreeDifferenceTest) { 85 PlatformTreeDifferenceTest) {
86 RenderWidgetHostViewPort* host_view = static_cast<RenderWidgetHostViewPort*>( 86 RenderWidgetHostViewPort* host_view = static_cast<RenderWidgetHostViewPort*>(
87 browser()->GetSelectedWebContents()->GetRenderWidgetHostView()); 87 browser()->GetActiveWebContents()->GetRenderWidgetHostView());
88 RenderWidgetHost* host = host_view->GetRenderWidgetHost(); 88 RenderWidgetHost* host = host_view->GetRenderWidgetHost();
89 RenderViewHostImpl* view_host = 89 RenderViewHostImpl* view_host =
90 static_cast<RenderViewHostImpl*>(RenderWidgetHostImpl::From(host)); 90 static_cast<RenderViewHostImpl*>(RenderWidgetHostImpl::From(host));
91 view_host->set_save_accessibility_tree_for_testing(true); 91 view_host->set_save_accessibility_tree_for_testing(true);
92 view_host->SetAccessibilityMode(AccessibilityModeComplete); 92 view_host->SetAccessibilityMode(AccessibilityModeComplete);
93 93
94 // Setup test paths. 94 // Setup test paths.
95 FilePath dir_test_data; 95 FilePath dir_test_data;
96 EXPECT_TRUE(PathService::Get(content::DIR_TEST_DATA, &dir_test_data)); 96 EXPECT_TRUE(PathService::Get(content::DIR_TEST_DATA, &dir_test_data));
97 FilePath test_path(dir_test_data.Append(FILE_PATH_LITERAL("accessibility"))); 97 FilePath test_path(dir_test_data.Append(FILE_PATH_LITERAL("accessibility")));
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 194
195 EXPECT_TRUE(file_util::WriteFile( 195 EXPECT_TRUE(file_util::WriteFile(
196 actual_file, actual_contents.c_str(), actual_contents.size())); 196 actual_file, actual_contents.c_str(), actual_contents.size()));
197 197
198 ADD_FAILURE() << "No expectation found. Create it by doing:\n" 198 ADD_FAILURE() << "No expectation found. Create it by doing:\n"
199 << "mv " << actual_file.LossyDisplayName() << " " 199 << "mv " << actual_file.LossyDisplayName() << " "
200 << expected_file.LossyDisplayName(); 200 << expected_file.LossyDisplayName();
201 } 201 }
202 } while (!(html_file = file_enumerator.Next()).empty()); 202 } while (!(html_file = file_enumerator.Next()).empty());
203 } 203 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698