| 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/location.h" | 9 #include "base/location.h" |
| 10 #include "base/metrics/field_trial.h" | 10 #include "base/metrics/field_trial.h" |
| (...skipping 2217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2228 protected: | 2228 protected: |
| 2229 // SecurityInterstitialIDNTest implementation | 2229 // SecurityInterstitialIDNTest implementation |
| 2230 SecurityInterstitialPage* CreateInterstitial( | 2230 SecurityInterstitialPage* CreateInterstitial( |
| 2231 content::WebContents* contents, | 2231 content::WebContents* contents, |
| 2232 const GURL& request_url) const override { | 2232 const GURL& request_url) const override { |
| 2233 net::SSLInfo ssl_info; | 2233 net::SSLInfo ssl_info; |
| 2234 ssl_info.cert = new net::X509Certificate( | 2234 ssl_info.cert = new net::X509Certificate( |
| 2235 request_url.host(), "CA", base::Time::Max(), base::Time::Max()); | 2235 request_url.host(), "CA", base::Time::Max(), base::Time::Max()); |
| 2236 return new SSLBlockingPage( | 2236 return new SSLBlockingPage( |
| 2237 contents, net::ERR_CERT_CONTAINS_ERRORS, ssl_info, request_url, 0, | 2237 contents, net::ERR_CERT_CONTAINS_ERRORS, ssl_info, request_url, 0, |
| 2238 base::Time::NowFromSystemTime(), nullptr, base::Callback<void(bool)>()); | 2238 base::Time::NowFromSystemTime(), nullptr, base::Callback<void(bool)>(), |
| 2239 GURL()); |
| 2239 } | 2240 } |
| 2240 }; | 2241 }; |
| 2241 | 2242 |
| 2242 IN_PROC_BROWSER_TEST_F(SSLBlockingPageIDNTest, SSLBlockingPageDecodesIDN) { | 2243 IN_PROC_BROWSER_TEST_F(SSLBlockingPageIDNTest, SSLBlockingPageDecodesIDN) { |
| 2243 EXPECT_TRUE(VerifyIDNDecoded()); | 2244 EXPECT_TRUE(VerifyIDNDecoded()); |
| 2244 } | 2245 } |
| 2245 | 2246 |
| 2246 // TODO(jcampan): more tests to do below. | 2247 // TODO(jcampan): more tests to do below. |
| 2247 | 2248 |
| 2248 // Visit a page over https that contains a frame with a redirect. | 2249 // Visit a page over https that contains a frame with a redirect. |
| 2249 | 2250 |
| 2250 // XMLHttpRequest insecure content in synchronous mode. | 2251 // XMLHttpRequest insecure content in synchronous mode. |
| 2251 | 2252 |
| 2252 // XMLHttpRequest insecure content in asynchronous mode. | 2253 // XMLHttpRequest insecure content in asynchronous mode. |
| 2253 | 2254 |
| 2254 // XMLHttpRequest over bad ssl in synchronous mode. | 2255 // XMLHttpRequest over bad ssl in synchronous mode. |
| 2255 | 2256 |
| 2256 // XMLHttpRequest over OK ssl in synchronous mode. | 2257 // XMLHttpRequest over OK ssl in synchronous mode. |
| OLD | NEW |