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

Unified Diff: components/sync_driver/ui_data_type_controller_unittest.cc

Issue 1144153004: components: Remove use of MessageLoopProxy and deprecated MessageLoop APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Created 5 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
« no previous file with comments | « components/sync_driver/ui_data_type_controller.cc ('k') | components/timers/alarm_timer_chromeos.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync_driver/ui_data_type_controller_unittest.cc
diff --git a/components/sync_driver/ui_data_type_controller_unittest.cc b/components/sync_driver/ui_data_type_controller_unittest.cc
index 8d0f70c8ab981057c00225d79f35de97f2bbbafa..8b5b5d098331daef544d69cd352ad98bc5197c5f 100644
--- a/components/sync_driver/ui_data_type_controller_unittest.cc
+++ b/components/sync_driver/ui_data_type_controller_unittest.cc
@@ -5,8 +5,10 @@
#include "components/sync_driver/ui_data_type_controller.h"
#include "base/bind.h"
+#include "base/location.h"
#include "base/memory/scoped_ptr.h"
-#include "base/message_loop/message_loop.h"
+#include "base/single_thread_task_runner.h"
+#include "base/thread_task_runner_handle.h"
#include "base/tracked_objects.h"
#include "components/sync_driver/data_type_controller_mock.h"
#include "components/sync_driver/fake_generic_change_processor.h"
@@ -35,12 +37,8 @@ class SyncUIDataTypeControllerTest : public testing::Test,
change_processor_(NULL) {}
void SetUp() override {
- preference_dtc_ =
- new UIDataTypeController(
- base::MessageLoopProxy::current(),
- base::Closure(),
- type_,
- this);
+ preference_dtc_ = new UIDataTypeController(
+ base::ThreadTaskRunnerHandle::Get(), base::Closure(), type_, this);
SetStartExpectations();
}
@@ -132,9 +130,8 @@ TEST_F(SyncUIDataTypeControllerTest, StartStop) {
TEST_F(SyncUIDataTypeControllerTest, StartStopBeforeAssociation) {
EXPECT_EQ(DataTypeController::NOT_RUNNING, preference_dtc_->state());
EXPECT_FALSE(syncable_service_.syncing());
- message_loop_.PostTask(FROM_HERE,
- base::Bind(&UIDataTypeController::Stop,
- preference_dtc_));
+ message_loop_.task_runner()->PostTask(
+ FROM_HERE, base::Bind(&UIDataTypeController::Stop, preference_dtc_));
Start();
EXPECT_EQ(DataTypeController::NOT_RUNNING, preference_dtc_->state());
EXPECT_FALSE(syncable_service_.syncing());
« no previous file with comments | « components/sync_driver/ui_data_type_controller.cc ('k') | components/timers/alarm_timer_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698