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

Side by Side Diff: chrome/browser/sync/glue/ui_data_type_controller_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/ui_data_type_controller.h" 5 #include "chrome/browser/sync/glue/ui_data_type_controller.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/tracked_objects.h" 10 #include "base/tracked_objects.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 base::Unretained(&model_load_callback_))); 89 base::Unretained(&model_load_callback_)));
90 preference_dtc_->StartAssociating( 90 preference_dtc_->StartAssociating(
91 base::Bind(&StartCallbackMock::Run, 91 base::Bind(&StartCallbackMock::Run,
92 base::Unretained(&start_callback_))); 92 base::Unretained(&start_callback_)));
93 } 93 }
94 94
95 void PumpLoop() { 95 void PumpLoop() {
96 message_loop_.RunUntilIdle(); 96 message_loop_.RunUntilIdle();
97 } 97 }
98 98
99 MessageLoopForUI message_loop_; 99 base::MessageLoopForUI message_loop_;
100 content::TestBrowserThread ui_thread_; 100 content::TestBrowserThread ui_thread_;
101 ProfileMock profile_; 101 ProfileMock profile_;
102 scoped_ptr<ProfileSyncComponentsFactoryMock> profile_sync_factory_; 102 scoped_ptr<ProfileSyncComponentsFactoryMock> profile_sync_factory_;
103 ProfileSyncServiceMock profile_sync_service_; 103 ProfileSyncServiceMock profile_sync_service_;
104 const syncer::ModelType type_; 104 const syncer::ModelType type_;
105 StartCallbackMock start_callback_; 105 StartCallbackMock start_callback_;
106 ModelLoadCallbackMock model_load_callback_; 106 ModelLoadCallbackMock model_load_callback_;
107 scoped_refptr<UIDataTypeController> preference_dtc_; 107 scoped_refptr<UIDataTypeController> preference_dtc_;
108 scoped_ptr<FakeGenericChangeProcessor> change_processor_; 108 scoped_ptr<FakeGenericChangeProcessor> change_processor_;
109 syncer::FakeSyncableService syncable_service_; 109 syncer::FakeSyncableService syncable_service_;
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 Start(); 209 Start();
210 EXPECT_TRUE(syncable_service_.syncing()); 210 EXPECT_TRUE(syncable_service_.syncing());
211 preference_dtc_->OnSingleDatatypeUnrecoverableError(FROM_HERE, "Test"); 211 preference_dtc_->OnSingleDatatypeUnrecoverableError(FROM_HERE, "Test");
212 PumpLoop(); 212 PumpLoop();
213 EXPECT_EQ(DataTypeController::NOT_RUNNING, preference_dtc_->state()); 213 EXPECT_EQ(DataTypeController::NOT_RUNNING, preference_dtc_->state());
214 EXPECT_FALSE(syncable_service_.syncing()); 214 EXPECT_FALSE(syncable_service_.syncing());
215 } 215 }
216 216
217 } // namespace 217 } // namespace
218 } // namespace browser_sync 218 } // namespace browser_sync
OLDNEW
« no previous file with comments | « chrome/browser/sync/glue/typed_url_model_associator.cc ('k') | chrome/browser/sync/glue/ui_model_worker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698