diff options
Diffstat (limited to 'device/bluetooth/bluetooth_audio_sink_bluez_unittest.cc')
-rw-r--r-- | device/bluetooth/bluetooth_audio_sink_bluez_unittest.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/device/bluetooth/bluetooth_audio_sink_bluez_unittest.cc b/device/bluetooth/bluetooth_audio_sink_bluez_unittest.cc index 25b53d5..235ba2d 100644 --- a/device/bluetooth/bluetooth_audio_sink_bluez_unittest.cc +++ b/device/bluetooth/bluetooth_audio_sink_bluez_unittest.cc @@ -132,6 +132,7 @@ class BluetoothAudioSinkBlueZTest : public testing::Test { BluetoothAdapterFactory::GetAdapter( base::Bind(&BluetoothAudioSinkBlueZTest::GetAdapterCallback, base::Unretained(this))); + base::MessageLoop::current()->Run(); } // Called whenever BluetoothAdapter is retrieved successfully. @@ -152,6 +153,11 @@ class BluetoothAudioSinkBlueZTest : public testing::Test { // Resets callback_count_. --callback_count_; + + if (base::MessageLoop::current() && + base::MessageLoop::current()->is_running()) { + base::MessageLoop::current()->QuitWhenIdle(); + } } // Registers BluetoothAudioSinkBlueZ with default codec and capabilities. |