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

Side by Side Diff: chrome/browser/prerender/prerender_tracker_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 <set> 5 #include <set>
6 #include <utility> 6 #include <utility>
7 7
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "chrome/browser/prerender/prerender_contents.h" 10 #include "chrome/browser/prerender/prerender_contents.h"
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 } 127 }
128 return final_status; 128 return final_status;
129 } 129 }
130 130
131 // Runs any tasks queued on either thread. 131 // Runs any tasks queued on either thread.
132 void RunEvents() { 132 void RunEvents() {
133 message_loop_.RunUntilIdle(); 133 message_loop_.RunUntilIdle();
134 } 134 }
135 135
136 private: 136 private:
137 MessageLoop message_loop_; 137 base::MessageLoop message_loop_;
138 content::TestBrowserThread ui_thread_; 138 content::TestBrowserThread ui_thread_;
139 content::TestBrowserThread io_thread_; 139 content::TestBrowserThread io_thread_;
140 140
141 TestPrerenderManager prerender_manager_; 141 TestPrerenderManager prerender_manager_;
142 TestPrerenderContents test_contents_; 142 TestPrerenderContents test_contents_;
143 }; 143 };
144 144
145 // Check that a non-existant RenderView is handled correctly. 145 // Check that a non-existant RenderView is handled correctly.
146 TEST_F(PrerenderTrackerTest, PrerenderTrackerNull) { 146 TEST_F(PrerenderTrackerTest, PrerenderTrackerNull) {
147 EXPECT_FALSE(prerender_tracker()->TryUse(kDefaultChildId, kDefaultRouteId)); 147 EXPECT_FALSE(prerender_tracker()->TryUse(kDefaultChildId, kDefaultRouteId));
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 EXPECT_FALSE(prerender_tracker()->IsPrerenderingOnIOThread( 417 EXPECT_FALSE(prerender_tracker()->IsPrerenderingOnIOThread(
418 kDefaultChildId, kDefaultRouteId)); 418 kDefaultChildId, kDefaultRouteId));
419 419
420 EXPECT_FALSE(prerender_tracker()->GetFinalStatus( 420 EXPECT_FALSE(prerender_tracker()->GetFinalStatus(
421 kDefaultChildId + 1, kDefaultRouteId + 1, &final_status)); 421 kDefaultChildId + 1, kDefaultRouteId + 1, &final_status));
422 EXPECT_FALSE(prerender_tracker()->IsPrerenderingOnIOThread( 422 EXPECT_FALSE(prerender_tracker()->IsPrerenderingOnIOThread(
423 kDefaultChildId + 1, kDefaultRouteId + 1)); 423 kDefaultChildId + 1, kDefaultRouteId + 1));
424 } 424 }
425 425
426 } // namespace prerender 426 } // namespace prerender
OLDNEW
« no previous file with comments | « chrome/browser/prerender/prerender_manager_unittest.cc ('k') | chrome/browser/prerender/prerender_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698