Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(316)

Side by Side Diff: chrome/browser/sync/glue/shared_change_processor_unittest.cc

Issue 14113053: chrome: Use base::MessageLoop. (Part 3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase again Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
OLDNEW
« no previous file with comments | « chrome/browser/sync/glue/session_model_associator_unittest.cc ('k') | chrome/browser/sync/glue/sync_backend_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698