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

Unified Diff: components/sync/driver/model_type_controller_unittest.cc

Issue 2471943002: [Sync] Make ModelTypeController::DeactivateDataType idempotent (Closed)
Patch Set: Created 4 years, 1 month 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/model_type_controller.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync/driver/model_type_controller_unittest.cc
diff --git a/components/sync/driver/model_type_controller_unittest.cc b/components/sync/driver/model_type_controller_unittest.cc
index 321b45d199506b63c4402cfb8925bd7c61020020..fd6bb598b6d172a0bc7110956d616296fd72a70d 100644
--- a/components/sync/driver/model_type_controller_unittest.cc
+++ b/components/sync/driver/model_type_controller_unittest.cc
@@ -315,7 +315,7 @@ TEST_F(ModelTypeControllerTest, StopWhenDatatypeEnabled) {
RunAllTasks();
StartAssociating();
- controller()->Stop();
+ DeactivateDataTypeAndStop();
RunAllTasks();
EXPECT_EQ(DataTypeController::NOT_RUNNING, controller()->state());
// Ensure that DisableSync is not called.
@@ -338,7 +338,7 @@ TEST_F(ModelTypeControllerTest, StopWhenDatatypeDisabled) {
sync_prefs()->SetPreferredDataTypes(ModelTypeSet(kTestModelType),
ModelTypeSet());
- controller()->Stop();
+ DeactivateDataTypeAndStop();
EXPECT_EQ(DataTypeController::NOT_RUNNING, controller()->state());
// Ensure that DisableSync is called.
PumpModelThread();
@@ -356,7 +356,7 @@ TEST_F(ModelTypeControllerTest, StopWithInitialSyncPrefs) {
// Clearing preferences emulates signing out.
sync_prefs()->ClearPreferences();
- controller()->Stop();
+ DeactivateDataTypeAndStop();
EXPECT_EQ(DataTypeController::NOT_RUNNING, controller()->state());
// Ensure that DisableSync is called.
PumpModelThread();
« no previous file with comments | « components/sync/driver/model_type_controller.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698