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

Unified Diff: chrome/browser/ui/cocoa/notifications/balloon_controller_unittest.mm

Issue 14197014: Add TestBrowserThreadBundle into RenderViewHostTestHarness. Kill some unnecessary real threads. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merged ToT Created 7 years, 6 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/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 d290879358f5c7ca6583b5a5232ef31960fcf45b..0c8f8098910de565bb73450085272479ba5d1b39 100644
--- a/chrome/browser/ui/cocoa/notifications/balloon_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/notifications/balloon_controller_unittest.mm
@@ -14,9 +14,6 @@
#include "chrome/test/base/chrome_render_view_host_test_harness.h"
#include "chrome/test/base/test_browser_window.h"
#include "chrome/test/base/testing_profile.h"
-#include "content/public/test/test_browser_thread.h"
-
-using content::BrowserThread;
// Subclass balloon controller and mock out the initialization of the RVH.
@interface TestBalloonController : BalloonController {
@@ -58,15 +55,7 @@ class MockBalloonCollection : public BalloonCollection {
};
class BalloonControllerTest : public ChromeRenderViewHostTestHarness {
- public:
- BalloonControllerTest() :
- ui_thread_(BrowserThread::UI, base::MessageLoop::current()),
- file_user_blocking_thread_(
- BrowserThread::FILE_USER_BLOCKING, base::MessageLoop::current()),
- io_thread_(BrowserThread::IO, base::MessageLoop::current()) {
- }
-
- virtual void SetUp() {
+ virtual void SetUp() OVERRIDE {
ChromeRenderViewHostTestHarness::SetUp();
CocoaTest::BootstrapCocoa();
profile()->CreateRequestContext();
@@ -77,17 +66,13 @@ class BalloonControllerTest : public ChromeRenderViewHostTestHarness {
collection_.reset(new MockBalloonCollection());
}
- virtual void TearDown() {
+ virtual void TearDown() OVERRIDE {
collection_.reset();
browser_.reset();
- base::MessageLoop::current()->RunUntilIdle();
ChromeRenderViewHostTestHarness::TearDown();
}
protected:
- content::TestBrowserThread ui_thread_;
- content::TestBrowserThread file_user_blocking_thread_;
- content::TestBrowserThread io_thread_;
scoped_ptr<Browser> browser_;
scoped_ptr<BalloonCollection> collection_;
};

Powered by Google App Engine
This is Rietveld 408576698