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())); |