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 "chrome/browser/sync/glue/shared_change_processor.h" | 5 #include "chrome/browser/sync/glue/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" |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 EXPECT_CALL(sync_factory_, GetSyncableServiceForType(syncer::AUTOFILL)). | 105 EXPECT_CALL(sync_factory_, GetSyncableServiceForType(syncer::AUTOFILL)). |
106 WillOnce(GetWeakPtrToSyncableService(db_syncable_service_.get())); | 106 WillOnce(GetWeakPtrToSyncableService(db_syncable_service_.get())); |
107 EXPECT_TRUE(shared_change_processor->Connect( | 107 EXPECT_TRUE(shared_change_processor->Connect( |
108 &sync_factory_, | 108 &sync_factory_, |
109 &sync_service_, | 109 &sync_service_, |
110 &error_handler_, | 110 &error_handler_, |
111 syncer::AUTOFILL, | 111 syncer::AUTOFILL, |
112 base::WeakPtr<syncer::SyncMergeResult>())); | 112 base::WeakPtr<syncer::SyncMergeResult>())); |
113 } | 113 } |
114 | 114 |
115 MessageLoopForUI ui_loop_; | 115 base::MessageLoopForUI ui_loop_; |
116 content::TestBrowserThread ui_thread_; | 116 content::TestBrowserThread ui_thread_; |
117 content::TestBrowserThread db_thread_; | 117 content::TestBrowserThread db_thread_; |
118 | 118 |
119 scoped_refptr<SharedChangeProcessor> shared_change_processor_; | 119 scoped_refptr<SharedChangeProcessor> shared_change_processor_; |
120 NiceMock<ProfileSyncComponentsFactoryMock> sync_factory_; | 120 NiceMock<ProfileSyncComponentsFactoryMock> sync_factory_; |
121 NiceMock<ProfileSyncServiceMock> sync_service_; | 121 NiceMock<ProfileSyncServiceMock> sync_service_; |
122 StrictMock<DataTypeErrorHandlerMock> error_handler_; | 122 StrictMock<DataTypeErrorHandlerMock> error_handler_; |
123 | 123 |
124 // Used only on DB thread. | 124 // Used only on DB thread. |
125 scoped_ptr<syncer::FakeSyncableService> db_syncable_service_; | 125 scoped_ptr<syncer::FakeSyncableService> db_syncable_service_; |
126 }; | 126 }; |
127 | 127 |
128 // Simply connect the shared change processor. It should succeed, and | 128 // Simply connect the shared change processor. It should succeed, and |
129 // nothing further should happen. | 129 // nothing further should happen. |
130 TEST_F(SyncSharedChangeProcessorTest, Basic) { | 130 TEST_F(SyncSharedChangeProcessorTest, Basic) { |
131 Connect(); | 131 Connect(); |
132 } | 132 } |
133 | 133 |
134 } // namespace | 134 } // namespace |
135 | 135 |
136 } // namespace browser_sync | 136 } // namespace browser_sync |
OLD | NEW |