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

Side by Side Diff: chrome/browser/ssl/ssl_browser_tests.cc

Issue 2305093002: Fix incorrect SSL state being shown for client redirects. (Closed)
Patch Set: better fix 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 unified diff | Download patch
OLDNEW
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 3180 matching lines...) Expand 10 before | Expand all | Expand 10 after
3191 content::TestNavigationObserver observer(tab); 3191 content::TestNavigationObserver observer(tab);
3192 tab->GetController().LoadURL(tab->GetLastCommittedURL(), 3192 tab->GetController().LoadURL(tab->GetLastCommittedURL(),
3193 content::Referrer(), ui::PAGE_TRANSITION_LINK, 3193 content::Referrer(), ui::PAGE_TRANSITION_LINK,
3194 std::string()); 3194 std::string());
3195 observer.Wait(); 3195 observer.Wait();
3196 } 3196 }
3197 3197
3198 CheckAuthenticatedState(tab, AuthState::NONE); 3198 CheckAuthenticatedState(tab, AuthState::NONE);
3199 } 3199 }
3200 3200
3201 // Checks that if a redirect occurs while the page is loading, the SSL state
3202 // reflects the final URL.
3203 IN_PROC_BROWSER_TEST_F(SSLUITest, ClientRedirectSSLState) {
felt 2016/09/07 00:03:29 Can you add more variants of this test to trigger
jam 2016/09/07 01:50:49 hmm this should have been covered by an existing t
3204 ASSERT_TRUE(embedded_test_server()->Start());
3205 ASSERT_TRUE(https_server_.Start());
3206
3207 GURL https_url = https_server_.GetURL("/ssl/redirect.html?");
3208 GURL http_url = embedded_test_server()->GetURL("/ssl/google.html");
3209
3210 GURL url(https_url.spec() + http_url.spec());
3211 ui_test_utils::NavigateToURLBlockUntilNavigationsComplete(browser(), url, 2);
3212 WebContents* tab = browser()->tab_strip_model()->GetActiveWebContents();
3213 CheckUnauthenticatedState(tab, AuthState::NONE);
3214 }
3215
3201 // TODO(jcampan): more tests to do below. 3216 // TODO(jcampan): more tests to do below.
3202 3217
3203 // Visit a page over https that contains a frame with a redirect. 3218 // Visit a page over https that contains a frame with a redirect.
3204 3219
3205 // XMLHttpRequest insecure content in synchronous mode. 3220 // XMLHttpRequest insecure content in synchronous mode.
3206 3221
3207 // XMLHttpRequest insecure content in asynchronous mode. 3222 // XMLHttpRequest insecure content in asynchronous mode.
3208 3223
3209 // XMLHttpRequest over bad ssl in synchronous mode. 3224 // XMLHttpRequest over bad ssl in synchronous mode.
3210 3225
3211 // XMLHttpRequest over OK ssl in synchronous mode. 3226 // XMLHttpRequest over OK ssl in synchronous mode.
OLDNEW
« no previous file with comments | « no previous file | chrome/test/data/ssl/redirect.html » ('j') | content/browser/frame_host/navigation_controller_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698