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

Side by Side Diff: chrome/browser/sync/abstract_profile_sync_service_test.cc

Issue 11413050: chrome/browser: Update calls from RunAllPending() to RunUntilIdle(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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/abstract_profile_sync_service_test.h" 5 #include "chrome/browser/sync/abstract_profile_sync_service_test.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "chrome/browser/sync/test_profile_sync_service.h" 10 #include "chrome/browser/sync/test_profile_sync_service.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 51
52 void AbstractProfileSyncServiceTest::SetUp() { 52 void AbstractProfileSyncServiceTest::SetUp() {
53 db_thread_.Start(); 53 db_thread_.Start();
54 file_thread_.Start(); 54 file_thread_.Start();
55 io_thread_.StartIOThread(); 55 io_thread_.StartIOThread();
56 } 56 }
57 57
58 void AbstractProfileSyncServiceTest::TearDown() { 58 void AbstractProfileSyncServiceTest::TearDown() {
59 // Pump messages posted by the sync core thread (which may end up 59 // Pump messages posted by the sync core thread (which may end up
60 // posting on the IO thread). 60 // posting on the IO thread).
61 ui_loop_.RunAllPending(); 61 ui_loop_.RunUntilIdle();
62 io_thread_.Stop(); 62 io_thread_.Stop();
63 file_thread_.Stop(); 63 file_thread_.Stop();
64 db_thread_.Stop(); 64 db_thread_.Stop();
65 ui_loop_.RunAllPending(); 65 ui_loop_.RunUntilIdle();
66 } 66 }
67 67
68 bool AbstractProfileSyncServiceTest::CreateRoot(ModelType model_type) { 68 bool AbstractProfileSyncServiceTest::CreateRoot(ModelType model_type) {
69 return syncer::TestUserShare::CreateRoot(model_type, 69 return syncer::TestUserShare::CreateRoot(model_type,
70 service_->GetUserShare()); 70 service_->GetUserShare());
71 } 71 }
72 72
73 // static 73 // static
74 ProfileKeyedService* AbstractProfileSyncServiceTest::BuildTokenService( 74 ProfileKeyedService* AbstractProfileSyncServiceTest::BuildTokenService(
75 Profile* profile) { 75 Profile* profile) {
(...skipping 17 matching lines...) Expand all
93 return callback_; 93 return callback_;
94 } 94 }
95 95
96 bool CreateRootHelper::success() { 96 bool CreateRootHelper::success() {
97 return success_; 97 return success_;
98 } 98 }
99 99
100 void CreateRootHelper::CreateRootCallback() { 100 void CreateRootHelper::CreateRootCallback() {
101 success_ = test_->CreateRoot(model_type_); 101 success_ = test_->CreateRoot(model_type_);
102 } 102 }
OLDNEW
« no previous file with comments | « chrome/browser/signin/token_service_unittest.cc ('k') | chrome/browser/sync/backend_migrator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698