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

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

Issue 6459005: Cancel prerender when we discover a download starting from a page we are prer... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Adding browser test Created 9 years, 10 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/path_service.h" 6 #include "base/path_service.h"
7 #include "chrome/browser/prerender/prerender_contents.h" 7 #include "chrome/browser/prerender/prerender_contents.h"
8 #include "chrome/browser/prerender/prerender_manager.h" 8 #include "chrome/browser/prerender/prerender_manager.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/tab_contents/tab_contents.h" 10 #include "chrome/browser/tab_contents/tab_contents.h"
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 PrerenderTestURL("prerender_http_auth_container.html", 235 PrerenderTestURL("prerender_http_auth_container.html",
236 PrerenderContents::FINAL_STATUS_AUTH_NEEDED, 1); 236 PrerenderContents::FINAL_STATUS_AUTH_NEEDED, 1);
237 } 237 }
238 238
239 // Checks that redirects work with prerendering. 239 // Checks that redirects work with prerendering.
240 IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest, PrerenderRedirect) { 240 IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest, PrerenderRedirect) {
241 PrerenderTestURL("prerender_redirect.html", 241 PrerenderTestURL("prerender_redirect.html",
242 PrerenderContents::FINAL_STATUS_USED, 2); 242 PrerenderContents::FINAL_STATUS_USED, 2);
243 NavigateToDestURL(); 243 NavigateToDestURL();
244 } 244 }
245
246 // Prerenders a page that contains an automatic download. This should not
247 // prerender successfully
248 IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest, PrerenderDownload) {
249 PrerenderTestURL("prerender_download.html",
250 PrerenderContents::FINAL_STATUS_DOWNLOAD, 1);
251 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/prerender/prerender_contents.h » ('j') | chrome/browser/prerender/prerender_contents.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698