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" |
(...skipping 11 matching lines...) Expand all Loading... |
22 #include "components/sync/driver/change_processor_mock.h" | 22 #include "components/sync/driver/change_processor_mock.h" |
23 #include "components/sync/driver/data_type_controller_mock.h" | 23 #include "components/sync/driver/data_type_controller_mock.h" |
24 #include "components/sync/driver/fake_sync_client.h" | 24 #include "components/sync/driver/fake_sync_client.h" |
25 #include "components/sync/driver/fake_sync_service.h" | 25 #include "components/sync/driver/fake_sync_service.h" |
26 #include "components/sync/driver/model_associator_mock.h" | 26 #include "components/sync/driver/model_associator_mock.h" |
27 #include "components/sync/driver/sync_api_component_factory_mock.h" | 27 #include "components/sync/driver/sync_api_component_factory_mock.h" |
28 #include "testing/gmock/include/gmock/gmock.h" | 28 #include "testing/gmock/include/gmock/gmock.h" |
29 #include "testing/gtest/include/gtest/gtest.h" | 29 #include "testing/gtest/include/gtest/gtest.h" |
30 | 30 |
31 using bookmarks::BookmarkModel; | 31 using bookmarks::BookmarkModel; |
32 using browser_sync::BookmarkDataTypeController; | 32 using sync_bookmarks::BookmarkDataTypeController; |
33 using sync_driver::ChangeProcessorMock; | 33 using sync_driver::ChangeProcessorMock; |
34 using sync_driver::DataTypeController; | 34 using sync_driver::DataTypeController; |
35 using sync_driver::ModelAssociatorMock; | 35 using sync_driver::ModelAssociatorMock; |
36 using sync_driver::ModelLoadCallbackMock; | 36 using sync_driver::ModelLoadCallbackMock; |
37 using sync_driver::StartCallbackMock; | 37 using sync_driver::StartCallbackMock; |
38 using testing::_; | 38 using testing::_; |
39 using testing::DoAll; | 39 using testing::DoAll; |
40 using testing::InvokeWithoutArgs; | 40 using testing::InvokeWithoutArgs; |
41 using testing::Return; | 41 using testing::Return; |
42 using testing::SetArgumentPointee; | 42 using testing::SetArgumentPointee; |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
293 SetStopExpectations(); | 293 SetStopExpectations(); |
294 | 294 |
295 EXPECT_EQ(DataTypeController::NOT_RUNNING, bookmark_dtc_->state()); | 295 EXPECT_EQ(DataTypeController::NOT_RUNNING, bookmark_dtc_->state()); |
296 | 296 |
297 EXPECT_CALL(start_callback_, Run(DataTypeController::OK, _, _)); | 297 EXPECT_CALL(start_callback_, Run(DataTypeController::OK, _, _)); |
298 Start(); | 298 Start(); |
299 EXPECT_EQ(DataTypeController::RUNNING, bookmark_dtc_->state()); | 299 EXPECT_EQ(DataTypeController::RUNNING, bookmark_dtc_->state()); |
300 bookmark_dtc_->Stop(); | 300 bookmark_dtc_->Stop(); |
301 EXPECT_EQ(DataTypeController::NOT_RUNNING, bookmark_dtc_->state()); | 301 EXPECT_EQ(DataTypeController::NOT_RUNNING, bookmark_dtc_->state()); |
302 } | 302 } |
OLD | NEW |