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

Unified Diff: chrome/browser/system_monitor/removable_device_notifications_window_win_unittest.cc

Issue 11413050: chrome/browser: Update calls from RunAllPending() to RunUntilIdle(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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/system_monitor/removable_device_notifications_window_win_unittest.cc
diff --git a/chrome/browser/system_monitor/removable_device_notifications_window_win_unittest.cc b/chrome/browser/system_monitor/removable_device_notifications_window_win_unittest.cc
index 6c26f8f9e100a24cab737b0502d9d55bd7e7535f..88f770c69458a02377a1a64dee826ab81b5be791 100644
--- a/chrome/browser/system_monitor/removable_device_notifications_window_win_unittest.cc
+++ b/chrome/browser/system_monitor/removable_device_notifications_window_win_unittest.cc
@@ -317,7 +317,7 @@ class RemovableDeviceNotificationsWindowWinTest : public testing::Test {
void PreAttachDevices();
// Runs all the pending tasks on UI thread, FILE thread and blocking thread.
- void RunAllPending();
+ void RunUntilIdle();
void DoMassStorageDeviceAttachedTest(const DeviceIndices& device_indices);
void DoMassStorageDevicesDetachedTest(const DeviceIndices& device_indices);
@@ -352,12 +352,12 @@ void RemovableDeviceNotificationsWindowWinTest::SetUp() {
window_.reset(new TestRemovableDeviceNotificationsWindowWin(
volume_mount_watcher_.get(), new TestPortableDeviceWatcherWin));
window_->InitWithTestData(false);
- RunAllPending();
+ RunUntilIdle();
system_monitor_.AddDevicesChangedObserver(&observer_);
}
void RemovableDeviceNotificationsWindowWinTest::TearDown() {
- RunAllPending();
+ RunUntilIdle();
system_monitor_.RemoveDevicesChangedObserver(&observer_);
}
@@ -391,11 +391,11 @@ void RemovableDeviceNotificationsWindowWinTest::PreAttachDevices() {
window_.reset(new TestRemovableDeviceNotificationsWindowWin(
volume_mount_watcher_.get(), new TestPortableDeviceWatcherWin));
window_->InitWithTestData(true);
- RunAllPending();
+ RunUntilIdle();
}
-void RemovableDeviceNotificationsWindowWinTest::RunAllPending() {
- message_loop_.RunAllPending();
+void RemovableDeviceNotificationsWindowWinTest::RunUntilIdle() {
+ message_loop_.RunUntilIdle();
}
void RemovableDeviceNotificationsWindowWinTest::
@@ -415,7 +415,7 @@ void RemovableDeviceNotificationsWindowWinTest::
}
window_->InjectDeviceChange(DBT_DEVICEARRIVAL,
reinterpret_cast<DWORD>(&volume_broadcast));
- RunAllPending();
+ RunUntilIdle();
}
void RemovableDeviceNotificationsWindowWinTest::
@@ -444,7 +444,7 @@ void RemovableDeviceNotificationsWindowWinTest::
}
window_->InjectDeviceChange(DBT_DEVICEREMOVECOMPLETE,
reinterpret_cast<DWORD>(&volume_broadcast));
- RunAllPending();
+ RunUntilIdle();
}
void RemovableDeviceNotificationsWindowWinTest::DoMTPDeviceTest(
@@ -488,12 +488,12 @@ void RemovableDeviceNotificationsWindowWinTest::DoMTPDeviceTest(
window_->InjectDeviceChange(
test_attach ? DBT_DEVICEARRIVAL : DBT_DEVICEREMOVECOMPLETE,
reinterpret_cast<DWORD>(dev_interface_broadcast.get()));
- RunAllPending();
+ RunUntilIdle();
}
TEST_F(RemovableDeviceNotificationsWindowWinTest, RandomMessage) {
window_->InjectDeviceChange(DBT_DEVICEQUERYREMOVE, NULL);
- RunAllPending();
+ RunUntilIdle();
}
TEST_F(RemovableDeviceNotificationsWindowWinTest, DevicesAttached) {

Powered by Google App Engine
This is Rietveld 408576698