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

Side by Side Diff: chrome/browser/sync/glue/model_association_manager_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 "base/callback.h" 5 #include "base/callback.h"
6 #include "base/message_loop.h" 6 #include "base/message_loop.h"
7 #include "chrome/browser/sync/glue/fake_data_type_controller.h" 7 #include "chrome/browser/sync/glue/fake_data_type_controller.h"
8 #include "chrome/browser/sync/glue/model_association_manager.h" 8 #include "chrome/browser/sync/glue/model_association_manager.h"
9 #include "content/public/test/test_browser_thread.h" 9 #include "content/public/test/test_browser_thread.h"
10 #include "testing/gmock/include/gmock/gmock.h" 10 #include "testing/gmock/include/gmock/gmock.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 EXPECT_TRUE(arg0.waiting_to_start.Equals(expected_result.waiting_to_start)); 53 EXPECT_TRUE(arg0.waiting_to_start.Equals(expected_result.waiting_to_start));
54 } 54 }
55 55
56 class SyncModelAssociationManagerTest : public testing::Test { 56 class SyncModelAssociationManagerTest : public testing::Test {
57 public: 57 public:
58 SyncModelAssociationManagerTest() : 58 SyncModelAssociationManagerTest() :
59 ui_thread_(content::BrowserThread::UI, &ui_loop_) { 59 ui_thread_(content::BrowserThread::UI, &ui_loop_) {
60 } 60 }
61 61
62 protected: 62 protected:
63 MessageLoopForUI ui_loop_; 63 base::MessageLoopForUI ui_loop_;
64 content::TestBrowserThread ui_thread_; 64 content::TestBrowserThread ui_thread_;
65 MockModelAssociationResultProcessor result_processor_; 65 MockModelAssociationResultProcessor result_processor_;
66 DataTypeController::TypeMap controllers_; 66 DataTypeController::TypeMap controllers_;
67 }; 67 };
68 68
69 // Start a type and make sure ModelAssociationManager callst the |Start| 69 // Start a type and make sure ModelAssociationManager callst the |Start|
70 // method and calls the callback when it is done. 70 // method and calls the callback when it is done.
71 TEST_F(SyncModelAssociationManagerTest, SimpleModelStart) { 71 TEST_F(SyncModelAssociationManagerTest, SimpleModelStart) {
72 controllers_[syncer::BOOKMARKS] = 72 controllers_[syncer::BOOKMARKS] =
73 new FakeDataTypeController(syncer::BOOKMARKS); 73 new FakeDataTypeController(syncer::BOOKMARKS);
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 358
359 GetController(controllers_, 359 GetController(controllers_,
360 syncer::BOOKMARKS)->SimulateModelLoadFinishing(); 360 syncer::BOOKMARKS)->SimulateModelLoadFinishing();
361 361
362 GetController(controllers_, syncer::BOOKMARKS)->FinishStart( 362 GetController(controllers_, syncer::BOOKMARKS)->FinishStart(
363 DataTypeController::OK); 363 DataTypeController::OK);
364 } 364 }
365 365
366 366
367 } // namespace browser_sync 367 } // namespace browser_sync
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698