Index: chrome/browser/ui/cocoa/notifications/balloon_controller_unittest.mm |
diff --git a/chrome/browser/ui/cocoa/notifications/balloon_controller_unittest.mm b/chrome/browser/ui/cocoa/notifications/balloon_controller_unittest.mm |
index a58c9be1dcd868a42c8e89b3a2775c7c9130388a..cb40b3b727766ec7b20d2b90d04cf74745afccb1 100644 |
--- a/chrome/browser/ui/cocoa/notifications/balloon_controller_unittest.mm |
+++ b/chrome/browser/ui/cocoa/notifications/balloon_controller_unittest.mm |
@@ -10,8 +10,8 @@ |
#include "chrome/browser/ui/browser.h" |
#include "chrome/browser/ui/cocoa/cocoa_test_helper.h" |
#include "chrome/browser/ui/cocoa/notifications/balloon_controller.h" |
+#include "chrome/test/base/chrome_render_view_host_test_harness.h" |
#include "chrome/test/base/testing_profile.h" |
-#include "content/browser/renderer_host/test_render_view_host.h" |
// Subclass balloon controller and mock out the initialization of the RVH. |
@interface TestBalloonController : BalloonController { |
@@ -45,7 +45,7 @@ class MockBalloonCollection : public BalloonCollection { |
Balloons balloons_; |
}; |
-class BalloonControllerTest : public RenderViewHostTestHarness { |
+class BalloonControllerTest : public ChromeRenderViewHostTestHarness { |
public: |
BalloonControllerTest() : |
ui_thread_(BrowserThread::UI, MessageLoop::current()), |
@@ -53,23 +53,23 @@ class BalloonControllerTest : public RenderViewHostTestHarness { |
} |
virtual void SetUp() { |
- RenderViewHostTestHarness::SetUp(); |
+ ChromeRenderViewHostTestHarness::SetUp(); |
CocoaTest::BootstrapCocoa(); |
- profile_.reset(new TestingProfile()); |
- profile_->CreateRequestContext(); |
- browser_.reset(new Browser(Browser::TYPE_TABBED, profile_.get())); |
+ profile()->CreateRequestContext(); |
+ browser_.reset(new Browser(Browser::TYPE_TABBED, profile())); |
collection_.reset(new MockBalloonCollection()); |
} |
virtual void TearDown() { |
+ collection_.reset(); |
+ browser_.reset(); |
MessageLoop::current()->RunAllPending(); |
- RenderViewHostTestHarness::TearDown(); |
+ ChromeRenderViewHostTestHarness::TearDown(); |
} |
protected: |
BrowserThread ui_thread_; |
BrowserThread io_thread_; |
- scoped_ptr<TestingProfile> profile_; |
scoped_ptr<Browser> browser_; |
scoped_ptr<BalloonCollection> collection_; |
}; |
@@ -79,7 +79,7 @@ TEST_F(BalloonControllerTest, ShowAndCloseTest) { |
ASCIIToUTF16("http://www.google.com"), string16(), |
new NotificationObjectProxy(-1, -1, -1, false)); |
scoped_ptr<Balloon> balloon( |
- new Balloon(n, profile_.get(), collection_.get())); |
+ new Balloon(n, profile(), collection_.get())); |
balloon->SetPosition(gfx::Point(1, 1), false); |
balloon->set_content_size(gfx::Size(100, 100)); |
@@ -95,7 +95,7 @@ TEST_F(BalloonControllerTest, SizesTest) { |
ASCIIToUTF16("http://www.google.com"), string16(), |
new NotificationObjectProxy(-1, -1, -1, false)); |
scoped_ptr<Balloon> balloon( |
- new Balloon(n, profile_.get(), collection_.get())); |
+ new Balloon(n, profile(), collection_.get())); |
balloon->SetPosition(gfx::Point(1, 1), false); |
balloon->set_content_size(gfx::Size(100, 100)); |