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

Unified Diff: chrome/browser/ui/find_bar/find_backend_unittest.cc

Issue 10868072: Make TabContents ctor private; poke hole for existing callers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: all green Created 8 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/extensions/shell_window.cc ('k') | chrome/browser/ui/gtk/web_dialog_gtk.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/find_bar/find_backend_unittest.cc
diff --git a/chrome/browser/ui/find_bar/find_backend_unittest.cc b/chrome/browser/ui/find_bar/find_backend_unittest.cc
index 941b729e565aa8c8daf95928f1f4fb754eda5e5a..7a7c7e4764b430883a9ba6798c2280abdf74275c 100644
--- a/chrome/browser/ui/find_bar/find_backend_unittest.cc
+++ b/chrome/browser/ui/find_bar/find_backend_unittest.cc
@@ -20,6 +20,14 @@ using content::BrowserThread;
using content::WebContents;
using content::WebContentsTester;
+// TODO(avi): Kill this when TabContents goes away.
+class FindBackendTestContentsCreator {
+ public:
+ static TabContents* CreateTabContents(content::WebContents* contents) {
+ return TabContents::Factory::CreateTabContents(contents);
+ }
+};
+
class FindBackendTest : public TabContentsTestHarness {
public:
FindBackendTest()
@@ -50,8 +58,9 @@ TEST_F(FindBackendTest, InternalState) {
// Get another WebContents object ready.
WebContents* contents2 =
WebContentsTester::CreateTestWebContents(profile(), NULL);
- TabContents tab_contents(contents2);
- FindTabHelper* find_tab_helper2 = tab_contents.find_tab_helper();
+ scoped_ptr<TabContents> tab_contents(
+ FindBackendTestContentsCreator::CreateTabContents(contents2));
+ FindTabHelper* find_tab_helper2 = tab_contents->find_tab_helper();
// No search has still been issued, strings should be blank.
EXPECT_EQ(string16(), FindPrepopulateText(contents()));
« no previous file with comments | « chrome/browser/ui/extensions/shell_window.cc ('k') | chrome/browser/ui/gtk/web_dialog_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698