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

Unified Diff: chrome/browser/ssl/ssl_browser_tests.cc

Issue 1659163006: Teach navigation throttles how to cancel requests in WillProcessResponse. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Disable the test on WIN. Created 4 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 | content/browser/frame_host/navigation_handle_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ssl/ssl_browser_tests.cc
diff --git a/chrome/browser/ssl/ssl_browser_tests.cc b/chrome/browser/ssl/ssl_browser_tests.cc
index 8ec45cdbc7b483bf2e16e0c5e176685829676a7f..dcac5068986a590438cb51102de23fe118ed094d 100644
--- a/chrome/browser/ssl/ssl_browser_tests.cc
+++ b/chrome/browser/ssl/ssl_browser_tests.cc
@@ -1120,7 +1120,15 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, TestWSSInvalidCertAndGoForward) {
// Ensure that non-standard origins are marked correctly when the
// MarkNonSecureAs field trial is enabled.
-IN_PROC_BROWSER_TEST_F(SSLUITest, TestMarkNonSecureAs) {
+//
+// Disabled on Windows until `file:///` navigation works under OOPIF.
+// https://crbug.com/574997
+#if defined(OS_WIN)
+#define MAYBE_MarkFileAsNonSecure DISABLED_MarkFileAsNonSecure
+#else
+#define MAYBE_MarkFileAsNonSecure MarkFileAsNonSecure
+#endif
+IN_PROC_BROWSER_TEST_F(SSLUITest, MAYBE_MarkFileAsNonSecure) {
scoped_refptr<base::FieldTrial> trial =
base::FieldTrialList::CreateFieldTrial(
"MarkNonSecureAs",
@@ -1134,17 +1142,62 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, TestMarkNonSecureAs) {
ChromeSecurityStateModelClient::FromWebContents(contents);
ASSERT_TRUE(model_client);
- ui_test_utils::NavigateToURL(browser(), GURL("file:/"));
+ ui_test_utils::NavigateToURL(browser(), GURL("file:///"));
EXPECT_EQ(security_state::SecurityStateModel::NONE,
model_client->GetSecurityInfo().security_level);
+}
+
+IN_PROC_BROWSER_TEST_F(SSLUITest, MarkAboutAsNonSecure) {
+ scoped_refptr<base::FieldTrial> trial =
+ base::FieldTrialList::CreateFieldTrial(
+ "MarkNonSecureAs",
+ security_state::switches::kMarkNonSecureAsNonSecure);
+
+ content::WebContents* contents =
+ browser()->tab_strip_model()->GetActiveWebContents();
+ ASSERT_TRUE(contents);
+
+ ChromeSecurityStateModelClient* model_client =
+ ChromeSecurityStateModelClient::FromWebContents(contents);
+ ASSERT_TRUE(model_client);
ui_test_utils::NavigateToURL(browser(), GURL("about:blank"));
EXPECT_EQ(security_state::SecurityStateModel::NONE,
model_client->GetSecurityInfo().security_level);
+}
+
+IN_PROC_BROWSER_TEST_F(SSLUITest, MarkDataAsNonSecure) {
+ scoped_refptr<base::FieldTrial> trial =
+ base::FieldTrialList::CreateFieldTrial(
+ "MarkNonSecureAs",
+ security_state::switches::kMarkNonSecureAsNonSecure);
+
+ content::WebContents* contents =
+ browser()->tab_strip_model()->GetActiveWebContents();
+ ASSERT_TRUE(contents);
+
+ ChromeSecurityStateModelClient* model_client =
+ ChromeSecurityStateModelClient::FromWebContents(contents);
+ ASSERT_TRUE(model_client);
ui_test_utils::NavigateToURL(browser(), GURL("data:text/plain,hello"));
EXPECT_EQ(security_state::SecurityStateModel::NONE,
model_client->GetSecurityInfo().security_level);
+}
+
+IN_PROC_BROWSER_TEST_F(SSLUITest, MarkBlobAsNonSecure) {
+ scoped_refptr<base::FieldTrial> trial =
+ base::FieldTrialList::CreateFieldTrial(
+ "MarkNonSecureAs",
+ security_state::switches::kMarkNonSecureAsNonSecure);
+
+ content::WebContents* contents =
+ browser()->tab_strip_model()->GetActiveWebContents();
+ ASSERT_TRUE(contents);
+
+ ChromeSecurityStateModelClient* model_client =
+ ChromeSecurityStateModelClient::FromWebContents(contents);
+ ASSERT_TRUE(model_client);
ui_test_utils::NavigateToURL(
browser(),
« no previous file with comments | « no previous file | content/browser/frame_host/navigation_handle_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698