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

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

Issue 9978017: [Sync] - Upload the callstacks for errors so that the line number of error is in callstack. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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
Index: chrome/browser/sync/glue/frontend_data_type_controller_unittest.cc
diff --git a/chrome/browser/sync/glue/frontend_data_type_controller_unittest.cc b/chrome/browser/sync/glue/frontend_data_type_controller_unittest.cc
index 7706b409eefbf67e218235aab97c5d12debd26df..d06758a0c3616a6a277f4d0aa348b38d99932255 100644
--- a/chrome/browser/sync/glue/frontend_data_type_controller_unittest.cc
+++ b/chrome/browser/sync/glue/frontend_data_type_controller_unittest.cc
@@ -109,8 +109,8 @@ class SyncFrontendDataTypeControllerTest : public testing::Test {
WillOnce(Return(true));
EXPECT_CALL(*model_associator_, SyncModelHasUserCreatedNodes(_)).
WillOnce(DoAll(SetArgumentPointee<0>(true), Return(true)));
- EXPECT_CALL(*model_associator_, AssociateModels(_)).
- WillOnce(Return(true));
+ EXPECT_CALL(*model_associator_, AssociateModels()).
+ WillOnce(Return(SyncError()));
EXPECT_CALL(*dtc_mock_, RecordAssociationTime(_));
}
@@ -122,7 +122,8 @@ class SyncFrontendDataTypeControllerTest : public testing::Test {
void SetStopExpectations() {
EXPECT_CALL(*dtc_mock_, CleanUpState());
EXPECT_CALL(service_, DeactivateDataType(_));
- EXPECT_CALL(*model_associator_, DisassociateModels(_));
+ EXPECT_CALL(*model_associator_, DisassociateModels()).
+ WillOnce(Return(SyncError()));
}
void SetStartFailExpectations(DataTypeController::StartResult result) {
@@ -165,8 +166,8 @@ TEST_F(SyncFrontendDataTypeControllerTest, StartFirstRun) {
WillOnce(Return(true));
EXPECT_CALL(*model_associator_, SyncModelHasUserCreatedNodes(_)).
WillOnce(DoAll(SetArgumentPointee<0>(false), Return(true)));
- EXPECT_CALL(*model_associator_, AssociateModels(_)).
- WillOnce(Return(true));
+ EXPECT_CALL(*model_associator_, AssociateModels()).
+ WillOnce(Return(SyncError()));
EXPECT_CALL(*dtc_mock_, RecordAssociationTime(_));
SetActivateExpectations(DataTypeController::OK_FIRST_RUN);
EXPECT_EQ(DataTypeController::NOT_RUNNING, frontend_dtc_->state());
@@ -192,9 +193,11 @@ TEST_F(SyncFrontendDataTypeControllerTest, StartAssociationFailed) {
WillOnce(Return(true));
EXPECT_CALL(*model_associator_, SyncModelHasUserCreatedNodes(_)).
WillOnce(DoAll(SetArgumentPointee<0>(true), Return(true)));
- EXPECT_CALL(*model_associator_, AssociateModels(_)).
- WillOnce(DoAll(browser_sync::SetSyncError(syncable::PREFERENCES),
- Return(false)));
+ EXPECT_CALL(*model_associator_, AssociateModels()).
+ WillOnce(Return(SyncError(FROM_HERE,
+ "error",
+ syncable::PREFERENCES)));
+
EXPECT_CALL(*dtc_mock_, RecordAssociationTime(_));
SetStartFailExpectations(DataTypeController::ASSOCIATION_FAILED);
// Set up association to fail with an association failed error.
« no previous file with comments | « chrome/browser/sync/glue/frontend_data_type_controller.cc ('k') | chrome/browser/sync/glue/model_associator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698