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

Unified Diff: components/sync_driver/non_ui_data_type_controller_unittest.cc

Issue 1096093004: Correctly stop models when stopping NonUIDataTypeController. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix the tests Created 5 years, 8 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/non_ui_data_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/non_ui_data_type_controller_unittest.cc
diff --git a/components/sync_driver/non_ui_data_type_controller_unittest.cc b/components/sync_driver/non_ui_data_type_controller_unittest.cc
index 3652407f13025374813cdf027a340dd90404b838..27fe04e3f0907ac474f274e6f999211c281ac38f 100644
--- a/components/sync_driver/non_ui_data_type_controller_unittest.cc
+++ b/components/sync_driver/non_ui_data_type_controller_unittest.cc
@@ -393,6 +393,7 @@ TEST_F(SyncNonUIDataTypeControllerTest, AbortDuringAssociation) {
syncer::SyncError::DATATYPE_ERROR,
"Disconnected.",
AUTOFILL_PROFILE)));
+ EXPECT_CALL(*dtc_mock_.get(), StopModels());
EXPECT_CALL(*change_processor_.get(), Disconnect())
.WillOnce(DoAll(SignalEvent(&pause_db_thread), Return(true)));
EXPECT_EQ(DataTypeController::NOT_RUNNING, non_ui_dtc_->state());
@@ -411,7 +412,7 @@ TEST_F(SyncNonUIDataTypeControllerTest, StartAfterSyncShutdown) {
SetStartExpectations();
// We don't expect StopSyncing to be called because local_service_ will never
// have been set.
- EXPECT_CALL(*change_processor_.get(), Disconnect()).WillOnce(Return(true));
+ SetStopExpectations();
EXPECT_EQ(DataTypeController::NOT_RUNNING, non_ui_dtc_->state());
Start();
non_ui_dtc_->Stop();
« no previous file with comments | « components/sync_driver/non_ui_data_type_controller.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698