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

Unified 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: '' 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/download/download_util.cc ('k') | chrome/browser/prerender/prerender_contents.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/prerender/prerender_browsertest.cc
===================================================================
--- chrome/browser/prerender/prerender_browsertest.cc (revision 74962)
+++ chrome/browser/prerender/prerender_browsertest.cc (working copy)
@@ -111,7 +111,6 @@
FinalStatus expected_final_status,
int total_navigations) {
ASSERT_TRUE(test_server()->Start());
-
std::string src_path = "files/prerender/prerender_loader.html?";
src_path.append(html_file);
std::string dest_path = "files/prerender/";
@@ -246,6 +245,28 @@
NavigateToDestURL();
}
+// Prerenders a page that contains an automatic download triggered through an
+// iframe. This should not prerender successfully.
+IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest, PrerenderDownloadIFrame) {
+ PrerenderTestURL("prerender_download_iframe.html",
+ FINAL_STATUS_DOWNLOAD, 1);
+}
+
+// Prerenders a page that contains an automatic download triggered through
+// Javascript changing the window.location. This should not prerender
+// successfully.
+IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest, PrerenderDownloadLocation) {
+ PrerenderTestURL("prerender_download_location.html",
+ FINAL_STATUS_DOWNLOAD, 2);
+}
+
+// Prerenders a page that contains an automatic download triggered through a
+// <meta http-equiv="refresh"> tag. This should not prerender successfully.
+IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest, PrerenderDownloadRefresh) {
+ PrerenderTestURL("prerender_download_refresh.html",
+ FINAL_STATUS_DOWNLOAD, 2);
+}
+
// Checks that popups on a prerendered page cause cancellation.
IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest, PrerenderPopup) {
PrerenderTestURL("prerender_popup.html",
« no previous file with comments | « chrome/browser/download/download_util.cc ('k') | chrome/browser/prerender/prerender_contents.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698