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

Unified Diff: chromeos/disks/disk_mount_manager_unittest.cc

Issue 2840593002: Remove usage of ScopedTaskScheduler. (Closed)
Patch Set: revert_client_cert_resolver_and_auto_connect_handler Created 3 years, 7 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
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 2f653ebef8e4435dd7c013b7fd7471c38bdcc683..adb9725deb1a91cd4961b183c66f7a1d081a3280 100644
--- a/chromeos/disks/disk_mount_manager_unittest.cc
+++ b/chromeos/disks/disk_mount_manager_unittest.cc
@@ -7,10 +7,9 @@
#include "base/bind.h"
#include "base/memory/ptr_util.h"
-#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 "base/test/scoped_task_environment.h"
#include "chromeos/dbus/dbus_thread_manager.h"
#include "chromeos/dbus/fake_cros_disks_client.h"
#include "chromeos/disks/disk_mount_manager.h"
@@ -406,7 +405,9 @@ std::ostream& operator<<(std::ostream& stream,
class DiskMountManagerTest : public testing::Test {
public:
- DiskMountManagerTest() : scoped_task_scheduler_(&message_loop_) {}
+ DiskMountManagerTest()
+ : scoped_task_environment_(
+ base::test::ScopedTaskEnvironment::MainThreadType::UI) {}
~DiskMountManagerTest() override {}
// Sets up test dbus tread manager and disks mount manager.
@@ -483,8 +484,7 @@ class DiskMountManagerTest : public testing::Test {
std::unique_ptr<MockDiskMountManagerObserver> observer_;
private:
- base::MessageLoopForUI message_loop_;
- base::test::ScopedTaskScheduler scoped_task_scheduler_;
+ base::test::ScopedTaskEnvironment scoped_task_environment_;
};
// Tests that the observer gets notified on attempt to format non existent mount

Powered by Google App Engine
This is Rietveld 408576698