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/base_switches.h" | 10 #include "base/base_switches.h" |
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
325 } | 325 } |
326 | 326 |
327 IN_PROC_BROWSER_TEST_F(CaptivePortalBlockingPageTest, CertReportingOptOut) { | 327 IN_PROC_BROWSER_TEST_F(CaptivePortalBlockingPageTest, CertReportingOptOut) { |
328 TestCertReporting( | 328 TestCertReporting( |
329 certificate_reporting_test_utils::EXTENDED_REPORTING_DO_NOT_OPT_IN); | 329 certificate_reporting_test_utils::EXTENDED_REPORTING_DO_NOT_OPT_IN); |
330 } | 330 } |
331 | 331 |
332 class CaptivePortalBlockingPageIDNTest : public SecurityInterstitialIDNTest { | 332 class CaptivePortalBlockingPageIDNTest : public SecurityInterstitialIDNTest { |
333 protected: | 333 protected: |
334 // SecurityInterstitialIDNTest implementation | 334 // SecurityInterstitialIDNTest implementation |
335 SecurityInterstitialPage* CreateInterstitial( | 335 security_interstitials::SecurityInterstitialPage* CreateInterstitial( |
336 content::WebContents* contents, | 336 content::WebContents* contents, |
337 const GURL& request_url) const override { | 337 const GURL& request_url) const override { |
338 net::SSLInfo empty_ssl_info; | 338 net::SSLInfo empty_ssl_info; |
339 // Blocking page is owned by the interstitial. | 339 // Blocking page is owned by the interstitial. |
340 CaptivePortalBlockingPage* blocking_page = | 340 CaptivePortalBlockingPage* blocking_page = |
341 new CaptivePortalBlockingPageForTesting( | 341 new CaptivePortalBlockingPageForTesting( |
342 contents, GURL(kBrokenSSL), request_url, nullptr, empty_ssl_info, | 342 contents, GURL(kBrokenSSL), request_url, nullptr, empty_ssl_info, |
343 base::Callback<void(content::CertificateRequestResultType)>(), | 343 base::Callback<void(content::CertificateRequestResultType)>(), |
344 false, ""); | 344 false, ""); |
345 return blocking_page; | 345 return blocking_page; |
346 } | 346 } |
347 }; | 347 }; |
348 | 348 |
349 // Test that an IDN login domain is decoded properly. | 349 // Test that an IDN login domain is decoded properly. |
350 IN_PROC_BROWSER_TEST_F(CaptivePortalBlockingPageIDNTest, | 350 IN_PROC_BROWSER_TEST_F(CaptivePortalBlockingPageIDNTest, |
351 ShowLoginIDNIfPortalRedirectsDetectionURL) { | 351 ShowLoginIDNIfPortalRedirectsDetectionURL) { |
352 EXPECT_TRUE(VerifyIDNDecoded()); | 352 EXPECT_TRUE(VerifyIDNDecoded()); |
353 } | 353 } |
OLD | NEW |