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

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

Issue 317453002: sync: cut a few profile deps from DataTypeControllers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: move OnUserShareReady Created 6 years, 6 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/ui_data_type_controller_unittest.cc
diff --git a/chrome/browser/sync/glue/ui_data_type_controller_unittest.cc b/chrome/browser/sync/glue/ui_data_type_controller_unittest.cc
index 1c9d53ba664df271cc2fe56f7a9365f683884150..30a9af5875d3d6a5aa499c081556c624da239879 100644
--- a/chrome/browser/sync/glue/ui_data_type_controller_unittest.cc
+++ b/chrome/browser/sync/glue/ui_data_type_controller_unittest.cc
@@ -44,7 +44,6 @@ class SyncUIDataTypeControllerTest : public testing::Test {
base::Closure(),
type_,
profile_sync_factory_.get(),
- &profile_,
&profile_sync_service_);
SetStartExpectations();
}
@@ -69,10 +68,6 @@ class SyncUIDataTypeControllerTest : public testing::Test {
WillOnce(Return(syncable_service_.AsWeakPtr()));
}
- void SetStopExpectations() {
- EXPECT_CALL(profile_sync_service_, DeactivateDataType(type_));
- }
-
void Start() {
preference_dtc_->LoadModels(
base::Bind(&ModelLoadCallbackMock::Run,
@@ -115,7 +110,6 @@ TEST_F(SyncUIDataTypeControllerTest, Start) {
// Start and then stop the DTC. Verify that the service started and stopped
// syncing, and that the DTC went from RUNNING to NOT_RUNNING.
TEST_F(SyncUIDataTypeControllerTest, StartStop) {
- SetStopExpectations();
EXPECT_CALL(start_callback_, Run(DataTypeController::OK, _, _));
EXPECT_EQ(DataTypeController::NOT_RUNNING, preference_dtc_->state());
@@ -131,7 +125,6 @@ TEST_F(SyncUIDataTypeControllerTest, StartStop) {
// Start the DTC when no user nodes are created. Verify that the callback
// is called with OK_FIRST_RUN. Stop the DTC.
TEST_F(SyncUIDataTypeControllerTest, StartStopFirstRun) {
- SetStopExpectations();
EXPECT_CALL(start_callback_, Run(DataTypeController::OK_FIRST_RUN, _, _));
change_processor_->set_sync_model_has_user_created_nodes(false);
@@ -149,7 +142,6 @@ TEST_F(SyncUIDataTypeControllerTest, StartStopFirstRun) {
// is called with ASSOCIATION_FAILED, the DTC goes to state DISABLED, and the
// service is not syncing. Then stop the DTC.
TEST_F(SyncUIDataTypeControllerTest, StartAssociationFailed) {
- SetStopExpectations();
EXPECT_CALL(start_callback_,
Run(DataTypeController::ASSOCIATION_FAILED, _, _));
syncable_service_.set_merge_data_and_start_syncing_error(
@@ -190,7 +182,6 @@ TEST_F(SyncUIDataTypeControllerTest, OnSingleDatatypeUnrecoverableError) {
EXPECT_CALL(profile_sync_service_, DisableBrokenDatatype(_,_,_)).
WillOnce(InvokeWithoutArgs(preference_dtc_.get(),
&UIDataTypeController::Stop));
- SetStopExpectations();
EXPECT_CALL(start_callback_, Run(DataTypeController::OK, _, _));
EXPECT_EQ(DataTypeController::NOT_RUNNING, preference_dtc_->state());
« no previous file with comments | « chrome/browser/sync/glue/ui_data_type_controller.cc ('k') | chrome/browser/sync/profile_sync_components_factory_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698