| Index: components/sync_driver/non_ui_model_type_controller_unittest.cc
|
| diff --git a/components/sync_driver/non_ui_model_type_controller_unittest.cc b/components/sync_driver/non_ui_model_type_controller_unittest.cc
|
| index b76f8a07a422e1f193c13acb03169a2714774de6..bb202b89774a5870877db28a8ad399bb4bcf2c32 100644
|
| --- a/components/sync_driver/non_ui_model_type_controller_unittest.cc
|
| +++ b/components/sync_driver/non_ui_model_type_controller_unittest.cc
|
| @@ -267,6 +267,13 @@ class NonUIModelTypeControllerTest : public testing::Test,
|
| }
|
| }
|
|
|
| + void RegisterWithBackend() {
|
| + controller_->RegisterWithBackend(&configurer_);
|
| + if (auto_run_tasks_) {
|
| + RunAllTasks();
|
| + }
|
| + }
|
| +
|
| void StartAssociating() {
|
| controller_->StartAssociating(
|
| base::Bind(&NonUIModelTypeControllerTest::AssociationDone,
|
| @@ -275,14 +282,6 @@ class NonUIModelTypeControllerTest : public testing::Test,
|
| EXPECT_TRUE(association_callback_called_);
|
| }
|
|
|
| - void ActivateDataType() {
|
| - DCHECK(association_callback_called_);
|
| - controller_->ActivateDataType(&configurer_);
|
| - if (auto_run_tasks_) {
|
| - RunAllTasks();
|
| - }
|
| - }
|
| -
|
| void DeactivateDataTypeAndStop() {
|
| controller_->DeactivateDataType(&configurer_);
|
| controller_->Stop();
|
| @@ -380,20 +379,20 @@ TEST_F(NonUIModelTypeControllerTest, ActivateDataTypeOnBackendThread) {
|
| LoadModels();
|
| EXPECT_EQ(sync_driver::DataTypeController::MODEL_LOADED,
|
| controller_->state());
|
| + RegisterWithBackend();
|
| + TestTypeProcessor(true, true); // enabled, connected.
|
|
|
| StartAssociating();
|
| EXPECT_EQ(sync_driver::DataTypeController::RUNNING, controller_->state());
|
| -
|
| - ActivateDataType();
|
| - TestTypeProcessor(true, true); // enabled, connected.
|
| }
|
|
|
| TEST_F(NonUIModelTypeControllerTest, Stop) {
|
| LoadModels();
|
| - StartAssociating();
|
| - ActivateDataType();
|
| + RegisterWithBackend();
|
| TestTypeProcessor(true, true); // enabled, connected.
|
|
|
| + StartAssociating();
|
| +
|
| DeactivateDataTypeAndStop();
|
| EXPECT_EQ(sync_driver::DataTypeController::NOT_RUNNING, controller_->state());
|
| }
|
|
|