OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_bookmarks/bookmark_data_type_controller.h" | 5 #include "components/sync_bookmarks/bookmark_data_type_controller.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
11 #include "base/callback.h" | 11 #include "base/callback.h" |
12 #include "base/memory/ptr_util.h" | 12 #include "base/memory/ptr_util.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/thread_task_runner_handle.h" | 15 #include "base/threading/thread_task_runner_handle.h" |
16 #include "components/bookmarks/browser/bookmark_model.h" | 16 #include "components/bookmarks/browser/bookmark_model.h" |
17 #include "components/bookmarks/test/bookmark_test_helpers.h" | 17 #include "components/bookmarks/test/bookmark_test_helpers.h" |
18 #include "components/bookmarks/test/test_bookmark_client.h" | 18 #include "components/bookmarks/test/test_bookmark_client.h" |
19 #include "components/history/core/browser/history_service.h" | 19 #include "components/history/core/browser/history_service.h" |
20 #include "components/prefs/testing_pref_service.h" | 20 #include "components/prefs/testing_pref_service.h" |
21 #include "components/sync_driver/change_processor_mock.h" | 21 #include "components/sync_driver/change_processor_mock.h" |
22 #include "components/sync_driver/data_type_controller_mock.h" | 22 #include "components/sync_driver/data_type_controller_mock.h" |
23 #include "components/sync_driver/fake_sync_client.h" | 23 #include "components/sync_driver/fake_sync_client.h" |
24 #include "components/sync_driver/fake_sync_service.h" | 24 #include "components/sync_driver/fake_sync_service.h" |
25 #include "components/sync_driver/model_associator_mock.h" | 25 #include "components/sync_driver/model_associator_mock.h" |
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
298 SetStopExpectations(); | 298 SetStopExpectations(); |
299 | 299 |
300 EXPECT_EQ(DataTypeController::NOT_RUNNING, bookmark_dtc_->state()); | 300 EXPECT_EQ(DataTypeController::NOT_RUNNING, bookmark_dtc_->state()); |
301 | 301 |
302 EXPECT_CALL(start_callback_, Run(DataTypeController::OK, _, _)); | 302 EXPECT_CALL(start_callback_, Run(DataTypeController::OK, _, _)); |
303 Start(); | 303 Start(); |
304 EXPECT_EQ(DataTypeController::RUNNING, bookmark_dtc_->state()); | 304 EXPECT_EQ(DataTypeController::RUNNING, bookmark_dtc_->state()); |
305 bookmark_dtc_->Stop(); | 305 bookmark_dtc_->Stop(); |
306 EXPECT_EQ(DataTypeController::NOT_RUNNING, bookmark_dtc_->state()); | 306 EXPECT_EQ(DataTypeController::NOT_RUNNING, bookmark_dtc_->state()); |
307 } | 307 } |
OLD | NEW |