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

Unified Diff: media/midi/midi_manager_usb_unittest.cc

Issue 656793004: Use RunLoop, but do not call RunUntilIdle() multiple times (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « media/midi/midi_manager_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/midi/midi_manager_usb_unittest.cc
diff --git a/media/midi/midi_manager_usb_unittest.cc b/media/midi/midi_manager_usb_unittest.cc
index dda6775af3652a785920f17c916154c271ecd5b4..978658826aeb8dab54faa7f347d2459dfc73c83d 100644
--- a/media/midi/midi_manager_usb_unittest.cc
+++ b/media/midi/midi_manager_usb_unittest.cc
@@ -179,9 +179,10 @@ class MidiManagerUsbTest : public ::testing::Test {
void RunCallbackUntilCallbackInvoked(
bool result, UsbMidiDevice::Devices* devices) {
factory_->callback_.Run(result, devices);
- base::RunLoop run_loop;
- while (!client_->complete_start_session_)
+ while (!client_->complete_start_session_) {
+ base::RunLoop run_loop;
run_loop.RunUntilIdle();
+ }
}
scoped_ptr<MidiManagerUsbForTesting> manager_;
« no previous file with comments | « media/midi/midi_manager_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698