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

Unified Diff: content/browser/site_per_process_browsertest.cc

Issue 2226363002: Track subresources with cert errors separately from mixed content (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
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 5ec546b2435cbce6616c97a18d0ca2c4c88bb0d2..266dfeaef8b1ddd4c634f755fdd2718e64d67221 100644
--- a/content/browser/site_per_process_browsertest.cc
+++ b/content/browser/site_per_process_browsertest.cc
@@ -6382,21 +6382,20 @@ IN_PROC_BROWSER_TEST_F(SitePerProcessIgnoreCertErrorsBrowserTest,
EXPECT_FALSE(mixed_child->has_committed_real_load());
}
-// 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
-// with certificate errors, the browser should be notified about the
-// subresource with certificate errors and downgrade the UI
-// appropriately.
+// Test that subresources with certificate errors get reported to the
+// browser. That is, if https://example.test frames https://a.com which
+// loads an image with certificate errors, the browser should be
+// notified about the subresource with certificate errors and downgrade
+// the UI appropriately.
IN_PROC_BROWSER_TEST_F(SitePerProcessIgnoreCertErrorsBrowserTest,
- SubresourceWithNonRedundantCertificateErrors) {
+ SubresourceWithCertificateErrors) {
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(
- "nonredundant.test",
+ "example.test",
"/mixed-content/non-redundant-cert-error-in-iframe.html"));
EXPECT_TRUE(NavigateToURL(shell(), url));
@@ -6408,12 +6407,11 @@ IN_PROC_BROWSER_TEST_F(SitePerProcessIgnoreCertErrorsBrowserTest,
EXPECT_EQ(SECURITY_STYLE_AUTHENTICATION_BROKEN,
entry->GetSSL().security_style);
- // The image that the iframe loaded had certificate errors also, and
- // they were different than the certificate errors of the main
- // resource, so the page should be marked as having displayed insecure
- // content.
+ // The image that the iframe loaded had certificate errors also, so
+ // the page should be marked as having displayed subresources with
+ // cert errors.
EXPECT_TRUE(entry->GetSSL().content_status &
- SSLStatus::DISPLAYED_INSECURE_CONTENT);
+ SSLStatus::DISPLAYED_CONTENT_WITH_CERT_ERRORS);
}
// Test setting a cross-origin iframe to display: none.

Powered by Google App Engine
This is Rietveld 408576698