| 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/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 666 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 677 for (int i = 0; i < 16; ++i) { | 677 for (int i = 0; i < 16; ++i) { |
| 678 tabs[i] = chrome::AddSelectedTabWithURL(browser(), slave_url, | 678 tabs[i] = chrome::AddSelectedTabWithURL(browser(), slave_url, |
| 679 content::PAGE_TRANSITION_LINK); | 679 content::PAGE_TRANSITION_LINK); |
| 680 } | 680 } |
| 681 chrome::SelectNextTab(browser()); | 681 chrome::SelectNextTab(browser()); |
| 682 | 682 |
| 683 // Visit a page which waits for one TLS handshake failure. | 683 // Visit a page which waits for one TLS handshake failure. |
| 684 // The title will be changed to 'PASS'. | 684 // The title will be changed to 'PASS'. |
| 685 ui_test_utils::NavigateToURL(browser(), master_url); | 685 ui_test_utils::NavigateToURL(browser(), master_url); |
| 686 const base::string16 result = watcher.WaitAndGetTitle(); | 686 const base::string16 result = watcher.WaitAndGetTitle(); |
| 687 EXPECT_TRUE(base::LowerCaseEqualsASCII(result, "pass")); | 687 EXPECT_TRUE(LowerCaseEqualsASCII(result, "pass")); |
| 688 | 688 |
| 689 // Close tabs which contains the test page. | 689 // Close tabs which contains the test page. |
| 690 for (int i = 0; i < 16; ++i) | 690 for (int i = 0; i < 16; ++i) |
| 691 chrome::CloseWebContents(browser(), tabs[i], false); | 691 chrome::CloseWebContents(browser(), tabs[i], false); |
| 692 chrome::CloseWebContents(browser(), tab, false); | 692 chrome::CloseWebContents(browser(), tab, false); |
| 693 } | 693 } |
| 694 | 694 |
| 695 // Visit a HTTPS page and proceeds despite an invalid certificate. The page | 695 // Visit a HTTPS page and proceeds despite an invalid certificate. The page |
| 696 // requests WSS connection to the same origin host to check if WSS connection | 696 // requests WSS connection to the same origin host to check if WSS connection |
| 697 // share certificates policy with HTTPS correcly. | 697 // share certificates policy with HTTPS correcly. |
| (...skipping 16 matching lines...) Expand all Loading... |
| 714 "connect_check.html").ReplaceComponents(replacements)); | 714 "connect_check.html").ReplaceComponents(replacements)); |
| 715 CheckAuthenticationBrokenState( | 715 CheckAuthenticationBrokenState( |
| 716 tab, net::CERT_STATUS_DATE_INVALID, AuthState::SHOWING_INTERSTITIAL); | 716 tab, net::CERT_STATUS_DATE_INVALID, AuthState::SHOWING_INTERSTITIAL); |
| 717 | 717 |
| 718 // Proceed anyway. | 718 // Proceed anyway. |
| 719 ProceedThroughInterstitial(tab); | 719 ProceedThroughInterstitial(tab); |
| 720 | 720 |
| 721 // Test page run a WebSocket wss connection test. The result will be shown | 721 // Test page run a WebSocket wss connection test. The result will be shown |
| 722 // as page title. | 722 // as page title. |
| 723 const base::string16 result = watcher.WaitAndGetTitle(); | 723 const base::string16 result = watcher.WaitAndGetTitle(); |
| 724 EXPECT_TRUE(base::LowerCaseEqualsASCII(result, "pass")); | 724 EXPECT_TRUE(LowerCaseEqualsASCII(result, "pass")); |
| 725 } | 725 } |
| 726 | 726 |
| 727 #if defined(USE_NSS) | 727 #if defined(USE_NSS) |
| 728 class SSLUITestWithClientCert : public SSLUITest { | 728 class SSLUITestWithClientCert : public SSLUITest { |
| 729 public: | 729 public: |
| 730 SSLUITestWithClientCert() : cert_db_(NULL) {} | 730 SSLUITestWithClientCert() : cert_db_(NULL) {} |
| 731 | 731 |
| 732 virtual void SetUpOnMainThread() OVERRIDE { | 732 virtual void SetUpOnMainThread() OVERRIDE { |
| 733 SSLUITest::SetUpOnMainThread(); | 733 SSLUITest::SetUpOnMainThread(); |
| 734 | 734 |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 802 std::string(), | 802 std::string(), |
| 803 dict.release()); | 803 dict.release()); |
| 804 | 804 |
| 805 // Visit a HTTPS page which requires client certs. | 805 // Visit a HTTPS page which requires client certs. |
| 806 ui_test_utils::NavigateToURL(browser(), url); | 806 ui_test_utils::NavigateToURL(browser(), url); |
| 807 CheckAuthenticatedState(tab, AuthState::NONE); | 807 CheckAuthenticatedState(tab, AuthState::NONE); |
| 808 | 808 |
| 809 // Test page runs a WebSocket wss connection test. The result will be shown | 809 // Test page runs a WebSocket wss connection test. The result will be shown |
| 810 // as page title. | 810 // as page title. |
| 811 const base::string16 result = watcher.WaitAndGetTitle(); | 811 const base::string16 result = watcher.WaitAndGetTitle(); |
| 812 EXPECT_TRUE(base::LowerCaseEqualsASCII(result, "pass")); | 812 EXPECT_TRUE(LowerCaseEqualsASCII(result, "pass")); |
| 813 } | 813 } |
| 814 #endif // defined(USE_NSS) | 814 #endif // defined(USE_NSS) |
| 815 | 815 |
| 816 // Flaky on CrOS http://crbug.com/92292 | 816 // Flaky on CrOS http://crbug.com/92292 |
| 817 #if defined(OS_CHROMEOS) | 817 #if defined(OS_CHROMEOS) |
| 818 #define MAYBE_TestHTTPSErrorWithNoNavEntry \ | 818 #define MAYBE_TestHTTPSErrorWithNoNavEntry \ |
| 819 DISABLED_TestHTTPSErrorWithNoNavEntry | 819 DISABLED_TestHTTPSErrorWithNoNavEntry |
| 820 #else | 820 #else |
| 821 #define MAYBE_TestHTTPSErrorWithNoNavEntry TestHTTPSErrorWithNoNavEntry | 821 #define MAYBE_TestHTTPSErrorWithNoNavEntry TestHTTPSErrorWithNoNavEntry |
| 822 #endif // defined(OS_CHROMEOS) | 822 #endif // defined(OS_CHROMEOS) |
| (...skipping 936 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1759 ui_test_utils::NavigateToURL( | 1759 ui_test_utils::NavigateToURL( |
| 1760 browser(), | 1760 browser(), |
| 1761 wss_server_expired_.GetURL( | 1761 wss_server_expired_.GetURL( |
| 1762 "connect_check.html").ReplaceComponents(replacements)); | 1762 "connect_check.html").ReplaceComponents(replacements)); |
| 1763 | 1763 |
| 1764 // We shouldn't have an interstitial page showing here. | 1764 // We shouldn't have an interstitial page showing here. |
| 1765 | 1765 |
| 1766 // Test page run a WebSocket wss connection test. The result will be shown | 1766 // Test page run a WebSocket wss connection test. The result will be shown |
| 1767 // as page title. | 1767 // as page title. |
| 1768 const base::string16 result = watcher.WaitAndGetTitle(); | 1768 const base::string16 result = watcher.WaitAndGetTitle(); |
| 1769 EXPECT_TRUE(base::LowerCaseEqualsASCII(result, "pass")); | 1769 EXPECT_TRUE(LowerCaseEqualsASCII(result, "pass")); |
| 1770 } | 1770 } |
| 1771 | 1771 |
| 1772 // Verifies that the interstitial can proceed, even if JavaScript is disabled. | 1772 // Verifies that the interstitial can proceed, even if JavaScript is disabled. |
| 1773 // http://crbug.com/322948 | 1773 // http://crbug.com/322948 |
| 1774 #if defined(OS_LINUX) | 1774 #if defined(OS_LINUX) |
| 1775 // flaky http://crbug.com/396458 | 1775 // flaky http://crbug.com/396458 |
| 1776 #define MAYBE_TestInterstitialJavaScriptProceeds \ | 1776 #define MAYBE_TestInterstitialJavaScriptProceeds \ |
| 1777 DISABLED_TestInterstitialJavaScriptProceeds | 1777 DISABLED_TestInterstitialJavaScriptProceeds |
| 1778 #else | 1778 #else |
| 1779 #define MAYBE_TestInterstitialJavaScriptProceeds \ | 1779 #define MAYBE_TestInterstitialJavaScriptProceeds \ |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1869 | 1869 |
| 1870 // Visit a page over https that contains a frame with a redirect. | 1870 // Visit a page over https that contains a frame with a redirect. |
| 1871 | 1871 |
| 1872 // XMLHttpRequest insecure content in synchronous mode. | 1872 // XMLHttpRequest insecure content in synchronous mode. |
| 1873 | 1873 |
| 1874 // XMLHttpRequest insecure content in asynchronous mode. | 1874 // XMLHttpRequest insecure content in asynchronous mode. |
| 1875 | 1875 |
| 1876 // XMLHttpRequest over bad ssl in synchronous mode. | 1876 // XMLHttpRequest over bad ssl in synchronous mode. |
| 1877 | 1877 |
| 1878 // XMLHttpRequest over OK ssl in synchronous mode. | 1878 // XMLHttpRequest over OK ssl in synchronous mode. |
| OLD | NEW |