diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-30 01:02:55 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-30 01:02:55 +0000 |
commit | 1f18bfe815cb85d18e42fdc80692828be710ad31 (patch) | |
tree | 6d9348d668a034238f327f28871256c5a5c88a33 /base/system_monitor | |
parent | 68f29a9c7310cf90808f8b6791a2c4c0217e8ab6 (diff) | |
download | chromium_src-1f18bfe815cb85d18e42fdc80692828be710ad31.zip chromium_src-1f18bfe815cb85d18e42fdc80692828be710ad31.tar.gz chromium_src-1f18bfe815cb85d18e42fdc80692828be710ad31.tar.bz2 |
base: Update calls froms RunAllPending() to RunUntilIdle().
BUG=131220
TEST=base_unittests
R=willchan@chromium.org
Review URL: https://chromiumcodereview.appspot.com/11339020
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@164802 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/system_monitor')
-rw-r--r-- | base/system_monitor/system_monitor_unittest.cc | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/base/system_monitor/system_monitor_unittest.cc b/base/system_monitor/system_monitor_unittest.cc index feff974079..10bd7e7 100644 --- a/base/system_monitor/system_monitor_unittest.cc +++ b/base/system_monitor/system_monitor_unittest.cc @@ -80,27 +80,27 @@ TEST_F(SystemMonitorTest, PowerNotifications) { // Sending resume when not suspended should have no effect. system_monitor_->ProcessPowerMessage(SystemMonitor::RESUME_EVENT); - message_loop_.RunAllPending(); + message_loop_.RunUntilIdle(); EXPECT_EQ(test[0].resumes(), 0); // Pretend we suspended. system_monitor_->ProcessPowerMessage(SystemMonitor::SUSPEND_EVENT); - message_loop_.RunAllPending(); + message_loop_.RunUntilIdle(); EXPECT_EQ(test[0].suspends(), 1); // Send a second suspend notification. This should be suppressed. system_monitor_->ProcessPowerMessage(SystemMonitor::SUSPEND_EVENT); - message_loop_.RunAllPending(); + message_loop_.RunUntilIdle(); EXPECT_EQ(test[0].suspends(), 1); // Pretend we were awakened. system_monitor_->ProcessPowerMessage(SystemMonitor::RESUME_EVENT); - message_loop_.RunAllPending(); + message_loop_.RunUntilIdle(); EXPECT_EQ(test[0].resumes(), 1); // Send a duplicate resume notification. This should be suppressed. system_monitor_->ProcessPowerMessage(SystemMonitor::RESUME_EVENT); - message_loop_.RunAllPending(); + message_loop_.RunUntilIdle(); EXPECT_EQ(test[0].resumes(), 1); } @@ -130,20 +130,20 @@ TEST_F(SystemMonitorTest, DeviceChangeNotifications) { } system_monitor_->ProcessDevicesChanged(SystemMonitor::DEVTYPE_UNKNOWN); - message_loop_.RunAllPending(); + message_loop_.RunUntilIdle(); system_monitor_->ProcessDevicesChanged(SystemMonitor::DEVTYPE_UNKNOWN); system_monitor_->ProcessDevicesChanged(SystemMonitor::DEVTYPE_UNKNOWN); - message_loop_.RunAllPending(); + message_loop_.RunUntilIdle(); system_monitor_->ProcessRemovableStorageAttached(kDeviceId1, kDeviceName, FILE_PATH_LITERAL("path")); - message_loop_.RunAllPending(); + message_loop_.RunUntilIdle(); system_monitor_->ProcessRemovableStorageDetached(kDeviceId1); system_monitor_->ProcessRemovableStorageDetached(kDeviceId2); - message_loop_.RunAllPending(); + message_loop_.RunUntilIdle(); } TEST_F(SystemMonitorTest, GetAttachedRemovableStorageEmpty) { @@ -159,7 +159,7 @@ TEST_F(SystemMonitorTest, GetAttachedRemovableStorageAttachDetach) { system_monitor_->ProcessRemovableStorageAttached(kDeviceId1, kDeviceName1, kDevicePath1.value()); - message_loop_.RunAllPending(); + message_loop_.RunUntilIdle(); std::vector<SystemMonitor::RemovableStorageInfo> devices = system_monitor_->GetAttachedRemovableStorage(); ASSERT_EQ(1U, devices.size()); @@ -173,7 +173,7 @@ TEST_F(SystemMonitorTest, GetAttachedRemovableStorageAttachDetach) { system_monitor_->ProcessRemovableStorageAttached(kDeviceId2, kDeviceName2, kDevicePath2.value()); - message_loop_.RunAllPending(); + message_loop_.RunUntilIdle(); devices = system_monitor_->GetAttachedRemovableStorage(); ASSERT_EQ(2U, devices.size()); EXPECT_EQ(kDeviceId1, devices[0].device_id); @@ -184,7 +184,7 @@ TEST_F(SystemMonitorTest, GetAttachedRemovableStorageAttachDetach) { EXPECT_EQ(kDevicePath2.value(), devices[1].location); system_monitor_->ProcessRemovableStorageDetached(kDeviceId1); - message_loop_.RunAllPending(); + message_loop_.RunUntilIdle(); devices = system_monitor_->GetAttachedRemovableStorage(); ASSERT_EQ(1U, devices.size()); EXPECT_EQ(kDeviceId2, devices[0].device_id); @@ -192,7 +192,7 @@ TEST_F(SystemMonitorTest, GetAttachedRemovableStorageAttachDetach) { EXPECT_EQ(kDevicePath2.value(), devices[0].location); system_monitor_->ProcessRemovableStorageDetached(kDeviceId2); - message_loop_.RunAllPending(); + message_loop_.RunUntilIdle(); devices = system_monitor_->GetAttachedRemovableStorage(); EXPECT_EQ(0U, devices.size()); } |