| 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/shared_change_processor.h" | 5 #include "components/sync_driver/shared_change_processor.h" |
| 6 | 6 |
| 7 #include <cstddef> | 7 #include <cstddef> |
| 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/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
| 12 #include "base/message_loop/message_loop.h" | 12 #include "base/message_loop/message_loop.h" |
| 13 #include "base/threading/thread.h" | 13 #include "base/threading/thread.h" |
| 14 #include "components/sync_driver/data_type_error_handler_mock.h" | 14 #include "components/sync_driver/data_type_error_handler_mock.h" |
| 15 #include "components/sync_driver/generic_change_processor.h" | 15 #include "components/sync_driver/generic_change_processor.h" |
| 16 #include "components/sync_driver/generic_change_processor_factory.h" | 16 #include "components/sync_driver/generic_change_processor_factory.h" |
| 17 #include "components/sync_driver/sync_api_component_factory.h" | 17 #include "components/sync_driver/sync_api_component_factory.h" |
| 18 #include "sync/api/attachments/attachment_service_impl.h" | 18 #include "sync/api/attachments/attachment_service_impl.h" |
| 19 #include "sync/api/fake_syncable_service.h" | 19 #include "sync/api/fake_syncable_service.h" |
| 20 #include "testing/gmock/include/gmock/gmock.h" | 20 #include "testing/gmock/include/gmock/gmock.h" |
| 21 #include "testing/gtest/include/gtest/gtest.h" | 21 #include "testing/gtest/include/gtest/gtest.h" |
| 22 | 22 |
| 23 namespace browser_sync { | 23 namespace sync_driver { |
| 24 | 24 |
| 25 namespace { | 25 namespace { |
| 26 | 26 |
| 27 using ::testing::NiceMock; | 27 using ::testing::NiceMock; |
| 28 using ::testing::StrictMock; | 28 using ::testing::StrictMock; |
| 29 | 29 |
| 30 class SyncSharedChangeProcessorTest : | 30 class SyncSharedChangeProcessorTest : |
| 31 public testing::Test, | 31 public testing::Test, |
| 32 public browser_sync::SyncApiComponentFactory { | 32 public SyncApiComponentFactory { |
| 33 public: | 33 public: |
| 34 SyncSharedChangeProcessorTest() : backend_thread_("dbthread"), | 34 SyncSharedChangeProcessorTest() : backend_thread_("dbthread"), |
| 35 did_connect_(false) {} | 35 did_connect_(false) {} |
| 36 | 36 |
| 37 virtual ~SyncSharedChangeProcessorTest() { | 37 virtual ~SyncSharedChangeProcessorTest() { |
| 38 EXPECT_FALSE(db_syncable_service_.get()); | 38 EXPECT_FALSE(db_syncable_service_.get()); |
| 39 } | 39 } |
| 40 | 40 |
| 41 virtual base::WeakPtr<syncer::SyncableService> GetSyncableServiceForType( | 41 virtual base::WeakPtr<syncer::SyncableService> GetSyncableServiceForType( |
| 42 syncer::ModelType type) OVERRIDE { | 42 syncer::ModelType type) OVERRIDE { |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 }; | 135 }; |
| 136 | 136 |
| 137 // Simply connect the shared change processor. It should succeed, and | 137 // Simply connect the shared change processor. It should succeed, and |
| 138 // nothing further should happen. | 138 // nothing further should happen. |
| 139 TEST_F(SyncSharedChangeProcessorTest, Basic) { | 139 TEST_F(SyncSharedChangeProcessorTest, Basic) { |
| 140 Connect(); | 140 Connect(); |
| 141 } | 141 } |
| 142 | 142 |
| 143 } // namespace | 143 } // namespace |
| 144 | 144 |
| 145 } // namespace browser_sync | 145 } // namespace sync_driver |
| OLD | NEW |