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

Side by Side Diff: chrome/browser/sync/test/integration/sessions_helper.cc

Issue 10822030: Move ui_test_utils::RunMessageLoop to test_utils so that it can be reused by content_browsertests. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 4 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/test/integration/sessions_helper.h" 5 #include "chrome/browser/sync/test/integration/sessions_helper.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "base/test/test_timeouts.h" 10 #include "base/test/test_timeouts.h"
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 if (base::TimeTicks::Now() >= end_time) { 132 if (base::TimeTicks::Now() >= end_time) {
133 LOG(ERROR) << "Failed to find all tabs after " 133 LOG(ERROR) << "Failed to find all tabs after "
134 << TestTimeouts::action_max_timeout().InSecondsF() 134 << TestTimeouts::action_max_timeout().InSecondsF()
135 << " seconds."; 135 << " seconds.";
136 return false; 136 return false;
137 } 137 }
138 if (!found) { 138 if (!found) {
139 ProfileSyncServiceFactory::GetInstance()->GetForProfile( 139 ProfileSyncServiceFactory::GetInstance()->GetForProfile(
140 test()->GetProfile(index))->GetSessionModelAssociator()-> 140 test()->GetProfile(index))->GetSessionModelAssociator()->
141 BlockUntilLocalChangeForTest(TestTimeouts::action_max_timeout()); 141 BlockUntilLocalChangeForTest(TestTimeouts::action_max_timeout());
142 ui_test_utils::RunMessageLoop(); 142 content::RunMessageLoop();
143 } 143 }
144 } 144 }
145 } 145 }
146 return true; 146 return true;
147 } 147 }
148 148
149 bool GetLocalWindows(int index, SessionWindowMap* local_windows) { 149 bool GetLocalWindows(int index, SessionWindowMap* local_windows) {
150 // The local session provided by GetLocalSession is owned, and has lifetime 150 // The local session provided by GetLocalSession is owned, and has lifetime
151 // controlled, by the model associator, so we must make our own copy. 151 // controlled, by the model associator, so we must make our own copy.
152 const browser_sync::SyncedSession* local_session; 152 const browser_sync::SyncedSession* local_session;
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 return true; 307 return true;
308 } 308 }
309 309
310 void DeleteForeignSession(int index, std::string session_tag) { 310 void DeleteForeignSession(int index, std::string session_tag) {
311 ProfileSyncServiceFactory::GetInstance()->GetForProfile( 311 ProfileSyncServiceFactory::GetInstance()->GetForProfile(
312 test()->GetProfile(index))-> 312 test()->GetProfile(index))->
313 GetSessionModelAssociator()->DeleteForeignSession(session_tag); 313 GetSessionModelAssociator()->DeleteForeignSession(session_tag);
314 } 314 }
315 315
316 } // namespace sessions_helper 316 } // namespace sessions_helper
OLDNEW
« no previous file with comments | « chrome/browser/sync/test/integration/passwords_helper.cc ('k') | chrome/browser/sync/test/integration/sync_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698