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

Unified Diff: chrome/browser/extensions/api/signed_in_devices/signed_in_devices_api_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/api/signed_in_devices/signed_in_devices_api_unittest.cc
diff --git a/chrome/browser/extensions/api/signed_in_devices/signed_in_devices_api_unittest.cc b/chrome/browser/extensions/api/signed_in_devices/signed_in_devices_api_unittest.cc
index 6f6d5e9980628ff056325418575141d53983c9f6..1cb5733233153b211020a8b6891cb10da4d8d4c2 100644
--- a/chrome/browser/extensions/api/signed_in_devices/signed_in_devices_api_unittest.cc
+++ b/chrome/browser/extensions/api/signed_in_devices/signed_in_devices_api_unittest.cc
@@ -7,8 +7,8 @@
#include <vector>
#include "base/guid.h"
-#include "base/message_loop/message_loop.h"
#include "base/prefs/pref_service.h"
+#include "base/thread_task_runner_handle.h"
#include "base/values.h"
#include "chrome/browser/extensions/api/signed_in_devices/signed_in_devices_api.h"
#include "chrome/browser/extensions/extension_api_unittest.h"
@@ -17,6 +17,7 @@
#include "chrome/browser/sync/profile_sync_service_factory.h"
#include "chrome/browser/sync/profile_sync_service_mock.h"
#include "components/sync_driver/device_info.h"
+#include "content/public/test/test_browser_thread_bundle.h"
#include "extensions/common/extension.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -72,11 +73,10 @@ class MockDeviceInfoTracker : public DeviceInfoTracker {
};
TEST(SignedInDevicesAPITest, GetSignedInDevices) {
+ content::TestBrowserThreadBundle thread_bundle;
TestingProfile profile;
MockDeviceInfoTracker device_tracker;
- base::MessageLoop message_loop_;
- TestExtensionPrefs extension_prefs(
- message_loop_.message_loop_proxy().get());
+ TestExtensionPrefs extension_prefs(base::ThreadTaskRunnerHandle::Get().get());
// Add a couple of devices and make sure we get back public ids for them.
std::string extension_name = "test";

Powered by Google App Engine
This is Rietveld 408576698