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

Unified Diff: chrome/browser/prerender/prerender_browsertest.cc

Issue 6543010: Revert 75393 - Cancel prerender if any of the visited URLs are https.... (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 | « no previous file | chrome/browser/prerender/prerender_contents.h » ('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 75394)
+++ chrome/browser/prerender/prerender_browsertest.cc (working copy)
@@ -114,20 +114,14 @@
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/";
dest_path.append(html_file);
+
+ GURL src_url = test_server()->GetURL(src_path);
dest_url_ = test_server()->GetURL(dest_path);
- std::vector<net::TestServer::StringPair> replacement_text;
- replacement_text.push_back(
- make_pair("REPLACE_WITH_PREFETCH_URL", dest_url_.spec()));
- std::string replacement_path;
- ASSERT_TRUE(net::TestServer::GetFilePathWithReplacements(
- "files/prerender/prerender_loader.html",
- replacement_text,
- &replacement_path));
- GURL src_url = test_server()->GetURL(replacement_path);
-
Profile* profile = browser()->GetSelectedTabContents()->profile();
PrerenderManager* prerender_manager = profile->GetPrerenderManager();
ASSERT_TRUE(prerender_manager);
@@ -297,23 +291,4 @@
FINAL_STATUS_CREATE_NEW_WINDOW, 1);
}
-// Test that page-based redirects to https will cancel prerenders.
-IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest, PrerenderRedirectToHttps) {
- net::TestServer https_server(net::TestServer::TYPE_HTTPS,
- FilePath(FILE_PATH_LITERAL("chrome/test/data")));
- ASSERT_TRUE(https_server.Start());
- GURL https_url = https_server.GetURL("files/prerender/prerender_page.html");
- std::vector<net::TestServer::StringPair> replacement_text;
- replacement_text.push_back(
- make_pair("REPLACE_WITH_HTTPS_URL", https_url.spec()));
- std::string redirect_path;
- ASSERT_TRUE(net::TestServer::GetFilePathWithReplacements(
- "prerender_redirect_to_https.html",
- replacement_text,
- &redirect_path));
- PrerenderTestURL(redirect_path,
- FINAL_STATUS_HTTPS,
- 2);
-}
-
} // namespace prerender
« no previous file with comments | « no previous file | chrome/browser/prerender/prerender_contents.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698