Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <utility> | 5 #include <utility> |
| 6 | 6 |
| 7 #include "base/base_switches.h" | 7 #include "base/base_switches.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/bind_helpers.h" | 9 #include "base/bind_helpers.h" |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 3227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3238 content::TestNavigationObserver observer(tab); | 3238 content::TestNavigationObserver observer(tab); |
| 3239 EXPECT_TRUE(ExecuteScript(tab, "history.pushState({}, '', '');")); | 3239 EXPECT_TRUE(ExecuteScript(tab, "history.pushState({}, '', '');")); |
| 3240 observer.Wait(); | 3240 observer.Wait(); |
| 3241 CheckAuthenticatedState(tab, AuthState::NONE); | 3241 CheckAuthenticatedState(tab, AuthState::NONE); |
| 3242 | 3242 |
| 3243 chrome::GoBack(browser(), WindowOpenDisposition::CURRENT_TAB); | 3243 chrome::GoBack(browser(), WindowOpenDisposition::CURRENT_TAB); |
| 3244 content::WaitForLoadStop(tab); | 3244 content::WaitForLoadStop(tab); |
| 3245 CheckAuthenticatedState(tab, AuthState::NONE); | 3245 CheckAuthenticatedState(tab, AuthState::NONE); |
| 3246 } | 3246 } |
| 3247 | 3247 |
| 3248 class SSLUITestAlllowInsecureHost : public SSLUITest { | |
|
estark
2016/09/22 20:34:03
There's already SSLUITestIgnoreLocalhostCertErrors
jam
2016/09/22 22:25:16
Done
| |
| 3249 public: | |
| 3250 void SetUpCommandLine(base::CommandLine* command_line) override { | |
| 3251 command_line->AppendSwitch(switches::kAllowInsecureLocalhost); | |
| 3252 SSLUITest::SetUpCommandLine(command_line); | |
| 3253 } | |
| 3254 }; | |
| 3255 | |
| 3256 // Regression test for http://crbug.com/635833 (crash when a window with no | |
| 3257 // NavigationEntry commits). | |
| 3258 IN_PROC_BROWSER_TEST_F(SSLUITestAlllowInsecureHost, | |
| 3259 NoCrashOnLoadWithNoNavigationEntry) { | |
| 3260 ASSERT_TRUE(embedded_test_server()->Start()); | |
| 3261 | |
| 3262 ui_test_utils::NavigateToURL( | |
| 3263 browser(), embedded_test_server()->GetURL("/ssl/google.html")); | |
| 3264 WebContents* tab = browser()->tab_strip_model()->GetActiveWebContents(); | |
| 3265 ASSERT_TRUE(content::ExecuteScript(tab, "window.open()")); | |
| 3266 } | |
| 3267 | |
| 3248 // TODO(jcampan): more tests to do below. | 3268 // TODO(jcampan): more tests to do below. |
| 3249 | 3269 |
| 3250 // Visit a page over https that contains a frame with a redirect. | 3270 // Visit a page over https that contains a frame with a redirect. |
| 3251 | 3271 |
| 3252 // XMLHttpRequest insecure content in synchronous mode. | 3272 // XMLHttpRequest insecure content in synchronous mode. |
| 3253 | 3273 |
| 3254 // XMLHttpRequest insecure content in asynchronous mode. | 3274 // XMLHttpRequest insecure content in asynchronous mode. |
| 3255 | 3275 |
| 3256 // XMLHttpRequest over bad ssl in synchronous mode. | 3276 // XMLHttpRequest over bad ssl in synchronous mode. |
| 3257 | 3277 |
| 3258 // XMLHttpRequest over OK ssl in synchronous mode. | 3278 // XMLHttpRequest over OK ssl in synchronous mode. |
| OLD | NEW |