| 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 3207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3218 IN_PROC_BROWSER_TEST_F(SSLUITest, InPageNavigationAfterLoadSSLState) { | 3218 IN_PROC_BROWSER_TEST_F(SSLUITest, InPageNavigationAfterLoadSSLState) { |
| 3219 ASSERT_TRUE(https_server_.Start()); | 3219 ASSERT_TRUE(https_server_.Start()); |
| 3220 | 3220 |
| 3221 ui_test_utils::NavigateToURL(browser(), | 3221 ui_test_utils::NavigateToURL(browser(), |
| 3222 https_server_.GetURL("/ssl/google.html")); | 3222 https_server_.GetURL("/ssl/google.html")); |
| 3223 WebContents* tab = browser()->tab_strip_model()->GetActiveWebContents(); | 3223 WebContents* tab = browser()->tab_strip_model()->GetActiveWebContents(); |
| 3224 ASSERT_TRUE(content::ExecuteScript(tab, "location.hash = Math.random()")); | 3224 ASSERT_TRUE(content::ExecuteScript(tab, "location.hash = Math.random()")); |
| 3225 CheckAuthenticatedState(tab, AuthState::NONE); | 3225 CheckAuthenticatedState(tab, AuthState::NONE); |
| 3226 } | 3226 } |
| 3227 | 3227 |
| 3228 // Checks that navigations after pushState maintain the SSL status. |
| 3229 IN_PROC_BROWSER_TEST_F(SSLUITest, PushStateSSLState) { |
| 3230 ASSERT_TRUE(https_server_.Start()); |
| 3231 |
| 3232 ui_test_utils::NavigateToURL(browser(), |
| 3233 https_server_.GetURL("/ssl/google.html")); |
| 3234 content::WebContents* tab = |
| 3235 browser()->tab_strip_model()->GetActiveWebContents(); |
| 3236 CheckAuthenticatedState(tab, AuthState::NONE); |
| 3237 |
| 3238 content::TestNavigationObserver observer(tab); |
| 3239 EXPECT_TRUE(ExecuteScript(tab, "history.pushState({}, '', '');")); |
| 3240 observer.Wait(); |
| 3241 CheckAuthenticatedState(tab, AuthState::NONE); |
| 3242 |
| 3243 chrome::GoBack(browser(), WindowOpenDisposition::CURRENT_TAB); |
| 3244 content::WaitForLoadStop(tab); |
| 3245 CheckAuthenticatedState(tab, AuthState::NONE); |
| 3246 } |
| 3247 |
| 3228 // TODO(jcampan): more tests to do below. | 3248 // TODO(jcampan): more tests to do below. |
| 3229 | 3249 |
| 3230 // Visit a page over https that contains a frame with a redirect. | 3250 // Visit a page over https that contains a frame with a redirect. |
| 3231 | 3251 |
| 3232 // XMLHttpRequest insecure content in synchronous mode. | 3252 // XMLHttpRequest insecure content in synchronous mode. |
| 3233 | 3253 |
| 3234 // XMLHttpRequest insecure content in asynchronous mode. | 3254 // XMLHttpRequest insecure content in asynchronous mode. |
| 3235 | 3255 |
| 3236 // XMLHttpRequest over bad ssl in synchronous mode. | 3256 // XMLHttpRequest over bad ssl in synchronous mode. |
| 3237 | 3257 |
| 3238 // XMLHttpRequest over OK ssl in synchronous mode. | 3258 // XMLHttpRequest over OK ssl in synchronous mode. |
| OLD | NEW |