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

Side by Side Diff: chrome/browser/prerender/prerender_tracker_unittest.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 <set> 5 #include <set>
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "chrome/browser/prerender/prerender_manager.h" 9 #include "chrome/browser/prerender/prerender_manager.h"
10 #include "chrome/browser/prerender/prerender_tracker.h" 10 #include "chrome/browser/prerender/prerender_tracker.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 FinalStatus final_status; 61 FinalStatus final_status;
62 if (!prerender_tracker()->GetFinalStatus(child_id, route_id, 62 if (!prerender_tracker()->GetFinalStatus(child_id, route_id,
63 &final_status)) { 63 &final_status)) {
64 return -1; 64 return -1;
65 } 65 }
66 return final_status; 66 return final_status;
67 } 67 }
68 68
69 // Runs any tasks queued on either thread. 69 // Runs any tasks queued on either thread.
70 void RunEvents() { 70 void RunEvents() {
71 message_loop_.RunAllPending(); 71 message_loop_.RunUntilIdle();
72 } 72 }
73 73
74 private: 74 private:
75 MessageLoop message_loop_; 75 MessageLoop message_loop_;
76 content::TestBrowserThread ui_thread_; 76 content::TestBrowserThread ui_thread_;
77 content::TestBrowserThread io_thread_; 77 content::TestBrowserThread io_thread_;
78 78
79 scoped_ptr<TestPrerenderManager> prerender_manager_; 79 scoped_ptr<TestPrerenderManager> prerender_manager_;
80 }; 80 };
81 81
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 289
290 FinalStatus final_status; 290 FinalStatus final_status;
291 EXPECT_FALSE(prerender_tracker()->GetFinalStatus(0, 0, &final_status)); 291 EXPECT_FALSE(prerender_tracker()->GetFinalStatus(0, 0, &final_status));
292 EXPECT_FALSE(prerender_tracker()->IsPrerenderingOnIOThread(0, 0)); 292 EXPECT_FALSE(prerender_tracker()->IsPrerenderingOnIOThread(0, 0));
293 293
294 EXPECT_FALSE(prerender_tracker()->GetFinalStatus(1, 2, &final_status)); 294 EXPECT_FALSE(prerender_tracker()->GetFinalStatus(1, 2, &final_status));
295 EXPECT_FALSE(prerender_tracker()->IsPrerenderingOnIOThread(1, 2)); 295 EXPECT_FALSE(prerender_tracker()->IsPrerenderingOnIOThread(1, 2));
296 } 296 }
297 297
298 } // namespace prerender 298 } // namespace prerender
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698