OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "chrome/browser/ssl/captive_portal_blocking_page.h" | 5 #include "chrome/browser/ssl/captive_portal_blocking_page.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
316 } | 316 } |
317 | 317 |
318 IN_PROC_BROWSER_TEST_F(CaptivePortalBlockingPageTest, CertReportingOptOut) { | 318 IN_PROC_BROWSER_TEST_F(CaptivePortalBlockingPageTest, CertReportingOptOut) { |
319 TestCertReporting( | 319 TestCertReporting( |
320 certificate_reporting_test_utils::EXTENDED_REPORTING_DO_NOT_OPT_IN); | 320 certificate_reporting_test_utils::EXTENDED_REPORTING_DO_NOT_OPT_IN); |
321 } | 321 } |
322 | 322 |
323 class CaptivePortalBlockingPageIDNTest : public SecurityInterstitialIDNTest { | 323 class CaptivePortalBlockingPageIDNTest : public SecurityInterstitialIDNTest { |
324 protected: | 324 protected: |
325 // SecurityInterstitialIDNTest implementation | 325 // SecurityInterstitialIDNTest implementation |
326 SecurityInterstitialPage* CreateInterstitial( | 326 security_interstitials::SecurityInterstitialPage* CreateInterstitial( |
327 content::WebContents* contents, | 327 content::WebContents* contents, |
328 const GURL& request_url) const override { | 328 const GURL& request_url) const override { |
329 net::SSLInfo empty_ssl_info; | 329 net::SSLInfo empty_ssl_info; |
330 // Blocking page is owned by the interstitial. | 330 // Blocking page is owned by the interstitial. |
331 CaptivePortalBlockingPage* blocking_page = | 331 CaptivePortalBlockingPage* blocking_page = |
332 new CaptivePortalBlockingPageForTesting( | 332 new CaptivePortalBlockingPageForTesting( |
333 contents, GURL(kBrokenSSL), request_url, nullptr, empty_ssl_info, | 333 contents, GURL(kBrokenSSL), request_url, nullptr, empty_ssl_info, |
334 base::Callback<void(content::CertificateRequestResultType)>(), | 334 base::Callback<void(content::CertificateRequestResultType)>(), |
335 false, ""); | 335 false, ""); |
336 return blocking_page; | 336 return blocking_page; |
337 } | 337 } |
338 }; | 338 }; |
339 | 339 |
340 // Test that an IDN login domain is decoded properly. | 340 // Test that an IDN login domain is decoded properly. |
341 IN_PROC_BROWSER_TEST_F(CaptivePortalBlockingPageIDNTest, | 341 IN_PROC_BROWSER_TEST_F(CaptivePortalBlockingPageIDNTest, |
342 ShowLoginIDNIfPortalRedirectsDetectionURL) { | 342 ShowLoginIDNIfPortalRedirectsDetectionURL) { |
343 EXPECT_TRUE(VerifyIDNDecoded()); | 343 EXPECT_TRUE(VerifyIDNDecoded()); |
344 } | 344 } |
OLD | NEW |