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

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

Issue 1418003006: Simplify starting a navigation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 "base/base_switches.h" 5 #include "base/base_switches.h"
6 #include "base/bind.h" 6 #include "base/bind.h"
7 #include "base/bind_helpers.h" 7 #include "base/bind_helpers.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 2581 matching lines...) Expand 10 before | Expand all | Expand 10 after
2592 https_server_url.ReplaceComponents(replacements); 2592 https_server_url.ReplaceComponents(replacements);
2593 2593
2594 WebContents* contents = browser()->tab_strip_model()->GetActiveWebContents(); 2594 WebContents* contents = browser()->tab_strip_model()->GetActiveWebContents();
2595 content::TestNavigationObserver observer(contents, 2); 2595 content::TestNavigationObserver observer(contents, 2);
2596 ui_test_utils::NavigateToURL(browser(), https_server_mismatched_url); 2596 ui_test_utils::NavigateToURL(browser(), https_server_mismatched_url);
2597 observer.Wait(); 2597 observer.Wait();
2598 2598
2599 CheckSecurityState(contents, CertError::NONE, 2599 CheckSecurityState(contents, CertError::NONE,
2600 content::SECURITY_STYLE_AUTHENTICATED, AuthState::NONE); 2600 content::SECURITY_STYLE_AUTHENTICATED, AuthState::NONE);
2601 replacements.SetHostStr("mail.example.com"); 2601 replacements.SetHostStr("mail.example.com");
2602 // blink strips the ref from requests.
2603 replacements.ClearRef();
2602 GURL https_server_new_url = https_server_url.ReplaceComponents(replacements); 2604 GURL https_server_new_url = https_server_url.ReplaceComponents(replacements);
2603 // Verify that the current URL is the suggested URL. 2605 // Verify that the current URL is the suggested URL.
2604 EXPECT_EQ(https_server_new_url.spec(), 2606 EXPECT_EQ(https_server_new_url.spec(),
2605 contents->GetLastCommittedURL().spec()); 2607 contents->GetLastCommittedURL().spec());
2606 } 2608 }
2607 2609
2608 // Visit the URL example.org on a server that presents a valid certificate 2610 // Visit the URL example.org on a server that presents a valid certificate
2609 // for www.example.org. Verify that the page redirects to www.example.org. 2611 // for www.example.org. Verify that the page redirects to www.example.org.
2610 IN_PROC_BROWSER_TEST_F(CommonNameMismatchBrowserTest, 2612 IN_PROC_BROWSER_TEST_F(CommonNameMismatchBrowserTest,
2611 CheckWWWSubdomainMismatchInverse) { 2613 CheckWWWSubdomainMismatchInverse) {
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
2909 2911
2910 // Visit a page over https that contains a frame with a redirect. 2912 // Visit a page over https that contains a frame with a redirect.
2911 2913
2912 // XMLHttpRequest insecure content in synchronous mode. 2914 // XMLHttpRequest insecure content in synchronous mode.
2913 2915
2914 // XMLHttpRequest insecure content in asynchronous mode. 2916 // XMLHttpRequest insecure content in asynchronous mode.
2915 2917
2916 // XMLHttpRequest over bad ssl in synchronous mode. 2918 // XMLHttpRequest over bad ssl in synchronous mode.
2917 2919
2918 // XMLHttpRequest over OK ssl in synchronous mode. 2920 // XMLHttpRequest over OK ssl in synchronous mode.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698