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

Unified Diff: chrome/browser/sync/glue/theme_data_type_controller_unittest.cc

Issue 7453014: [Sync] Refactor sync datatype error handling. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments Created 9 years, 5 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: chrome/browser/sync/glue/theme_data_type_controller_unittest.cc
diff --git a/chrome/browser/sync/glue/theme_data_type_controller_unittest.cc b/chrome/browser/sync/glue/theme_data_type_controller_unittest.cc
index 4d2a1ad23c32519b4a5407fbf7b7a848487bd0ed..1c89cbb8d29dc56a01b9ea8b5e77c6fb80571ffe 100644
--- a/chrome/browser/sync/glue/theme_data_type_controller_unittest.cc
+++ b/chrome/browser/sync/glue/theme_data_type_controller_unittest.cc
@@ -58,7 +58,7 @@ class ThemeDataTypeControllerTest : public testing::Test {
WillRepeatedly(Return(true));
EXPECT_CALL(*model_associator_, SyncModelHasUserCreatedNodes(_)).
WillRepeatedly(DoAll(SetArgumentPointee<0>(true), Return(true)));
- EXPECT_CALL(*model_associator_, AssociateModels()).
+ EXPECT_CALL(*model_associator_, AssociateModels(_)).
WillRepeatedly(Return(true));
}
@@ -68,7 +68,7 @@ class ThemeDataTypeControllerTest : public testing::Test {
void SetStopExpectations() {
EXPECT_CALL(service_, DeactivateDataType(_, _));
- EXPECT_CALL(*model_associator_, DisassociateModels());
+ EXPECT_CALL(*model_associator_, DisassociateModels(_));
}
MessageLoopForUI message_loop_;
@@ -116,8 +116,9 @@ TEST_F(ThemeDataTypeControllerTest, StartOk) {
TEST_F(ThemeDataTypeControllerTest, StartAssociationFailed) {
SetStartExpectations();
SetAssociateExpectations();
- EXPECT_CALL(*model_associator_, AssociateModels()).
- WillRepeatedly(Return(false));
+ EXPECT_CALL(*model_associator_, AssociateModels(_)).
+ WillRepeatedly(DoAll(browser_sync::SetSyncError(syncable::THEMES),
+ Return(false)));
EXPECT_CALL(start_callback_, Run(DataTypeController::ASSOCIATION_FAILED, _));
theme_dtc_->Start(NewCallback(&start_callback_, &StartCallback::Run));

Powered by Google App Engine
This is Rietveld 408576698