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

Side by Side Diff: chrome/browser/policy/cloud/cloud_policy_invalidator_unittest.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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/policy/cloud/cloud_policy_invalidator.h" 5 #include "chrome/browser/policy/cloud/cloud_policy_invalidator.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 363
364 bool CloudPolicyInvalidatorTest::InvalidationsEnabled() { 364 bool CloudPolicyInvalidatorTest::InvalidationsEnabled() {
365 return core_.refresh_scheduler()->invalidations_available(); 365 return core_.refresh_scheduler()->invalidations_available();
366 } 366 }
367 367
368 bool CloudPolicyInvalidatorTest::IsInvalidationAcknowledged( 368 bool CloudPolicyInvalidatorTest::IsInvalidationAcknowledged(
369 const syncer::Invalidation& invalidation) { 369 const syncer::Invalidation& invalidation) {
370 // The acknowledgement task is run through a WeakHandle that posts back to our 370 // The acknowledgement task is run through a WeakHandle that posts back to our
371 // own thread. We need to run any posted tasks before we can check 371 // own thread. We need to run any posted tasks before we can check
372 // acknowledgement status. 372 // acknowledgement status.
373 loop_.RunUntilIdle(); 373 base::RunLoop().RunUntilIdle();
374 374
375 EXPECT_FALSE(IsUnsent(invalidation)); 375 EXPECT_FALSE(IsUnsent(invalidation));
376 return !invalidation_service_.GetMockAckHandler()->IsUnacked(invalidation); 376 return !invalidation_service_.GetMockAckHandler()->IsUnacked(invalidation);
377 } 377 }
378 378
379 bool CloudPolicyInvalidatorTest::IsInvalidatorRegistered() { 379 bool CloudPolicyInvalidatorTest::IsInvalidatorRegistered() {
380 return !invalidation_service_.invalidator_registrar() 380 return !invalidation_service_.invalidator_registrar()
381 .GetRegisteredIds(invalidator_.get()).empty(); 381 .GetRegisteredIds(invalidator_.get()).empty();
382 } 382 }
383 383
(...skipping 711 matching lines...) Expand 10 before | Expand all | Expand 10 after
1095 CloudPolicyInvalidatorUserTypedTest, 1095 CloudPolicyInvalidatorUserTypedTest,
1096 testing::Values(em::DeviceRegisterRequest::ANDROID_BROWSER)); 1096 testing::Values(em::DeviceRegisterRequest::ANDROID_BROWSER));
1097 #else 1097 #else
1098 INSTANTIATE_TEST_CASE_P( 1098 INSTANTIATE_TEST_CASE_P(
1099 CloudPolicyInvalidatorUserTypedTestInstance, 1099 CloudPolicyInvalidatorUserTypedTestInstance,
1100 CloudPolicyInvalidatorUserTypedTest, 1100 CloudPolicyInvalidatorUserTypedTest,
1101 testing::Values(em::DeviceRegisterRequest::BROWSER)); 1101 testing::Values(em::DeviceRegisterRequest::BROWSER));
1102 #endif 1102 #endif
1103 1103
1104 } // namespace policy 1104 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698