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

Side by Side Diff: chrome/browser/sync/glue/data_type_manager_impl_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/data_type_manager_impl.h" 5 #include "chrome/browser/sync/glue/data_type_manager_impl.h"
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "chrome/browser/sync/glue/backend_data_type_configurer.h" 9 #include "chrome/browser/sync/glue/backend_data_type_configurer.h"
10 #include "chrome/browser/sync/glue/data_type_controller.h" 10 #include "chrome/browser/sync/glue/data_type_controller.h"
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 ModelType model_type) const { 137 ModelType model_type) const {
138 DataTypeController::TypeMap::const_iterator it = 138 DataTypeController::TypeMap::const_iterator it =
139 controllers_.find(model_type); 139 controllers_.find(model_type);
140 if (it == controllers_.end()) { 140 if (it == controllers_.end()) {
141 return NULL; 141 return NULL;
142 } 142 }
143 return make_scoped_refptr( 143 return make_scoped_refptr(
144 static_cast<FakeDataTypeController*>(it->second.get())); 144 static_cast<FakeDataTypeController*>(it->second.get()));
145 } 145 }
146 146
147 MessageLoopForUI ui_loop_; 147 base::MessageLoopForUI ui_loop_;
148 content::TestBrowserThread ui_thread_; 148 content::TestBrowserThread ui_thread_;
149 DataTypeController::TypeMap controllers_; 149 DataTypeController::TypeMap controllers_;
150 FakeBackendDataTypeConfigurer configurer_; 150 FakeBackendDataTypeConfigurer configurer_;
151 DataTypeManagerObserverMock observer_; 151 DataTypeManagerObserverMock observer_;
152 scoped_ptr<DataTypeManagerImpl> dtm_; 152 scoped_ptr<DataTypeManagerImpl> dtm_;
153 }; 153 };
154 154
155 // Set up a DTM with no controllers, configure it, finish downloading, 155 // Set up a DTM with no controllers, configure it, finish downloading,
156 // and then stop it. 156 // and then stop it.
157 TEST_F(SyncDataTypeManagerImplTest, NoControllers) { 157 TEST_F(SyncDataTypeManagerImplTest, NoControllers) {
(...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after
784 EXPECT_EQ(DataTypeManager::CONFIGURING, dtm_->state()); 784 EXPECT_EQ(DataTypeManager::CONFIGURING, dtm_->state());
785 785
786 // Start the preferences controller. We don't need to start controller for 786 // Start the preferences controller. We don't need to start controller for
787 // the NIGORI because it has none. We don't need to start the controller for 787 // the NIGORI because it has none. We don't need to start the controller for
788 // the BOOKMARKS because it was never stopped. 788 // the BOOKMARKS because it was never stopped.
789 GetController(PREFERENCES)->FinishStart(DataTypeController::OK); 789 GetController(PREFERENCES)->FinishStart(DataTypeController::OK);
790 EXPECT_EQ(DataTypeManager::CONFIGURED, dtm_->state()); 790 EXPECT_EQ(DataTypeManager::CONFIGURED, dtm_->state());
791 } 791 }
792 792
793 } // namespace browser_sync 793 } // namespace browser_sync
OLDNEW
« no previous file with comments | « chrome/browser/sync/glue/data_type_manager_impl.cc ('k') | chrome/browser/sync/glue/favicon_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698