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

Unified Diff: chrome/browser/extensions/extension_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/extensions/extension_service_unittest.cc
diff --git a/chrome/browser/extensions/extension_service_unittest.cc b/chrome/browser/extensions/extension_service_unittest.cc
index 5911845c233ba4ed89c23523736ea8ca87967c8c..4352ffaeb95eae46d7ae4fde5bbee9bde7c477eb 100644
--- a/chrome/browser/extensions/extension_service_unittest.cc
+++ b/chrome/browser/extensions/extension_service_unittest.cc
@@ -84,6 +84,7 @@
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/storage_partition.h"
#include "content/public/common/content_constants.h"
+#include "content/public/test/test_browser_thread_bundle.h"
#include "content/public/test/test_utils.h"
#include "extensions/browser/extension_prefs.h"
#include "extensions/browser/extension_registry.h"
@@ -5598,7 +5599,11 @@ class ExtensionsReadyRecorder : public content::NotificationObserver {
//
// Also tests that we always fire EXTENSIONS_READY, no matter whether we are
// enabled or not.
-TEST(ExtensionServiceTestSimple, Enabledness) {
+class ExtensionServiceTestSimple : public testing::Test {
+ content::TestBrowserThreadBundle thread_bundle_;
+};
+
+TEST_F(ExtensionServiceTestSimple, Enabledness) {
// Make sure the PluginService singleton is destroyed at the end of the test.
base::ShadowingAtExitManager at_exit_manager;
#if defined(ENABLE_PLUGINS)
@@ -5609,7 +5614,6 @@ TEST(ExtensionServiceTestSimple, Enabledness) {
ExtensionErrorReporter::Init(false); // no noisy errors
ExtensionsReadyRecorder recorder;
scoped_ptr<TestingProfile> profile(new TestingProfile());
- content::TestBrowserThreadBundle thread_bundle_;
#if defined OS_CHROMEOS
chromeos::ScopedTestDeviceSettingsService device_settings_service;
chromeos::ScopedTestCrosSettings cros_settings;

Powered by Google App Engine
This is Rietveld 408576698