OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/ui_model_type_controller.h" | 5 #include "components/sync_driver/ui_model_type_controller.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
12 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
13 #include "base/message_loop/message_loop.h" | 13 #include "base/message_loop/message_loop.h" |
14 #include "base/run_loop.h" | 14 #include "base/run_loop.h" |
15 #include "base/sequenced_task_runner.h" | 15 #include "base/sequenced_task_runner.h" |
16 #include "base/test/test_simple_task_runner.h" | 16 #include "base/test/test_simple_task_runner.h" |
17 #include "base/threading/thread.h" | 17 #include "base/threading/thread.h" |
| 18 #include "components/sync/api/fake_model_type_service.h" |
| 19 #include "components/sync/core/activation_context.h" |
| 20 #include "components/sync/core/shared_model_type_processor.h" |
| 21 #include "components/sync/engine_impl/commit_queue.h" |
18 #include "components/sync_driver/backend_data_type_configurer.h" | 22 #include "components/sync_driver/backend_data_type_configurer.h" |
19 #include "components/sync_driver/fake_sync_client.h" | 23 #include "components/sync_driver/fake_sync_client.h" |
20 #include "sync/api/fake_model_type_service.h" | |
21 #include "sync/engine/commit_queue.h" | |
22 #include "sync/internal_api/public/activation_context.h" | |
23 #include "sync/internal_api/public/shared_model_type_processor.h" | |
24 #include "testing/gtest/include/gtest/gtest.h" | 24 #include "testing/gtest/include/gtest/gtest.h" |
25 | 25 |
26 namespace sync_driver_v2 { | 26 namespace sync_driver_v2 { |
27 | 27 |
28 namespace { | 28 namespace { |
29 | 29 |
30 // Test controller derived from UIModelTypeController. | 30 // Test controller derived from UIModelTypeController. |
31 class TestUIModelTypeController : public UIModelTypeController { | 31 class TestUIModelTypeController : public UIModelTypeController { |
32 public: | 32 public: |
33 TestUIModelTypeController( | 33 TestUIModelTypeController( |
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
283 LoadModels(); | 283 LoadModels(); |
284 RegisterWithBackend(); | 284 RegisterWithBackend(); |
285 ExpectProcessorConnected(true); | 285 ExpectProcessorConnected(true); |
286 StartAssociating(); | 286 StartAssociating(); |
287 | 287 |
288 DeactivateDataTypeAndStop(); | 288 DeactivateDataTypeAndStop(); |
289 EXPECT_EQ(sync_driver::DataTypeController::NOT_RUNNING, controller_->state()); | 289 EXPECT_EQ(sync_driver::DataTypeController::NOT_RUNNING, controller_->state()); |
290 } | 290 } |
291 | 291 |
292 } // namespace sync_driver_v2 | 292 } // namespace sync_driver_v2 |
OLD | NEW |