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

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

Issue 448143008: Move StringToUpperASCII and LowerCaseEqualsASCII to the base namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
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/bind.h" 5 #include "base/bind.h"
6 #include "base/bind_helpers.h" 6 #include "base/bind_helpers.h"
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #include "base/prefs/pref_service.h" 9 #include "base/prefs/pref_service.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 659 matching lines...) Expand 10 before | Expand all | Expand 10 after
670 for (int i = 0; i < 16; ++i) { 670 for (int i = 0; i < 16; ++i) {
671 tabs[i] = chrome::AddSelectedTabWithURL(browser(), slave_url, 671 tabs[i] = chrome::AddSelectedTabWithURL(browser(), slave_url,
672 content::PAGE_TRANSITION_LINK); 672 content::PAGE_TRANSITION_LINK);
673 } 673 }
674 chrome::SelectNextTab(browser()); 674 chrome::SelectNextTab(browser());
675 675
676 // Visit a page which waits for one TLS handshake failure. 676 // Visit a page which waits for one TLS handshake failure.
677 // The title will be changed to 'PASS'. 677 // The title will be changed to 'PASS'.
678 ui_test_utils::NavigateToURL(browser(), master_url); 678 ui_test_utils::NavigateToURL(browser(), master_url);
679 const base::string16 result = watcher.WaitAndGetTitle(); 679 const base::string16 result = watcher.WaitAndGetTitle();
680 EXPECT_TRUE(LowerCaseEqualsASCII(result, "pass")); 680 EXPECT_TRUE(base::LowerCaseEqualsASCII(result, "pass"));
681 681
682 // Close tabs which contains the test page. 682 // Close tabs which contains the test page.
683 for (int i = 0; i < 16; ++i) 683 for (int i = 0; i < 16; ++i)
684 chrome::CloseWebContents(browser(), tabs[i], false); 684 chrome::CloseWebContents(browser(), tabs[i], false);
685 chrome::CloseWebContents(browser(), tab, false); 685 chrome::CloseWebContents(browser(), tab, false);
686 } 686 }
687 687
688 // Visit a HTTPS page and proceeds despite an invalid certificate. The page 688 // Visit a HTTPS page and proceeds despite an invalid certificate. The page
689 // requests WSS connection to the same origin host to check if WSS connection 689 // requests WSS connection to the same origin host to check if WSS connection
690 // share certificates policy with HTTPS correcly. 690 // share certificates policy with HTTPS correcly.
(...skipping 16 matching lines...) Expand all
707 "connect_check.html").ReplaceComponents(replacements)); 707 "connect_check.html").ReplaceComponents(replacements));
708 CheckAuthenticationBrokenState( 708 CheckAuthenticationBrokenState(
709 tab, net::CERT_STATUS_DATE_INVALID, AuthState::SHOWING_INTERSTITIAL); 709 tab, net::CERT_STATUS_DATE_INVALID, AuthState::SHOWING_INTERSTITIAL);
710 710
711 // Proceed anyway. 711 // Proceed anyway.
712 ProceedThroughInterstitial(tab); 712 ProceedThroughInterstitial(tab);
713 713
714 // Test page run a WebSocket wss connection test. The result will be shown 714 // Test page run a WebSocket wss connection test. The result will be shown
715 // as page title. 715 // as page title.
716 const base::string16 result = watcher.WaitAndGetTitle(); 716 const base::string16 result = watcher.WaitAndGetTitle();
717 EXPECT_TRUE(LowerCaseEqualsASCII(result, "pass")); 717 EXPECT_TRUE(base::LowerCaseEqualsASCII(result, "pass"));
718 } 718 }
719 719
720 #if defined(USE_NSS) 720 #if defined(USE_NSS)
721 class SSLUITestWithClientCert : public SSLUITest { 721 class SSLUITestWithClientCert : public SSLUITest {
722 public: 722 public:
723 SSLUITestWithClientCert() : cert_db_(NULL) {} 723 SSLUITestWithClientCert() : cert_db_(NULL) {}
724 724
725 virtual void SetUpOnMainThread() OVERRIDE { 725 virtual void SetUpOnMainThread() OVERRIDE {
726 SSLUITest::SetUpOnMainThread(); 726 SSLUITest::SetUpOnMainThread();
727 727
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
795 std::string(), 795 std::string(),
796 dict.release()); 796 dict.release());
797 797
798 // Visit a HTTPS page which requires client certs. 798 // Visit a HTTPS page which requires client certs.
799 ui_test_utils::NavigateToURL(browser(), url); 799 ui_test_utils::NavigateToURL(browser(), url);
800 CheckAuthenticatedState(tab, AuthState::NONE); 800 CheckAuthenticatedState(tab, AuthState::NONE);
801 801
802 // Test page runs a WebSocket wss connection test. The result will be shown 802 // Test page runs a WebSocket wss connection test. The result will be shown
803 // as page title. 803 // as page title.
804 const base::string16 result = watcher.WaitAndGetTitle(); 804 const base::string16 result = watcher.WaitAndGetTitle();
805 EXPECT_TRUE(LowerCaseEqualsASCII(result, "pass")); 805 EXPECT_TRUE(base::LowerCaseEqualsASCII(result, "pass"));
806 } 806 }
807 #endif // defined(USE_NSS) 807 #endif // defined(USE_NSS)
808 808
809 // Flaky on CrOS http://crbug.com/92292 809 // Flaky on CrOS http://crbug.com/92292
810 #if defined(OS_CHROMEOS) 810 #if defined(OS_CHROMEOS)
811 #define MAYBE_TestHTTPSErrorWithNoNavEntry \ 811 #define MAYBE_TestHTTPSErrorWithNoNavEntry \
812 DISABLED_TestHTTPSErrorWithNoNavEntry 812 DISABLED_TestHTTPSErrorWithNoNavEntry
813 #else 813 #else
814 #define MAYBE_TestHTTPSErrorWithNoNavEntry TestHTTPSErrorWithNoNavEntry 814 #define MAYBE_TestHTTPSErrorWithNoNavEntry TestHTTPSErrorWithNoNavEntry
815 #endif // defined(OS_CHROMEOS) 815 #endif // defined(OS_CHROMEOS)
(...skipping 927 matching lines...) Expand 10 before | Expand all | Expand 10 after
1743 ui_test_utils::NavigateToURL( 1743 ui_test_utils::NavigateToURL(
1744 browser(), 1744 browser(),
1745 wss_server_expired_.GetURL( 1745 wss_server_expired_.GetURL(
1746 "connect_check.html").ReplaceComponents(replacements)); 1746 "connect_check.html").ReplaceComponents(replacements));
1747 1747
1748 // We shouldn't have an interstitial page showing here. 1748 // We shouldn't have an interstitial page showing here.
1749 1749
1750 // Test page run a WebSocket wss connection test. The result will be shown 1750 // Test page run a WebSocket wss connection test. The result will be shown
1751 // as page title. 1751 // as page title.
1752 const base::string16 result = watcher.WaitAndGetTitle(); 1752 const base::string16 result = watcher.WaitAndGetTitle();
1753 EXPECT_TRUE(LowerCaseEqualsASCII(result, "pass")); 1753 EXPECT_TRUE(base::LowerCaseEqualsASCII(result, "pass"));
1754 } 1754 }
1755 1755
1756 // Verifies that the interstitial can proceed, even if JavaScript is disabled. 1756 // Verifies that the interstitial can proceed, even if JavaScript is disabled.
1757 // http://crbug.com/322948 1757 // http://crbug.com/322948
1758 IN_PROC_BROWSER_TEST_F(SSLUITest, TestInterstitialJavaScriptProceeds) { 1758 IN_PROC_BROWSER_TEST_F(SSLUITest, TestInterstitialJavaScriptProceeds) {
1759 browser()->profile()->GetHostContentSettingsMap()->SetDefaultContentSetting( 1759 browser()->profile()->GetHostContentSettingsMap()->SetDefaultContentSetting(
1760 CONTENT_SETTINGS_TYPE_JAVASCRIPT, CONTENT_SETTING_BLOCK); 1760 CONTENT_SETTINGS_TYPE_JAVASCRIPT, CONTENT_SETTING_BLOCK);
1761 1761
1762 ASSERT_TRUE(https_server_expired_.Start()); 1762 ASSERT_TRUE(https_server_expired_.Start());
1763 WebContents* tab = browser()->tab_strip_model()->GetActiveWebContents(); 1763 WebContents* tab = browser()->tab_strip_model()->GetActiveWebContents();
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
1845 1845
1846 // Visit a page over https that contains a frame with a redirect. 1846 // Visit a page over https that contains a frame with a redirect.
1847 1847
1848 // XMLHttpRequest insecure content in synchronous mode. 1848 // XMLHttpRequest insecure content in synchronous mode.
1849 1849
1850 // XMLHttpRequest insecure content in asynchronous mode. 1850 // XMLHttpRequest insecure content in asynchronous mode.
1851 1851
1852 // XMLHttpRequest over bad ssl in synchronous mode. 1852 // XMLHttpRequest over bad ssl in synchronous mode.
1853 1853
1854 // XMLHttpRequest over OK ssl in synchronous mode. 1854 // XMLHttpRequest over OK ssl in synchronous mode.
OLDNEW
« no previous file with comments | « chrome/browser/safe_browsing/malware_details_cache.cc ('k') | chrome/browser/supervised_user/supervised_user_url_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698