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

Unified Diff: chrome/browser/ui/tabs/tab_strip_model_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/tabs/tab_strip_model.cc ('k') | chrome/browser/ui/views/external_tab_container_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/tabs/tab_strip_model_unittest.cc
diff --git a/chrome/browser/ui/tabs/tab_strip_model_unittest.cc b/chrome/browser/ui/tabs/tab_strip_model_unittest.cc
index 8c311898932195e06db9a00d1d2be444d0251a1e..38535fbb8a628ec2771a2b540e95726211df9999 100644
--- a/chrome/browser/ui/tabs/tab_strip_model_unittest.cc
+++ b/chrome/browser/ui/tabs/tab_strip_model_unittest.cc
@@ -48,6 +48,14 @@ using content::SiteInstance;
using content::WebContents;
using extensions::Extension;
+// TODO(avi): Kill this when TabContents goes away.
+class TabStripModelContentsCreator {
+ public:
+ static TabContents* CreateTabContents(content::WebContents* contents) {
+ return TabContents::Factory::CreateTabContents(contents);
+ }
+};
+
namespace {
// Class used to delete a TabContents when another TabContents is destroyed.
@@ -1466,8 +1474,9 @@ TEST_F(TabStripModelTest, AddTabContents_ForgetOpeners) {
TEST_F(TabStripModelTest, AppendContentsReselectionTest) {
WebContents* fake_destinations_tab =
WebContents::Create(profile(), NULL, MSG_ROUTING_NONE, NULL);
- TabContents tab_contents(fake_destinations_tab);
- TabStripDummyDelegate delegate(&tab_contents);
+ scoped_ptr<TabContents> tab_contents(
+ TabStripModelContentsCreator::CreateTabContents(fake_destinations_tab));
+ TabStripDummyDelegate delegate(tab_contents.get());
TabStripModel tabstrip(&delegate, profile());
EXPECT_TRUE(tabstrip.empty());
« no previous file with comments | « chrome/browser/ui/tabs/tab_strip_model.cc ('k') | chrome/browser/ui/views/external_tab_container_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698