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

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

Issue 8341091: [Sync] Ensure new non-frontend datatypes release shared change processor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix diff Created 9 years, 2 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 | « chrome/browser/sync/glue/new_non_frontend_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: chrome/browser/sync/glue/new_non_frontend_data_type_controller_unittest.cc
diff --git a/chrome/browser/sync/glue/new_non_frontend_data_type_controller_unittest.cc b/chrome/browser/sync/glue/new_non_frontend_data_type_controller_unittest.cc
index 5f6c5667056f009326832ed1b4a9406d8a62af19..190f63491d1ef2ced4d97d361ccf75c12d4f1d8c 100644
--- a/chrome/browser/sync/glue/new_non_frontend_data_type_controller_unittest.cc
+++ b/chrome/browser/sync/glue/new_non_frontend_data_type_controller_unittest.cc
@@ -200,6 +200,8 @@ class NewNonFrontendDataTypeControllerTest : public testing::Test {
}
void SetStartFailExpectations(DataTypeController::StartResult result) {
+ EXPECT_CALL(*dtc_mock_, StopLocalServiceAsync());
+ EXPECT_CALL(syncable_service_, StopSyncing(_));
EXPECT_CALL(*dtc_mock_, StopModels());
EXPECT_CALL(*dtc_mock_, RecordStartFailure(result));
EXPECT_CALL(start_callback_, Run(result,_));
@@ -259,7 +261,9 @@ TEST_F(NewNonFrontendDataTypeControllerTest, StartFirstRun) {
TEST_F(NewNonFrontendDataTypeControllerTest, AbortDuringStartModels) {
EXPECT_CALL(*dtc_mock_, StartModels()).WillOnce(Return(false));
- SetStartFailExpectations(DataTypeController::ABORTED);
+ EXPECT_CALL(*dtc_mock_, StopModels());
+ EXPECT_CALL(*dtc_mock_, RecordStartFailure(DataTypeController::ABORTED));
+ EXPECT_CALL(start_callback_, Run(DataTypeController::ABORTED,_));
EXPECT_EQ(DataTypeController::NOT_RUNNING, new_non_frontend_dtc_->state());
new_non_frontend_dtc_->Start(
NewCallback(&start_callback_, &StartCallback::Run));
@@ -284,7 +288,6 @@ TEST_F(NewNonFrontendDataTypeControllerTest, StartAssociationFailed) {
Return(SyncError(FROM_HERE, "failed", AUTOFILL_PROFILE))));
EXPECT_CALL(*dtc_mock_, RecordAssociationTime(_));
SetStartFailExpectations(DataTypeController::ASSOCIATION_FAILED);
- EXPECT_CALL(syncable_service_, StopSyncing(_));
// Set up association to fail with an association failed error.
EXPECT_EQ(DataTypeController::NOT_RUNNING, new_non_frontend_dtc_->state());
new_non_frontend_dtc_->Start(
@@ -349,8 +352,6 @@ TEST_F(NewNonFrontendDataTypeControllerTest, AbortDuringAssociation) {
EXPECT_CALL(*change_processor_, Disconnect()).
WillOnce(DoAll(SignalEvent(&pause_db_thread), Return(true)));
EXPECT_CALL(service_, DeactivateDataType(_));
- EXPECT_CALL(*dtc_mock_, StopLocalServiceAsync());
- EXPECT_CALL(syncable_service_, StopSyncing(_));
EXPECT_EQ(DataTypeController::NOT_RUNNING, new_non_frontend_dtc_->state());
new_non_frontend_dtc_->Start(
NewCallback(&start_callback_, &StartCallback::Run));
« no previous file with comments | « chrome/browser/sync/glue/new_non_frontend_data_type_controller.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698