Index: chrome/browser/chromeos/system/automatic_reboot_manager_unittest.cc |
diff --git a/chrome/browser/chromeos/system/automatic_reboot_manager_unittest.cc b/chrome/browser/chromeos/system/automatic_reboot_manager_unittest.cc |
index 837d28378301be165e6a809a3e51bd10b1042f19..70c25a2e2a540ead2d8d56d9837f46032d058d7b 100644 |
--- a/chrome/browser/chromeos/system/automatic_reboot_manager_unittest.cc |
+++ b/chrome/browser/chromeos/system/automatic_reboot_manager_unittest.cc |
@@ -11,10 +11,10 @@ |
#include "base/files/scoped_temp_dir.h" |
#include "base/macros.h" |
#include "base/memory/ref_counted.h" |
-#include "base/message_loop/message_loop.h" |
#include "base/path_service.h" |
-#include "base/run_loop.h" |
#include "base/strings/string_number_conversions.h" |
+#include "base/task_scheduler/task_scheduler.h" |
+#include "base/test/scoped_async_task_scheduler.h" |
#include "base/test/simple_test_tick_clock.h" |
#include "base/test/test_mock_time_task_runner.h" |
#include "base/threading/sequenced_worker_pool.h" |
@@ -37,7 +37,6 @@ |
#include "content/public/browser/notification_details.h" |
#include "content/public/browser/notification_service.h" |
#include "content/public/browser/notification_source.h" |
-#include "content/public/test/test_browser_thread.h" |
#include "testing/gmock/include/gmock/gmock.h" |
#include "testing/gtest/include/gtest/gtest.h" |
#include "ui/message_center/message_center.h" |
@@ -202,6 +201,7 @@ class AutomaticRebootManagerBasicTest : public testing::Test { |
bool reboot_after_update_ = false; |
base::ThreadTaskRunnerHandle ui_thread_task_runner_handle_; |
+ base::test::ScopedAsyncTaskScheduler scoped_async_task_scheduler_; |
TestingPrefServiceSimple local_state_; |
MockUserManager* mock_user_manager_; // Not owned. |
@@ -264,9 +264,8 @@ TestAutomaticRebootManagerTaskRunner::~TestAutomaticRebootManagerTaskRunner() { |
} |
void TestAutomaticRebootManagerTaskRunner::OnBeforeSelectingTask() { |
- base::SequencedWorkerPool* blocking_pool = |
- content::BrowserThread::GetBlockingPool(); |
- blocking_pool->FlushForTesting(); |
+ content::BrowserThread::GetBlockingPool()->FlushForTesting(); |
+ base::TaskScheduler::GetInstance()->FlushForTesting(); |
} |
void TestAutomaticRebootManagerTaskRunner::OnAfterTimePassed() { |
@@ -274,9 +273,8 @@ void TestAutomaticRebootManagerTaskRunner::OnAfterTimePassed() { |
} |
void TestAutomaticRebootManagerTaskRunner::OnAfterTaskRun() { |
- base::SequencedWorkerPool* blocking_pool = |
- content::BrowserThread::GetBlockingPool(); |
- blocking_pool->FlushForTesting(); |
+ content::BrowserThread::GetBlockingPool()->FlushForTesting(); |
+ base::TaskScheduler::GetInstance()->FlushForTesting(); |
} |
MockAutomaticRebootManagerObserver::MockAutomaticRebootManagerObserver() |