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

Unified Diff: chrome/browser/ui/cocoa/infobars/infobar_controller_unittest.mm

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
Index: chrome/browser/ui/cocoa/infobars/infobar_controller_unittest.mm
diff --git a/chrome/browser/ui/cocoa/infobars/infobar_controller_unittest.mm b/chrome/browser/ui/cocoa/infobars/infobar_controller_unittest.mm
index c95bee86a6355970a362957719222ace48db9e67..59b8b524d985b1b5c1b5a8d0e9bffb19c83b196a 100644
--- a/chrome/browser/ui/cocoa/infobars/infobar_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/infobars/infobar_controller_unittest.mm
@@ -23,6 +23,14 @@
using content::WebContents;
+// TODO(avi): Kill this when TabContents goes away.
+class InfoBarControllerContentsCreator {
+ public:
+ static TabContents* CreateTabContents(content::WebContents* contents) {
+ return TabContents::Factory::CreateTabContents(contents);
+ }
+};
+
@interface InfoBarController (ExposedForTesting)
- (NSString*)labelString;
- (NSRect)labelFrame;
@@ -100,8 +108,8 @@ class LinkInfoBarControllerTest : public CocoaProfileTest,
public:
virtual void SetUp() {
CocoaProfileTest::SetUp();
- tab_contents_.reset(new TabContents(WebContents::Create(
- profile(), NULL, MSG_ROUTING_NONE, NULL)));
+ tab_contents_.reset(InfoBarControllerContentsCreator::CreateTabContents(
+ WebContents::Create(profile(), NULL, MSG_ROUTING_NONE, NULL)));
tab_contents_->infobar_tab_helper()->set_infobars_enabled(false);
delegate_ = new MockLinkInfoBarDelegate(this);
@@ -144,8 +152,8 @@ class ConfirmInfoBarControllerTest : public CocoaProfileTest,
public:
virtual void SetUp() {
CocoaProfileTest::SetUp();
- tab_contents_.reset(new TabContents(WebContents::Create(
- profile(), NULL, MSG_ROUTING_NONE, NULL)));
+ tab_contents_.reset(InfoBarControllerContentsCreator::CreateTabContents(
+ WebContents::Create(profile(), NULL, MSG_ROUTING_NONE, NULL)));
tab_contents_->infobar_tab_helper()->set_infobars_enabled(false);
delegate_ = new MockConfirmInfoBarDelegate(this);
« no previous file with comments | « chrome/browser/ui/browser_tabstrip.cc ('k') | chrome/browser/ui/cocoa/infobars/translate_infobar_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698