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

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

Issue 14113053: chrome: Use base::MessageLoop. (Part 3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase again Created 7 years, 7 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 30c4aa60b0bd4de8e7890fb8e5853d4473e4a43b..7a4077687745bdfbba0197c76cbaffef5ed189bf 100644
--- a/chrome/browser/policy/cloud/device_management_service_browsertest.cc
+++ b/chrome/browser/policy/cloud/device_management_service_browsertest.cc
@@ -120,8 +120,8 @@ class DeviceManagementServiceIntegrationTest
.WillOnce(
DoAll(Invoke(this,
&DeviceManagementServiceIntegrationTest::RecordToken),
- InvokeWithoutArgs(MessageLoop::current(),
- &MessageLoop::Quit)));
+ InvokeWithoutArgs(base::MessageLoop::current(),
+ &base::MessageLoop::Quit)));
scoped_ptr<DeviceManagementRequestJob> job(
service_->CreateJob(DeviceManagementRequestJob::TYPE_REGISTRATION));
job->SetGaiaToken("gaia_auth_token");
@@ -130,7 +130,7 @@ class DeviceManagementServiceIntegrationTest
job->GetRequest()->mutable_register_request();
job->Start(base::Bind(&DeviceManagementServiceIntegrationTest::OnJobDone,
base::Unretained(this)));
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
}
virtual void SetUpOnMainThread() OVERRIDE {
@@ -178,8 +178,8 @@ IN_PROC_BROWSER_TEST_P(DeviceManagementServiceIntegrationTest,
.WillOnce(
DoAll(Invoke(this,
&DeviceManagementServiceIntegrationTest::RecordAuthCode),
- InvokeWithoutArgs(MessageLoop::current(),
- &MessageLoop::Quit)));
+ InvokeWithoutArgs(base::MessageLoop::current(),
+ &base::MessageLoop::Quit)));
scoped_ptr<DeviceManagementRequestJob> job(service_->CreateJob(
DeviceManagementRequestJob::TYPE_API_AUTH_CODE_FETCH));
job->SetDMToken(token_);
@@ -190,7 +190,7 @@ IN_PROC_BROWSER_TEST_P(DeviceManagementServiceIntegrationTest,
request->set_oauth2_client_id("oauth2ClientId4Test");
job->Start(base::Bind(&DeviceManagementServiceIntegrationTest::OnJobDone,
base::Unretained(this)));
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
ASSERT_EQ("fake_auth_code", robot_auth_code_);
}
@@ -199,7 +199,8 @@ IN_PROC_BROWSER_TEST_P(DeviceManagementServiceIntegrationTest, PolicyFetch) {
ExpectRequest();
EXPECT_CALL(*this, OnJobDone(DM_STATUS_SUCCESS, _, _))
- .WillOnce(InvokeWithoutArgs(MessageLoop::current(), &MessageLoop::Quit));
+ .WillOnce(InvokeWithoutArgs(base::MessageLoop::current(),
+ &base::MessageLoop::Quit));
scoped_ptr<DeviceManagementRequestJob> job(
service_->CreateJob(DeviceManagementRequestJob::TYPE_POLICY_FETCH));
job->SetDMToken(token_);
@@ -210,7 +211,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)));
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
}
IN_PROC_BROWSER_TEST_P(DeviceManagementServiceIntegrationTest, Unregistration) {
@@ -218,7 +219,8 @@ IN_PROC_BROWSER_TEST_P(DeviceManagementServiceIntegrationTest, Unregistration) {
ExpectRequest();
EXPECT_CALL(*this, OnJobDone(DM_STATUS_SUCCESS, _, _))
- .WillOnce(InvokeWithoutArgs(MessageLoop::current(), &MessageLoop::Quit));
+ .WillOnce(InvokeWithoutArgs(base::MessageLoop::current(),
+ &base::MessageLoop::Quit));
scoped_ptr<DeviceManagementRequestJob> job(
service_->CreateJob(DeviceManagementRequestJob::TYPE_UNREGISTRATION));
job->SetDMToken(token_);
@@ -226,13 +228,14 @@ IN_PROC_BROWSER_TEST_P(DeviceManagementServiceIntegrationTest, Unregistration) {
job->GetRequest()->mutable_unregister_request();
job->Start(base::Bind(&DeviceManagementServiceIntegrationTest::OnJobDone,
base::Unretained(this)));
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
}
IN_PROC_BROWSER_TEST_P(DeviceManagementServiceIntegrationTest, AutoEnrollment) {
ExpectRequest();
EXPECT_CALL(*this, OnJobDone(DM_STATUS_SUCCESS, _, _))
- .WillOnce(InvokeWithoutArgs(MessageLoop::current(), &MessageLoop::Quit));
+ .WillOnce(InvokeWithoutArgs(base::MessageLoop::current(),
+ &base::MessageLoop::Quit));
scoped_ptr<DeviceManagementRequestJob> job(
service_->CreateJob(DeviceManagementRequestJob::TYPE_AUTO_ENROLLMENT));
job->SetClientID("testid");
@@ -240,7 +243,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)));
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
}
INSTANTIATE_TEST_CASE_P(

Powered by Google App Engine
This is Rietveld 408576698