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

Unified Diff: chrome/browser/ui/cocoa/translate/translate_infobar_unittest.mm

Issue 6989001: Misc. infobar stuff: (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 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/translate/translate_infobar_unittest.mm
===================================================================
--- chrome/browser/ui/cocoa/translate/translate_infobar_unittest.mm (revision 86331)
+++ chrome/browser/ui/cocoa/translate/translate_infobar_unittest.mm (working copy)
@@ -14,6 +14,7 @@
#import "chrome/browser/ui/cocoa/infobars/infobar.h"
#import "chrome/browser/ui/cocoa/translate/translate_infobar_base.h"
#import "chrome/browser/ui/cocoa/translate/before_translate_infobar_controller.h"
+#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
#import "content/browser/site_instance.h"
#import "content/browser/tab_contents/tab_contents.h"
#import "testing/gmock/include/gmock/gmock.h"
@@ -68,7 +69,7 @@
class TranslationInfoBarTest : public CocoaTest {
public:
BrowserTestHelper browser_helper_;
- scoped_ptr<TabContents> tab_contents;
+ scoped_ptr<TabContentsWrapper> tab_contents;
scoped_ptr<MockTranslateInfoBarDelegate> infobar_delegate;
scoped_nsobject<TranslateInfoBarControllerBase> infobar_controller;
@@ -77,12 +78,8 @@
// the test.
virtual void SetUp() {
CocoaTest::SetUp();
- tab_contents.reset(
- new TabContents(browser_helper_.profile(),
- NULL,
- MSG_ROUTING_NONE,
- NULL,
- NULL));
+ tab_contents.reset(new TabContentsWrapper(new TabContents(
+ browser_helper_.profile(), NULL, MSG_ROUTING_NONE, NULL, NULL)));
CreateInfoBar();
}
@@ -94,11 +91,12 @@
TranslateErrors::Type error = TranslateErrors::NONE;
if (type == TranslateInfoBarDelegate::TRANSLATION_ERROR)
error = TranslateErrors::NETWORK;
- infobar_delegate.reset(
- new MockTranslateInfoBarDelegate(type, error, tab_contents.get()));
+ infobar_delegate.reset(new MockTranslateInfoBarDelegate(type, error,
+ tab_contents->tab_contents()));
[[infobar_controller view] removeFromSuperview];
scoped_ptr<InfoBar> infobar(
- static_cast<InfoBarDelegate*>(infobar_delegate.get())->CreateInfoBar());
+ static_cast<InfoBarDelegate*>(infobar_delegate.get())->
+ CreateInfoBar(tab_contents.get()));
infobar_controller.reset(
reinterpret_cast<TranslateInfoBarControllerBase*>(
infobar->controller()));
« no previous file with comments | « chrome/browser/ui/cocoa/translate/translate_infobar_base.mm ('k') | chrome/browser/ui/gtk/infobars/confirm_infobar_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698