Index: chromeos/disks/disk_mount_manager_unittest.cc |
diff --git a/chromeos/disks/disk_mount_manager_unittest.cc b/chromeos/disks/disk_mount_manager_unittest.cc |
index 6d1cc5d549f74b65567ac56cf4cc698504d4c68b..2f653ebef8e4435dd7c013b7fd7471c38bdcc683 100644 |
--- a/chromeos/disks/disk_mount_manager_unittest.cc |
+++ b/chromeos/disks/disk_mount_manager_unittest.cc |
@@ -10,6 +10,7 @@ |
#include "base/message_loop/message_loop.h" |
#include "base/run_loop.h" |
#include "base/strings/stringprintf.h" |
+#include "base/test/scoped_task_scheduler.h" |
#include "chromeos/dbus/dbus_thread_manager.h" |
#include "chromeos/dbus/fake_cros_disks_client.h" |
#include "chromeos/disks/disk_mount_manager.h" |
@@ -405,7 +406,7 @@ std::ostream& operator<<(std::ostream& stream, |
class DiskMountManagerTest : public testing::Test { |
public: |
- DiskMountManagerTest() {} |
+ DiskMountManagerTest() : scoped_task_scheduler_(&message_loop_) {} |
~DiskMountManagerTest() override {} |
// Sets up test dbus tread manager and disks mount manager. |
@@ -480,7 +481,10 @@ class DiskMountManagerTest : public testing::Test { |
protected: |
chromeos::FakeCrosDisksClient* fake_cros_disks_client_; |
std::unique_ptr<MockDiskMountManagerObserver> observer_; |
+ |
+ private: |
base::MessageLoopForUI message_loop_; |
+ base::test::ScopedTaskScheduler scoped_task_scheduler_; |
}; |
// Tests that the observer gets notified on attempt to format non existent mount |