OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "components/sync_driver/data_type_manager_impl.h" | 5 #include "components/sync_driver/data_type_manager_impl.h" |
6 | 6 |
7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "components/sync_driver/backend_data_type_configurer.h" | 9 #include "components/sync_driver/backend_data_type_configurer.h" |
10 #include "components/sync_driver/data_type_controller.h" | 10 #include "components/sync_driver/data_type_controller.h" |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
250 ModelTypeSet custom_priority_types_; | 250 ModelTypeSet custom_priority_types_; |
251 DataTypeManager::ConfigureResult configure_result_; | 251 DataTypeManager::ConfigureResult configure_result_; |
252 }; | 252 }; |
253 | 253 |
254 // The actual test harness class, parametrized on nigori state (i.e., tests are | 254 // The actual test harness class, parametrized on nigori state (i.e., tests are |
255 // run both configuring with nigori, and configuring without). | 255 // run both configuring with nigori, and configuring without). |
256 class SyncDataTypeManagerImplTest : public testing::Test { | 256 class SyncDataTypeManagerImplTest : public testing::Test { |
257 public: | 257 public: |
258 SyncDataTypeManagerImplTest() {} | 258 SyncDataTypeManagerImplTest() {} |
259 | 259 |
260 virtual ~SyncDataTypeManagerImplTest() { | 260 ~SyncDataTypeManagerImplTest() override {} |
261 } | |
262 | 261 |
263 protected: | 262 protected: |
264 virtual void SetUp() { | 263 void SetUp() override { |
265 dtm_.reset( | 264 dtm_.reset( |
266 new TestDataTypeManager( | 265 new TestDataTypeManager( |
267 syncer::WeakHandle<syncer::DataTypeDebugInfoListener>(), | 266 syncer::WeakHandle<syncer::DataTypeDebugInfoListener>(), |
268 &configurer_, | 267 &configurer_, |
269 &controllers_, | 268 &controllers_, |
270 &encryption_handler_, | 269 &encryption_handler_, |
271 &observer_)); | 270 &observer_)); |
272 } | 271 } |
273 | 272 |
274 void SetConfigureStartExpectation() { | 273 void SetConfigureStartExpectation() { |
(...skipping 1134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1409 EXPECT_EQ(DataTypeManager::DOWNLOAD_PENDING, dtm_->state()); | 1408 EXPECT_EQ(DataTypeManager::DOWNLOAD_PENDING, dtm_->state()); |
1410 EXPECT_EQ(DataTypeController::NOT_RUNNING, GetController(BOOKMARKS)->state()); | 1409 EXPECT_EQ(DataTypeController::NOT_RUNNING, GetController(BOOKMARKS)->state()); |
1411 | 1410 |
1412 FinishDownload(*dtm_, ModelTypeSet(), ModelTypeSet()); | 1411 FinishDownload(*dtm_, ModelTypeSet(), ModelTypeSet()); |
1413 | 1412 |
1414 EXPECT_EQ(DataTypeManager::CONFIGURED, dtm_->state()); | 1413 EXPECT_EQ(DataTypeManager::CONFIGURED, dtm_->state()); |
1415 EXPECT_EQ(0U, configurer_.activated_types().Size()); | 1414 EXPECT_EQ(0U, configurer_.activated_types().Size()); |
1416 } | 1415 } |
1417 | 1416 |
1418 } // namespace sync_driver | 1417 } // namespace sync_driver |
OLD | NEW |