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

Unified Diff: chrome/browser/ui/webui/help/version_updater_chromeos_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/ui/webui/help/version_updater_chromeos_unittest.cc
diff --git a/chrome/browser/ui/webui/help/version_updater_chromeos_unittest.cc b/chrome/browser/ui/webui/help/version_updater_chromeos_unittest.cc
index f3994911f270a3a861ec340f7acc3cea6711c940..70a00e4cff96c721d99322de9554655301393add 100644
--- a/chrome/browser/ui/webui/help/version_updater_chromeos_unittest.cc
+++ b/chrome/browser/ui/webui/help/version_updater_chromeos_unittest.cc
@@ -8,7 +8,6 @@
#include "base/compiler_specific.h"
#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
-#include "base/message_loop/message_loop.h"
#include "chrome/browser/chromeos/login/users/mock_user_manager.h"
#include "chrome/browser/chromeos/login/users/scoped_user_manager_enabler.h"
#include "chrome/browser/chromeos/settings/cros_settings.h"
@@ -17,6 +16,7 @@
#include "chromeos/dbus/fake_update_engine_client.h"
#include "chromeos/dbus/shill_service_client.h"
#include "chromeos/network/network_handler.h"
+#include "content/public/test/test_browser_thread_bundle.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/cros_system_api/dbus/service_constants.h"
@@ -67,7 +67,7 @@ class VersionUpdaterCrosTest : public ::testing::Test {
"eth",
shill::kTypeEthernet, shill::kStateOnline,
true /* visible */);
- loop_.RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
}
void TearDown() override {
@@ -77,14 +77,13 @@ class VersionUpdaterCrosTest : public ::testing::Test {
DeviceSettingsService::Shutdown();
}
+ content::TestBrowserThreadBundle thread_bundle_;
scoped_ptr<VersionUpdater> version_updater_;
FakeUpdateEngineClient* fake_update_engine_client_; // Not owned.
MockUserManager* mock_user_manager_; // Not owned.
ScopedUserManagerEnabler user_manager_enabler_;
- base::MessageLoop loop_;
-
DISALLOW_COPY_AND_ASSIGN(VersionUpdaterCrosTest);
};

Powered by Google App Engine
This is Rietveld 408576698