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

Unified Diff: chrome/browser/metrics/variations/variations_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
« no previous file with comments | « chrome/browser/metrics/thread_watcher_unittest.cc ('k') | chrome/browser/net/dns_probe_service_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/metrics/variations/variations_service_unittest.cc
diff --git a/chrome/browser/metrics/variations/variations_service_unittest.cc b/chrome/browser/metrics/variations/variations_service_unittest.cc
index 6f67e9cd0e1923b10e6d88e3a066cca96c2d34cf..90f6dbce1c75a996209fd958008818554afbeb30 100644
--- a/chrome/browser/metrics/variations/variations_service_unittest.cc
+++ b/chrome/browser/metrics/variations/variations_service_unittest.cc
@@ -18,6 +18,7 @@
#include "components/variations/proto/variations_seed.pb.h"
#include "components/web_resource/resource_request_allowed_notifier_test_util.h"
#include "content/public/test/test_browser_thread.h"
+#include "content/public/test/test_browser_thread_bundle.h"
#include "net/base/url_util.h"
#include "net/http/http_response_headers.h"
#include "net/http/http_status_code.h"
@@ -221,6 +222,7 @@ class VariationsServiceTest : public ::testing::Test {
VariationsServiceTest() {}
private:
+ content::TestBrowserThreadBundle thread_bundle_;
#if defined(OS_CHROMEOS)
// Not used directly. Initializes CrosSettings for testing.
chromeos::ScopedTestDeviceSettingsService test_device_settings_service_;
@@ -266,9 +268,6 @@ TEST_F(VariationsServiceTest, VariationsURLHasOSNameParam) {
}
TEST_F(VariationsServiceTest, RequestsInitiallyNotAllowed) {
- base::MessageLoopForUI message_loop;
- content::TestBrowserThread ui_thread(content::BrowserThread::UI,
- &message_loop);
TestingPrefServiceSimple prefs;
VariationsService::RegisterPrefs(prefs.registry());
@@ -288,9 +287,6 @@ TEST_F(VariationsServiceTest, RequestsInitiallyNotAllowed) {
}
TEST_F(VariationsServiceTest, RequestsInitiallyAllowed) {
- base::MessageLoopForUI message_loop;
- content::TestBrowserThread ui_thread(content::BrowserThread::UI,
- &message_loop);
TestingPrefServiceSimple prefs;
VariationsService::RegisterPrefs(prefs.registry());
@@ -306,9 +302,6 @@ TEST_F(VariationsServiceTest, RequestsInitiallyAllowed) {
}
TEST_F(VariationsServiceTest, SeedStoredWhenOKStatus) {
- base::MessageLoop message_loop;
- content::TestBrowserThread io_thread(content::BrowserThread::IO,
- &message_loop);
TestingPrefServiceSimple prefs;
VariationsService::RegisterPrefs(prefs.registry());
@@ -339,9 +332,6 @@ TEST_F(VariationsServiceTest, SeedNotStoredWhenNonOKStatus) {
net::HTTP_SERVICE_UNAVAILABLE,
};
- base::MessageLoop message_loop;
- content::TestBrowserThread io_thread(content::BrowserThread::IO,
- &message_loop);
TestingPrefServiceSimple prefs;
VariationsService::RegisterPrefs(prefs.registry());
@@ -363,9 +353,6 @@ TEST_F(VariationsServiceTest, SeedNotStoredWhenNonOKStatus) {
}
TEST_F(VariationsServiceTest, SeedDateUpdatedOn304Status) {
- base::MessageLoop message_loop;
- content::TestBrowserThread io_thread(content::BrowserThread::IO,
- &message_loop);
TestingPrefServiceSimple prefs;
VariationsService::RegisterPrefs(prefs.registry());
« no previous file with comments | « chrome/browser/metrics/thread_watcher_unittest.cc ('k') | chrome/browser/net/dns_probe_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698