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

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

Issue 10553029: Handle interface to prerenders. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more standard code, simpler handle, no class explosion Created 8 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 <deque> 5 #include <deque>
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "base/stringprintf.h" 10 #include "base/stringprintf.h"
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 222
223 virtual void DidStopLoading() OVERRIDE { 223 virtual void DidStopLoading() OVERRIDE {
224 PrerenderContents::DidStopLoading(); 224 PrerenderContents::DidStopLoading();
225 ++number_of_loads_; 225 ++number_of_loads_;
226 if (ShouldRenderPrerenderedPageCorrectly(expected_final_status_) && 226 if (ShouldRenderPrerenderedPageCorrectly(expected_final_status_) &&
227 number_of_loads_ == expected_number_of_loads_) { 227 number_of_loads_ == expected_number_of_loads_) {
228 MessageLoopForUI::current()->Quit(); 228 MessageLoopForUI::current()->Quit();
229 } 229 }
230 } 230 }
231 231
232 virtual void AddPendingPrerender(const GURL& url, 232 virtual void AddPendingPrerender(scoped_ptr<const GURL& url,
dominich 2012/06/22 15:36:16 i'm pretty sure this doesn't compile ;)
233 const content::Referrer& referrer, 233 const content::Referrer& referrer,
234 const gfx::Size& size) OVERRIDE { 234 const gfx::Size& size) OVERRIDE {
235 PrerenderContents::AddPendingPrerender(url, referrer, size); 235 PrerenderContents::AddPendingPrerender(url, referrer, size);
236 if (expected_pending_prerenders_ > 0 && 236 if (expected_pending_prerenders_ > 0 &&
237 pending_prerender_list()->size() == expected_pending_prerenders_) { 237 pending_prerender_list()->size() == expected_pending_prerenders_) {
238 MessageLoop::current()->Quit(); 238 MessageLoop::current()->Quit();
239 } 239 }
240 } 240 }
241 241
242 virtual WebContents* CreateWebContents( 242 virtual WebContents* CreateWebContents(
243 content::SessionStorageNamespace* session_storage_namespace) OVERRIDE { 243 content::SessionStorageNamespace* session_storage_namespace) OVERRIDE {
244 WebContents* web_contents = PrerenderContents::CreateWebContents( 244 WebContents* web_contents = PrerenderContents::CreateWebContents(
245 session_storage_namespace); 245 session_storage_namespace);
(...skipping 2004 matching lines...) Expand 10 before | Expand all | Expand 10 after
2250 IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest, PrerenderSSLReferrerPolicy) { 2250 IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest, PrerenderSSLReferrerPolicy) {
2251 set_use_https_src(true); 2251 set_use_https_src(true);
2252 set_loader_path("files/prerender/prerender_loader_with_referrer_policy.html"); 2252 set_loader_path("files/prerender/prerender_loader_with_referrer_policy.html");
2253 PrerenderTestURL("files/prerender/prerender_referrer_policy.html", 2253 PrerenderTestURL("files/prerender/prerender_referrer_policy.html",
2254 FINAL_STATUS_USED, 2254 FINAL_STATUS_USED,
2255 1); 2255 1);
2256 NavigateToDestURL(); 2256 NavigateToDestURL();
2257 } 2257 }
2258 2258
2259 } // namespace prerender 2259 } // namespace prerender
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698