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 3133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3144 WebContents::CreateParams params(tab->GetBrowserContext()); | 3144 WebContents::CreateParams params(tab->GetBrowserContext()); |
3145 WebContents* tab2 = WebContents::Create(params); | 3145 WebContents* tab2 = WebContents::Create(params); |
3146 tab->GetDelegate()->AddNewContents( | 3146 tab->GetDelegate()->AddNewContents( |
3147 nullptr, tab2, WindowOpenDisposition::NEW_FOREGROUND_TAB, gfx::Rect(), | 3147 nullptr, tab2, WindowOpenDisposition::NEW_FOREGROUND_TAB, gfx::Rect(), |
3148 false, nullptr); | 3148 false, nullptr); |
3149 std::vector<std::unique_ptr<NavigationEntry>> entries; | 3149 std::vector<std::unique_ptr<NavigationEntry>> entries; |
3150 entries.push_back(std::move(restored_entry)); | 3150 entries.push_back(std::move(restored_entry)); |
3151 content::TestNavigationObserver observer(tab2); | 3151 content::TestNavigationObserver observer(tab2); |
3152 tab2->GetController().Restore( | 3152 tab2->GetController().Restore( |
3153 entries.size() - 1, | 3153 entries.size() - 1, |
3154 NavigationController::RESTORE_LAST_SESSION_EXITED_CLEANLY, &entries); | 3154 content::RestoreType::LAST_SESSION_EXITED_CLEANLY, &entries); |
3155 tab2->GetController().LoadIfNecessary(); | 3155 tab2->GetController().LoadIfNecessary(); |
3156 observer.Wait(); | 3156 observer.Wait(); |
3157 CheckAuthenticatedState(tab2, AuthState::NONE); | 3157 CheckAuthenticatedState(tab2, AuthState::NONE); |
3158 } | 3158 } |
3159 | 3159 |
3160 // Simulate the URL changing when the user presses enter in the omnibox. This | 3160 // Simulate the URL changing when the user presses enter in the omnibox. This |
3161 // could happen when the user's login is expired and the server redirects them | 3161 // could happen when the user's login is expired and the server redirects them |
3162 // to a login page. This will be considered a SAME_PAGE navigation but we do | 3162 // to a login page. This will be considered a SAME_PAGE navigation but we do |
3163 // want to update the SSL state. | 3163 // want to update the SSL state. |
3164 IN_PROC_BROWSER_TEST_F(SSLUITest, SamePageHasSSLState) { | 3164 IN_PROC_BROWSER_TEST_F(SSLUITest, SamePageHasSSLState) { |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3202 | 3202 |
3203 // Visit a page over https that contains a frame with a redirect. | 3203 // Visit a page over https that contains a frame with a redirect. |
3204 | 3204 |
3205 // XMLHttpRequest insecure content in synchronous mode. | 3205 // XMLHttpRequest insecure content in synchronous mode. |
3206 | 3206 |
3207 // XMLHttpRequest insecure content in asynchronous mode. | 3207 // XMLHttpRequest insecure content in asynchronous mode. |
3208 | 3208 |
3209 // XMLHttpRequest over bad ssl in synchronous mode. | 3209 // XMLHttpRequest over bad ssl in synchronous mode. |
3210 | 3210 |
3211 // XMLHttpRequest over OK ssl in synchronous mode. | 3211 // XMLHttpRequest over OK ssl in synchronous mode. |
OLD | NEW |