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

Side by Side Diff: chrome/browser/prerender/prerender_resource_throttle_unittest.cc

Issue 2211473003: Remove calls to deprecated MessageLoop methods on Windows and Linux. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 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
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/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 183
184 TestPrerenderManager* prerender_manager() { 184 TestPrerenderManager* prerender_manager() {
185 return &prerender_manager_; 185 return &prerender_manager_;
186 } 186 }
187 187
188 TestPrerenderContents* test_contents() { 188 TestPrerenderContents* test_contents() {
189 return &test_contents_; 189 return &test_contents_;
190 } 190 }
191 191
192 // Runs any tasks queued on either thread. 192 // Runs any tasks queued on either thread.
193 void RunEvents() { 193 void RunEvents() { base::RunLoop().RunUntilIdle(); }
194 message_loop_.RunUntilIdle();
195 }
196 194
197 private: 195 private:
198 base::MessageLoopForIO message_loop_; 196 base::MessageLoopForIO message_loop_;
199 content::TestBrowserThread ui_thread_; 197 content::TestBrowserThread ui_thread_;
200 content::TestBrowserThread io_thread_; 198 content::TestBrowserThread io_thread_;
201 199
202 TestPrerenderManager prerender_manager_; 200 TestPrerenderManager prerender_manager_;
203 TestPrerenderContents test_contents_; 201 TestPrerenderContents test_contents_;
204 }; 202 };
205 203
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 // We should have cancelled the prerender. 322 // We should have cancelled the prerender.
325 EXPECT_EQ(FINAL_STATUS_BAD_DEFERRED_REDIRECT, 323 EXPECT_EQ(FINAL_STATUS_BAD_DEFERRED_REDIRECT,
326 test_contents()->final_status()); 324 test_contents()->final_status());
327 325
328 // Cleanup work so the prerender is gone. 326 // Cleanup work so the prerender is gone.
329 test_contents()->Cancel(); 327 test_contents()->Cancel();
330 RunEvents(); 328 RunEvents();
331 } 329 }
332 330
333 } // namespace prerender 331 } // namespace prerender
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698