Index: chrome/browser/policy/device_status_collector_unittest.cc |
diff --git a/chrome/browser/policy/device_status_collector_unittest.cc b/chrome/browser/policy/device_status_collector_unittest.cc |
index 245b933aa8497ceb4b6bfe3fc789b711f3a0041a..b0c69b9eeaac73e42f6f56fdb64f15c1b9d12a33 100644 |
--- a/chrome/browser/policy/device_status_collector_unittest.cc |
+++ b/chrome/browser/policy/device_status_collector_unittest.cc |
@@ -526,7 +526,7 @@ TEST_F(DeviceStatusCollectorTest, Location) { |
SetMockPositionToReturnNext(valid_fix); |
cros_settings_->SetBoolean(chromeos::kReportDeviceLocation, false); |
// Allow the new pref to propagate to the status collector. |
- message_loop_.RunAllPending(); |
+ message_loop_.RunUntilIdle(); |
EXPECT_TRUE(prefs_.GetDictionary(prefs::kDeviceLocation)->empty()); |
CheckThatNoLocationIsReported(); |
@@ -535,7 +535,7 @@ TEST_F(DeviceStatusCollectorTest, Location) { |
SetMockPositionToReturnNext(invalid_fix); |
cros_settings_->SetBoolean(chromeos::kReportDeviceLocation, true); |
// Allow the new pref to propagate to the status collector. |
- message_loop_.RunAllPending(); |
+ message_loop_.RunUntilIdle(); |
CheckThatALocationErrorIsReported(); |
} |