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

Unified Diff: content/browser/site_per_process_browsertest.cc

Issue 2214293003: Revert of Remove usage of SSLStatus in RenderFrameImpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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/ssl/ssl_browser_tests.cc ('k') | content/renderer/render_frame_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/site_per_process_browsertest.cc
diff --git a/content/browser/site_per_process_browsertest.cc b/content/browser/site_per_process_browsertest.cc
index 5f48e6d38e8fb07331f860992b1046c680c9ec07..f17059bab62aa5849af03f39f0aaa9ceef24e9d0 100644
--- a/content/browser/site_per_process_browsertest.cc
+++ b/content/browser/site_per_process_browsertest.cc
@@ -6380,6 +6380,39 @@
EXPECT_FALSE(mixed_child->has_committed_real_load());
}
+// Test that subresources with certificate errors that are redundant
+// with the main page do not get reported to the browser. That is, if
+// https://redundant.test frames https://a.com which frames
+// https://redundant.test which loads an image with certificate errors,
+// the browser doesn't care and doesn't need to know about the image's
+// certificate errors because they are redundant with the main page
+// load.
+IN_PROC_BROWSER_TEST_F(SitePerProcessIgnoreCertErrorsBrowserTest,
+ SubresourceWithRedundantCertificateErrors) {
+ net::EmbeddedTestServer https_server(net::EmbeddedTestServer::TYPE_HTTPS);
+ https_server.ServeFilesFromSourceDirectory("content/test/data");
+ ASSERT_TRUE(https_server.Start());
+ SetupCrossSiteRedirector(&https_server);
+
+ GURL url(https_server.GetURL(
+ "redundant.test", "/mixed-content/redundant-cert-error-in-iframe.html"));
+ EXPECT_TRUE(NavigateToURL(shell(), url));
+
+ NavigationEntry* entry =
+ shell()->web_contents()->GetController().GetLastCommittedEntry();
+ ASSERT_TRUE(entry);
+
+ // The main page was loaded with certificate errors.
+ EXPECT_EQ(SECURITY_STYLE_AUTHENTICATION_BROKEN,
+ entry->GetSSL().security_style);
+
+ // The image that the iframe loaded had certificate errors also, but
+ // they were redundant with the main resource, so the page should not
+ // be marked as displaying insecure content.
+ EXPECT_FALSE(entry->GetSSL().content_status &
+ SSLStatus::DISPLAYED_INSECURE_CONTENT);
+}
+
// Test that subresources with certificate errors that are NOT redundant
// with the main page DO get reported to the browser. That is, if
// https://nonredundant.test frames https://a.com which loads an image
« no previous file with comments | « chrome/browser/ssl/ssl_browser_tests.cc ('k') | content/renderer/render_frame_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698