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

Unified Diff: chrome/browser/policy/cloud/device_management_service_browsertest.cc

Issue 2083363002: Remove calls to deprecated MessageLoop methods in chrome. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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/policy/cloud/device_management_service_browsertest.cc
diff --git a/chrome/browser/policy/cloud/device_management_service_browsertest.cc b/chrome/browser/policy/cloud/device_management_service_browsertest.cc
index b1d7d6d2d1cf61c58b07a0bf0e0eb388021c07a1..090b7b08f6a88b0e7d0f0401f036924d979814d2 100644
--- a/chrome/browser/policy/cloud/device_management_service_browsertest.cc
+++ b/chrome/browser/policy/cloud/device_management_service_browsertest.cc
@@ -9,6 +9,7 @@
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/message_loop/message_loop.h"
+#include "base/run_loop.h"
#include "base/stl_util.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/policy/cloud/test_request_interceptor.h"
@@ -141,7 +142,7 @@ class DeviceManagementServiceIntegrationTest
job->GetRequest()->mutable_register_request();
job->Start(base::Bind(&DeviceManagementServiceIntegrationTest::OnJobDone,
base::Unretained(this)));
- base::MessageLoop::current()->Run();
+ base::RunLoop().Run();
}
void SetUpOnMainThread() override {
@@ -203,7 +204,7 @@ IN_PROC_BROWSER_TEST_P(DeviceManagementServiceIntegrationTest,
request->set_oauth2_client_id("oauth2ClientId4Test");
job->Start(base::Bind(&DeviceManagementServiceIntegrationTest::OnJobDone,
base::Unretained(this)));
- base::MessageLoop::current()->Run();
+ base::RunLoop().Run();
ASSERT_EQ("fake_auth_code", robot_auth_code_);
}
@@ -224,7 +225,7 @@ IN_PROC_BROWSER_TEST_P(DeviceManagementServiceIntegrationTest, PolicyFetch) {
request->add_request()->set_policy_type(dm_protocol::kChromeUserPolicyType);
job->Start(base::Bind(&DeviceManagementServiceIntegrationTest::OnJobDone,
base::Unretained(this)));
- base::MessageLoop::current()->Run();
+ base::RunLoop().Run();
}
IN_PROC_BROWSER_TEST_P(DeviceManagementServiceIntegrationTest, Unregistration) {
@@ -242,7 +243,7 @@ IN_PROC_BROWSER_TEST_P(DeviceManagementServiceIntegrationTest, Unregistration) {
job->GetRequest()->mutable_unregister_request();
job->Start(base::Bind(&DeviceManagementServiceIntegrationTest::OnJobDone,
base::Unretained(this)));
- base::MessageLoop::current()->Run();
+ base::RunLoop().Run();
}
IN_PROC_BROWSER_TEST_P(DeviceManagementServiceIntegrationTest, AutoEnrollment) {
@@ -258,7 +259,7 @@ IN_PROC_BROWSER_TEST_P(DeviceManagementServiceIntegrationTest, AutoEnrollment) {
job->GetRequest()->mutable_auto_enrollment_request()->set_modulus(1);
job->Start(base::Bind(&DeviceManagementServiceIntegrationTest::OnJobDone,
base::Unretained(this)));
- base::MessageLoop::current()->Run();
+ base::RunLoop().Run();
}
INSTANTIATE_TEST_CASE_P(
« no previous file with comments | « chrome/browser/policy/cloud/cloud_policy_invalidator_unittest.cc ('k') | chrome/browser/policy/policy_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698