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 "base/bind.h" | 5 #include "base/bind.h" |
6 #include "base/bind_helpers.h" | 6 #include "base/bind_helpers.h" |
7 #include "base/callback.h" | 7 #include "base/callback.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/metrics/field_trial.h" | 9 #include "base/metrics/field_trial.h" |
10 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
(...skipping 790 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
801 for (int i = 0; i < 16; ++i) { | 801 for (int i = 0; i < 16; ++i) { |
802 tabs[i] = chrome::AddSelectedTabWithURL(browser(), slave_url, | 802 tabs[i] = chrome::AddSelectedTabWithURL(browser(), slave_url, |
803 ui::PAGE_TRANSITION_LINK); | 803 ui::PAGE_TRANSITION_LINK); |
804 } | 804 } |
805 chrome::SelectNextTab(browser()); | 805 chrome::SelectNextTab(browser()); |
806 | 806 |
807 // Visit a page which waits for one TLS handshake failure. | 807 // Visit a page which waits for one TLS handshake failure. |
808 // The title will be changed to 'PASS'. | 808 // The title will be changed to 'PASS'. |
809 ui_test_utils::NavigateToURL(browser(), master_url); | 809 ui_test_utils::NavigateToURL(browser(), master_url); |
810 const base::string16 result = watcher.WaitAndGetTitle(); | 810 const base::string16 result = watcher.WaitAndGetTitle(); |
811 EXPECT_TRUE(LowerCaseEqualsASCII(result, "pass")); | 811 EXPECT_TRUE(base::LowerCaseEqualsASCII(result, "pass")); |
812 | 812 |
813 // Close tabs which contains the test page. | 813 // Close tabs which contains the test page. |
814 for (int i = 0; i < 16; ++i) | 814 for (int i = 0; i < 16; ++i) |
815 chrome::CloseWebContents(browser(), tabs[i], false); | 815 chrome::CloseWebContents(browser(), tabs[i], false); |
816 chrome::CloseWebContents(browser(), tab, false); | 816 chrome::CloseWebContents(browser(), tab, false); |
817 } | 817 } |
818 | 818 |
819 // Visit a HTTPS page and proceeds despite an invalid certificate. The page | 819 // Visit a HTTPS page and proceeds despite an invalid certificate. The page |
820 // requests WSS connection to the same origin host to check if WSS connection | 820 // requests WSS connection to the same origin host to check if WSS connection |
821 // share certificates policy with HTTPS correcly. | 821 // share certificates policy with HTTPS correcly. |
(...skipping 15 matching lines...) Expand all Loading... |
837 "connect_check.html").ReplaceComponents(replacements)); | 837 "connect_check.html").ReplaceComponents(replacements)); |
838 CheckAuthenticationBrokenState( | 838 CheckAuthenticationBrokenState( |
839 tab, net::CERT_STATUS_DATE_INVALID, AuthState::SHOWING_INTERSTITIAL); | 839 tab, net::CERT_STATUS_DATE_INVALID, AuthState::SHOWING_INTERSTITIAL); |
840 | 840 |
841 // Proceed anyway. | 841 // Proceed anyway. |
842 ProceedThroughInterstitial(tab); | 842 ProceedThroughInterstitial(tab); |
843 | 843 |
844 // Test page run a WebSocket wss connection test. The result will be shown | 844 // Test page run a WebSocket wss connection test. The result will be shown |
845 // as page title. | 845 // as page title. |
846 const base::string16 result = watcher.WaitAndGetTitle(); | 846 const base::string16 result = watcher.WaitAndGetTitle(); |
847 EXPECT_TRUE(LowerCaseEqualsASCII(result, "pass")); | 847 EXPECT_TRUE(base::LowerCaseEqualsASCII(result, "pass")); |
848 } | 848 } |
849 | 849 |
850 #if defined(USE_NSS_CERTS) | 850 #if defined(USE_NSS_CERTS) |
851 class SSLUITestWithClientCert : public SSLUITest { | 851 class SSLUITestWithClientCert : public SSLUITest { |
852 public: | 852 public: |
853 SSLUITestWithClientCert() : cert_db_(NULL) {} | 853 SSLUITestWithClientCert() : cert_db_(NULL) {} |
854 | 854 |
855 void SetUpOnMainThread() override { | 855 void SetUpOnMainThread() override { |
856 SSLUITest::SetUpOnMainThread(); | 856 SSLUITest::SetUpOnMainThread(); |
857 | 857 |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
924 std::string(), | 924 std::string(), |
925 dict.release()); | 925 dict.release()); |
926 | 926 |
927 // Visit a HTTPS page which requires client certs. | 927 // Visit a HTTPS page which requires client certs. |
928 ui_test_utils::NavigateToURL(browser(), url); | 928 ui_test_utils::NavigateToURL(browser(), url); |
929 CheckAuthenticatedState(tab, AuthState::NONE); | 929 CheckAuthenticatedState(tab, AuthState::NONE); |
930 | 930 |
931 // Test page runs a WebSocket wss connection test. The result will be shown | 931 // Test page runs a WebSocket wss connection test. The result will be shown |
932 // as page title. | 932 // as page title. |
933 const base::string16 result = watcher.WaitAndGetTitle(); | 933 const base::string16 result = watcher.WaitAndGetTitle(); |
934 EXPECT_TRUE(LowerCaseEqualsASCII(result, "pass")); | 934 EXPECT_TRUE(base::LowerCaseEqualsASCII(result, "pass")); |
935 } | 935 } |
936 #endif // defined(USE_NSS_CERTS) | 936 #endif // defined(USE_NSS_CERTS) |
937 | 937 |
938 // Flaky on CrOS http://crbug.com/92292 | 938 // Flaky on CrOS http://crbug.com/92292 |
939 #if defined(OS_CHROMEOS) | 939 #if defined(OS_CHROMEOS) |
940 #define MAYBE_TestHTTPSErrorWithNoNavEntry \ | 940 #define MAYBE_TestHTTPSErrorWithNoNavEntry \ |
941 DISABLED_TestHTTPSErrorWithNoNavEntry | 941 DISABLED_TestHTTPSErrorWithNoNavEntry |
942 #else | 942 #else |
943 #define MAYBE_TestHTTPSErrorWithNoNavEntry TestHTTPSErrorWithNoNavEntry | 943 #define MAYBE_TestHTTPSErrorWithNoNavEntry TestHTTPSErrorWithNoNavEntry |
944 #endif // defined(OS_CHROMEOS) | 944 #endif // defined(OS_CHROMEOS) |
(...skipping 1131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2076 ui_test_utils::NavigateToURL( | 2076 ui_test_utils::NavigateToURL( |
2077 browser(), | 2077 browser(), |
2078 wss_server_expired_.GetURL( | 2078 wss_server_expired_.GetURL( |
2079 "connect_check.html").ReplaceComponents(replacements)); | 2079 "connect_check.html").ReplaceComponents(replacements)); |
2080 | 2080 |
2081 // We shouldn't have an interstitial page showing here. | 2081 // We shouldn't have an interstitial page showing here. |
2082 | 2082 |
2083 // Test page run a WebSocket wss connection test. The result will be shown | 2083 // Test page run a WebSocket wss connection test. The result will be shown |
2084 // as page title. | 2084 // as page title. |
2085 const base::string16 result = watcher.WaitAndGetTitle(); | 2085 const base::string16 result = watcher.WaitAndGetTitle(); |
2086 EXPECT_TRUE(LowerCaseEqualsASCII(result, "pass")); | 2086 EXPECT_TRUE(base::LowerCaseEqualsASCII(result, "pass")); |
2087 } | 2087 } |
2088 | 2088 |
2089 // Verifies that the interstitial can proceed, even if JavaScript is disabled. | 2089 // Verifies that the interstitial can proceed, even if JavaScript is disabled. |
2090 // http://crbug.com/322948 | 2090 // http://crbug.com/322948 |
2091 #if defined(OS_LINUX) | 2091 #if defined(OS_LINUX) |
2092 // flaky http://crbug.com/396458 | 2092 // flaky http://crbug.com/396458 |
2093 #define MAYBE_TestInterstitialJavaScriptProceeds \ | 2093 #define MAYBE_TestInterstitialJavaScriptProceeds \ |
2094 DISABLED_TestInterstitialJavaScriptProceeds | 2094 DISABLED_TestInterstitialJavaScriptProceeds |
2095 #else | 2095 #else |
2096 #define MAYBE_TestInterstitialJavaScriptProceeds \ | 2096 #define MAYBE_TestInterstitialJavaScriptProceeds \ |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2245 | 2245 |
2246 // Visit a page over https that contains a frame with a redirect. | 2246 // Visit a page over https that contains a frame with a redirect. |
2247 | 2247 |
2248 // XMLHttpRequest insecure content in synchronous mode. | 2248 // XMLHttpRequest insecure content in synchronous mode. |
2249 | 2249 |
2250 // XMLHttpRequest insecure content in asynchronous mode. | 2250 // XMLHttpRequest insecure content in asynchronous mode. |
2251 | 2251 |
2252 // XMLHttpRequest over bad ssl in synchronous mode. | 2252 // XMLHttpRequest over bad ssl in synchronous mode. |
2253 | 2253 |
2254 // XMLHttpRequest over OK ssl in synchronous mode. | 2254 // XMLHttpRequest over OK ssl in synchronous mode. |
OLD | NEW |