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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 #include "components/variations/variations_associated_data.h" | 60 #include "components/variations/variations_associated_data.h" |
61 #include "components/web_modal/web_contents_modal_dialog_manager.h" | 61 #include "components/web_modal/web_contents_modal_dialog_manager.h" |
62 #include "content/public/browser/browser_context.h" | 62 #include "content/public/browser/browser_context.h" |
63 #include "content/public/browser/interstitial_page.h" | 63 #include "content/public/browser/interstitial_page.h" |
64 #include "content/public/browser/navigation_controller.h" | 64 #include "content/public/browser/navigation_controller.h" |
65 #include "content/public/browser/navigation_entry.h" | 65 #include "content/public/browser/navigation_entry.h" |
66 #include "content/public/browser/notification_service.h" | 66 #include "content/public/browser/notification_service.h" |
67 #include "content/public/browser/render_frame_host.h" | 67 #include "content/public/browser/render_frame_host.h" |
68 #include "content/public/browser/render_view_host.h" | 68 #include "content/public/browser/render_view_host.h" |
69 #include "content/public/browser/render_widget_host_view.h" | 69 #include "content/public/browser/render_widget_host_view.h" |
| 70 #include "content/public/browser/restore_type.h" |
70 #include "content/public/browser/web_contents.h" | 71 #include "content/public/browser/web_contents.h" |
71 #include "content/public/browser/web_contents_observer.h" | 72 #include "content/public/browser/web_contents_observer.h" |
72 #include "content/public/common/content_switches.h" | 73 #include "content/public/common/content_switches.h" |
73 #include "content/public/common/page_state.h" | 74 #include "content/public/common/page_state.h" |
74 #include "content/public/common/security_style.h" | 75 #include "content/public/common/security_style.h" |
75 #include "content/public/common/ssl_status.h" | 76 #include "content/public/common/ssl_status.h" |
76 #include "content/public/test/browser_test_utils.h" | 77 #include "content/public/test/browser_test_utils.h" |
77 #include "content/public/test/download_test_observer.h" | 78 #include "content/public/test/download_test_observer.h" |
78 #include "content/public/test/test_navigation_observer.h" | 79 #include "content/public/test/test_navigation_observer.h" |
79 #include "content/public/test/test_renderer_host.h" | 80 #include "content/public/test/test_renderer_host.h" |
(...skipping 3043 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3123 WebContents::CreateParams params(tab->GetBrowserContext()); | 3124 WebContents::CreateParams params(tab->GetBrowserContext()); |
3124 WebContents* tab2 = WebContents::Create(params); | 3125 WebContents* tab2 = WebContents::Create(params); |
3125 tab->GetDelegate()->AddNewContents( | 3126 tab->GetDelegate()->AddNewContents( |
3126 nullptr, tab2, WindowOpenDisposition::NEW_FOREGROUND_TAB, gfx::Rect(), | 3127 nullptr, tab2, WindowOpenDisposition::NEW_FOREGROUND_TAB, gfx::Rect(), |
3127 false, nullptr); | 3128 false, nullptr); |
3128 std::vector<std::unique_ptr<NavigationEntry>> entries; | 3129 std::vector<std::unique_ptr<NavigationEntry>> entries; |
3129 entries.push_back(std::move(restored_entry)); | 3130 entries.push_back(std::move(restored_entry)); |
3130 content::TestNavigationObserver observer(tab2); | 3131 content::TestNavigationObserver observer(tab2); |
3131 tab2->GetController().Restore( | 3132 tab2->GetController().Restore( |
3132 entries.size() - 1, | 3133 entries.size() - 1, |
3133 NavigationController::RESTORE_LAST_SESSION_EXITED_CLEANLY, &entries); | 3134 content::RestoreType::LAST_SESSION_EXITED_CLEANLY, &entries); |
3134 tab2->GetController().LoadIfNecessary(); | 3135 tab2->GetController().LoadIfNecessary(); |
3135 observer.Wait(); | 3136 observer.Wait(); |
3136 CheckAuthenticatedState(tab2, AuthState::NONE); | 3137 CheckAuthenticatedState(tab2, AuthState::NONE); |
3137 } | 3138 } |
3138 | 3139 |
3139 // Simulate the URL changing when the user presses enter in the omnibox. This | 3140 // Simulate the URL changing when the user presses enter in the omnibox. This |
3140 // could happen when the user's login is expired and the server redirects them | 3141 // could happen when the user's login is expired and the server redirects them |
3141 // to a login page. This will be considered a SAME_PAGE navigation but we do | 3142 // to a login page. This will be considered a SAME_PAGE navigation but we do |
3142 // want to update the SSL state. | 3143 // want to update the SSL state. |
3143 IN_PROC_BROWSER_TEST_F(SSLUITest, SamePageHasSSLState) { | 3144 IN_PROC_BROWSER_TEST_F(SSLUITest, SamePageHasSSLState) { |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3250 | 3251 |
3251 // Visit a page over https that contains a frame with a redirect. | 3252 // Visit a page over https that contains a frame with a redirect. |
3252 | 3253 |
3253 // XMLHttpRequest insecure content in synchronous mode. | 3254 // XMLHttpRequest insecure content in synchronous mode. |
3254 | 3255 |
3255 // XMLHttpRequest insecure content in asynchronous mode. | 3256 // XMLHttpRequest insecure content in asynchronous mode. |
3256 | 3257 |
3257 // XMLHttpRequest over bad ssl in synchronous mode. | 3258 // XMLHttpRequest over bad ssl in synchronous mode. |
3258 | 3259 |
3259 // XMLHttpRequest over OK ssl in synchronous mode. | 3260 // XMLHttpRequest over OK ssl in synchronous mode. |
OLD | NEW |