diff options
author | cbentzel@chromium.org <cbentzel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-05 02:40:00 +0000 |
---|---|---|
committer | cbentzel@chromium.org <cbentzel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-05 02:40:00 +0000 |
commit | 074fbe0fc86a68dc7078159b95c9bc5c6b9834e4 (patch) | |
tree | f03065fef410b0305e1767b16b8ca47c4cbc1c08 /chrome/browser/prerender | |
parent | 5ab0e300a3ada09918bfdad27da1bd6335b389d7 (diff) | |
download | chromium_src-074fbe0fc86a68dc7078159b95c9bc5c6b9834e4.zip chromium_src-074fbe0fc86a68dc7078159b95c9bc5c6b9834e4.tar.gz chromium_src-074fbe0fc86a68dc7078159b95c9bc5c6b9834e4.tar.bz2 |
Browser test for SSL errors on subresources during prerender.
BUG=71209
TEST=browser_tests --gtest_filter="*PrerenderSSLErrorSubresource*"
Review URL: http://codereview.chromium.org/6912037
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84201 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/prerender')
-rw-r--r-- | chrome/browser/prerender/prerender_browsertest.cc | 23 |
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 |