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

Unified Diff: chromeos/disks/disk_mount_manager_unittest.cc

Issue 2601413002: Use TaskScheduler instead of WorkerPool in fake_cros_disks_client.cc. (Closed)
Patch Set: add ScopedTaskScheduler in test Created 3 years, 12 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 | « chromeos/dbus/fake_cros_disks_client.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « chromeos/dbus/fake_cros_disks_client.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698