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

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

Issue 2358983004: Add repro for crash when opening window with --allow-insecure-localhost. (Closed)
Patch Set: Created 4 years, 3 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 | no next file » | 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 c5a237cd799edd5a717ca093b45dc4ae631f6d3f..9ee95281c107a738998d3fbae6d63858c8e56c30 100644
--- a/chrome/browser/ssl/ssl_browser_tests.cc
+++ b/chrome/browser/ssl/ssl_browser_tests.cc
@@ -3245,6 +3245,26 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, PushStateSSLState) {
CheckAuthenticatedState(tab, AuthState::NONE);
}
+class SSLUITestAlllowInsecureHost : public SSLUITest {
estark 2016/09/22 20:34:03 There's already SSLUITestIgnoreLocalhostCertErrors
jam 2016/09/22 22:25:16 Done
+ public:
+ void SetUpCommandLine(base::CommandLine* command_line) override {
+ command_line->AppendSwitch(switches::kAllowInsecureLocalhost);
+ SSLUITest::SetUpCommandLine(command_line);
+ }
+};
+
+// Regression test for http://crbug.com/635833 (crash when a window with no
+// NavigationEntry commits).
+IN_PROC_BROWSER_TEST_F(SSLUITestAlllowInsecureHost,
+ NoCrashOnLoadWithNoNavigationEntry) {
+ ASSERT_TRUE(embedded_test_server()->Start());
+
+ ui_test_utils::NavigateToURL(
+ browser(), embedded_test_server()->GetURL("/ssl/google.html"));
+ WebContents* tab = browser()->tab_strip_model()->GetActiveWebContents();
+ ASSERT_TRUE(content::ExecuteScript(tab, "window.open()"));
+}
+
// TODO(jcampan): more tests to do below.
// Visit a page over https that contains a frame with a redirect.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698