summaryrefslogtreecommitdiffstats
path: root/chrome/browser/prerender
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/prerender')
-rw-r--r--chrome/browser/prerender/prerender_browsertest.cc23
1 files changed, 23 insertions, 0 deletions
diff --git a/chrome/browser/prerender/prerender_browsertest.cc b/chrome/browser/prerender/prerender_browsertest.cc
index 86ec39a..52e7c21 100644
--- a/chrome/browser/prerender/prerender_browsertest.cc
+++ b/chrome/browser/prerender/prerender_browsertest.cc
@@ -877,4 +877,27 @@ IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest, PrerenderXhrDelete) {
1);
}
+// Checks that an SSL error that comes from a subresource does not cancel
+// the page. Non-main-frame requests are simply cancelled if they run into
+// an SSL problem.
+IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest, PrerenderSSLErrorSubresource) {
+ net::TestServer::HTTPSOptions https_options;
+ https_options.server_certificate =
+ net::TestServer::HTTPSOptions::CERT_MISMATCHED_NAME;
+ net::TestServer https_server(https_options,
+ FilePath(FILE_PATH_LITERAL("chrome/test/data")));
+ ASSERT_TRUE(https_server.Start());
+ GURL https_url = https_server.GetURL("files/prerender/image.jpeg");
+ std::vector<net::TestServer::StringPair> replacement_text;
+ replacement_text.push_back(
+ std::make_pair("REPLACE_WITH_IMAGE_URL", https_url.spec()));
+ std::string replacement_path;
+ ASSERT_TRUE(net::TestServer::GetFilePathWithReplacements(
+ "files/prerender/prerender_with_image.html",
+ replacement_text,
+ &replacement_path));
+ PrerenderTestURL(replacement_path, FINAL_STATUS_USED, 1);
+ NavigateToDestURL();
+}
+
} // namespace prerender