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 <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 3652 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3663 SSLErrorHandler::FromWebContents(contents); | 3663 SSLErrorHandler::FromWebContents(contents); |
3664 // Make sure that the |SSLErrorHandler| is deleted. | 3664 // Make sure that the |SSLErrorHandler| is deleted. |
3665 EXPECT_FALSE(ssl_error_handler); | 3665 EXPECT_FALSE(ssl_error_handler); |
3666 EXPECT_FALSE(contents->ShowingInterstitialPage()); | 3666 EXPECT_FALSE(contents->ShowingInterstitialPage()); |
3667 EXPECT_FALSE(contents->IsLoading()); | 3667 EXPECT_FALSE(contents->IsLoading()); |
3668 } | 3668 } |
3669 | 3669 |
3670 class SSLBlockingPageIDNTest : public SecurityInterstitialIDNTest { | 3670 class SSLBlockingPageIDNTest : public SecurityInterstitialIDNTest { |
3671 protected: | 3671 protected: |
3672 // SecurityInterstitialIDNTest implementation | 3672 // SecurityInterstitialIDNTest implementation |
3673 SecurityInterstitialPage* CreateInterstitial( | 3673 security_interstitials::SecurityInterstitialPage* CreateInterstitial( |
3674 content::WebContents* contents, | 3674 content::WebContents* contents, |
3675 const GURL& request_url) const override { | 3675 const GURL& request_url) const override { |
3676 net::SSLInfo ssl_info; | 3676 net::SSLInfo ssl_info; |
3677 ssl_info.cert = | 3677 ssl_info.cert = |
3678 net::ImportCertFromFile(net::GetTestCertsDirectory(), "ok_cert.pem"); | 3678 net::ImportCertFromFile(net::GetTestCertsDirectory(), "ok_cert.pem"); |
3679 return SSLBlockingPage::Create( | 3679 return SSLBlockingPage::Create( |
3680 contents, net::ERR_CERT_CONTAINS_ERRORS, ssl_info, request_url, 0, | 3680 contents, net::ERR_CERT_CONTAINS_ERRORS, ssl_info, request_url, 0, |
3681 base::Time::NowFromSystemTime(), nullptr, | 3681 base::Time::NowFromSystemTime(), nullptr, |
3682 base::Callback<void(content::CertificateRequestResultType)>()); | 3682 base::Callback<void(content::CertificateRequestResultType)>()); |
3683 } | 3683 } |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3881 | 3881 |
3882 // Visit a page over https that contains a frame with a redirect. | 3882 // Visit a page over https that contains a frame with a redirect. |
3883 | 3883 |
3884 // XMLHttpRequest insecure content in synchronous mode. | 3884 // XMLHttpRequest insecure content in synchronous mode. |
3885 | 3885 |
3886 // XMLHttpRequest insecure content in asynchronous mode. | 3886 // XMLHttpRequest insecure content in asynchronous mode. |
3887 | 3887 |
3888 // XMLHttpRequest over bad ssl in synchronous mode. | 3888 // XMLHttpRequest over bad ssl in synchronous mode. |
3889 | 3889 |
3890 // XMLHttpRequest over OK ssl in synchronous mode. | 3890 // XMLHttpRequest over OK ssl in synchronous mode. |
OLD | NEW |