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

Unified Diff: chrome/browser/background/background_contents_service_unittest.cc

Issue 1086733002: Ensure tests have an active task runner (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Created 5 years, 8 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/background/background_contents_service_unittest.cc
diff --git a/chrome/browser/background/background_contents_service_unittest.cc b/chrome/browser/background/background_contents_service_unittest.cc
index 4b23a0d18ef98aa9a9c14d29b2ec2b91942bef52..6d726f01ac88611eff1335d6f669a96169306ea6 100644
--- a/chrome/browser/background/background_contents_service_unittest.cc
+++ b/chrome/browser/background/background_contents_service_unittest.cc
@@ -7,7 +7,6 @@
#include "base/basictypes.h"
#include "base/command_line.h"
#include "base/memory/scoped_ptr.h"
-#include "base/message_loop/message_loop.h"
#include "base/prefs/pref_service.h"
#include "base/prefs/scoped_user_pref_update.h"
#include "base/run_loop.h"
@@ -25,6 +24,7 @@
#include "chrome/test/base/testing_profile_manager.h"
#include "content/public/browser/notification_service.h"
#include "content/public/test/test_browser_thread.h"
+#include "content/public/test/test_browser_thread_bundle.h"
#include "extensions/common/extension.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/platform_test.h"
@@ -44,6 +44,11 @@ class BackgroundContentsServiceTest : public testing::Test {
~BackgroundContentsServiceTest() override {}
void SetUp() override {
command_line_.reset(new base::CommandLine(base::CommandLine::NO_PROGRAM));
+ BackgroundContentsService::DisableCloseBalloonForTesting(true);
+ }
+
+ void TearDown() override {
+ BackgroundContentsService::DisableCloseBalloonForTesting(false);
}
const base::DictionaryValue* GetPrefs(Profile* profile) {
@@ -62,6 +67,7 @@ class BackgroundContentsServiceTest : public testing::Test {
return url;
}
+ content::TestBrowserThreadBundle thread_bundle_;
scoped_ptr<base::CommandLine> command_line_;
};

Powered by Google App Engine
This is Rietveld 408576698