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 <map> | 5 #include <map> |
6 #include <set> | 6 #include <set> |
7 #include <string> | 7 #include <string> |
8 #include <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 2778 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2789 // in. | 2789 // in. |
2790 IN_PROC_BROWSER_TEST_F(CaptivePortalBrowserTest, HstsLogin) { | 2790 IN_PROC_BROWSER_TEST_F(CaptivePortalBrowserTest, HstsLogin) { |
2791 GURL::Replacements replacements; | 2791 GURL::Replacements replacements; |
2792 replacements.SetSchemeStr("http"); | 2792 replacements.SetSchemeStr("http"); |
2793 GURL http_timeout_url = GURL(kMockHttpsUrl).ReplaceComponents(replacements); | 2793 GURL http_timeout_url = GURL(kMockHttpsUrl).ReplaceComponents(replacements); |
2794 | 2794 |
2795 URLRequestFailedJob::GetMockHttpUrl(net::ERR_CONNECTION_TIMED_OUT); | 2795 URLRequestFailedJob::GetMockHttpUrl(net::ERR_CONNECTION_TIMED_OUT); |
2796 content::BrowserThread::PostTask( | 2796 content::BrowserThread::PostTask( |
2797 content::BrowserThread::IO, FROM_HERE, | 2797 content::BrowserThread::IO, FROM_HERE, |
2798 base::Bind(&AddHstsHost, | 2798 base::Bind(&AddHstsHost, |
2799 make_scoped_refptr(browser()->profile()->GetRequestContext()), | 2799 base::RetainedRef(browser()->profile()->GetRequestContext()), |
2800 http_timeout_url.host())); | 2800 http_timeout_url.host())); |
2801 | 2801 |
2802 SlowLoadBehindCaptivePortal(browser(), true, http_timeout_url, 1, 1); | 2802 SlowLoadBehindCaptivePortal(browser(), true, http_timeout_url, 1, 1); |
2803 Login(browser(), 1, 0); | 2803 Login(browser(), 1, 0); |
2804 FailLoadsAfterLogin(browser(), 1); | 2804 FailLoadsAfterLogin(browser(), 1); |
2805 } | 2805 } |
2806 | 2806 |
2807 // A slow SSL load starts. The reloader triggers a captive portal check, finds a | 2807 // A slow SSL load starts. The reloader triggers a captive portal check, finds a |
2808 // captive portal. The SSL commits with a cert error, triggering another captive | 2808 // captive portal. The SSL commits with a cert error, triggering another captive |
2809 // portal check. | 2809 // portal check. |
(...skipping 26 matching lines...) Expand all Loading... |
2836 | 2836 |
2837 EXPECT_EQ(CaptivePortalTabReloader::STATE_NEEDS_RELOAD, | 2837 EXPECT_EQ(CaptivePortalTabReloader::STATE_NEEDS_RELOAD, |
2838 GetStateOfTabReloaderAt(browser(), broken_tab_index)); | 2838 GetStateOfTabReloaderAt(browser(), broken_tab_index)); |
2839 | 2839 |
2840 WaitForInterstitialAttach(broken_tab_contents); | 2840 WaitForInterstitialAttach(broken_tab_contents); |
2841 portal_observer.WaitForResults(1); | 2841 portal_observer.WaitForResults(1); |
2842 | 2842 |
2843 EXPECT_EQ(SSLBlockingPage::kTypeForTesting, | 2843 EXPECT_EQ(SSLBlockingPage::kTypeForTesting, |
2844 GetInterstitialType(broken_tab_contents)); | 2844 GetInterstitialType(broken_tab_contents)); |
2845 } | 2845 } |
OLD | NEW |