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

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

Issue 9015022: Replace most of Browser::GetSelectedTabContents calls into Browser::GetSelectedWebContents. I've ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 8 years, 11 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "chrome/browser/ui/browser.h" 10 #include "chrome/browser/ui/browser.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 FilePath resources_pack_path; 70 FilePath resources_pack_path;
71 EXPECT_TRUE(PathService::Get(chrome::FILE_RESOURCES_PACK, 71 EXPECT_TRUE(PathService::Get(chrome::FILE_RESOURCES_PACK,
72 &resources_pack_path)); 72 &resources_pack_path));
73 ResourceBundle::AddDataPackToSharedInstance(resources_pack_path); 73 ResourceBundle::AddDataPackToSharedInstance(resources_pack_path);
74 } 74 }
75 }; 75 };
76 76
77 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, 77 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest,
78 PlatformTreeDifferenceTest) { 78 PlatformTreeDifferenceTest) {
79 RenderWidgetHostView* host_view = 79 RenderWidgetHostView* host_view =
80 browser()->GetSelectedTabContents()->GetRenderWidgetHostView(); 80 browser()->GetSelectedWebContents()->GetRenderWidgetHostView();
81 RenderWidgetHost* host = host_view->GetRenderWidgetHost(); 81 RenderWidgetHost* host = host_view->GetRenderWidgetHost();
82 RenderViewHost* view_host = static_cast<RenderViewHost*>(host); 82 RenderViewHost* view_host = static_cast<RenderViewHost*>(host);
83 view_host->set_save_accessibility_tree_for_testing(true); 83 view_host->set_save_accessibility_tree_for_testing(true);
84 view_host->EnableRendererAccessibility(); 84 view_host->EnableRendererAccessibility();
85 85
86 // Setup test paths. 86 // Setup test paths.
87 FilePath dir_test_data; 87 FilePath dir_test_data;
88 EXPECT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &dir_test_data)); 88 EXPECT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &dir_test_data));
89 FilePath test_path(dir_test_data.Append(FilePath("accessibility"))); 89 FilePath test_path(dir_test_data.Append(FilePath("accessibility")));
90 EXPECT_TRUE(file_util::PathExists(test_path)) 90 EXPECT_TRUE(file_util::PathExists(test_path))
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 FilePath(html_file.RemoveExtension().value() + kActualFileSuffix); 132 FilePath(html_file.RemoveExtension().value() + kActualFileSuffix);
133 EXPECT_TRUE(file_util::WriteFile( 133 EXPECT_TRUE(file_util::WriteFile(
134 actual_file, actual_contents.c_str(), actual_contents.size())); 134 actual_file, actual_contents.c_str(), actual_contents.size()));
135 135
136 ADD_FAILURE() << "No expectation found. Create it by doing:\n" 136 ADD_FAILURE() << "No expectation found. Create it by doing:\n"
137 << "mv " << actual_file.LossyDisplayName() << " " 137 << "mv " << actual_file.LossyDisplayName() << " "
138 << expected_file.LossyDisplayName(); 138 << expected_file.LossyDisplayName();
139 } 139 }
140 } 140 }
141 } 141 }
OLDNEW
« no previous file with comments | « chrome/browser/accessibility/accessibility_win_browsertest.cc ('k') | chrome/browser/autofill/autofill_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698