Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(377)

Side by Side Diff: chrome/browser/captive_portal/captive_portal_browsertest.cc

Issue 1815363002: Add RetainedRef uses where needed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/browsing_data/browsing_data_remover.cc ('k') | chrome/browser/chrome_net_benchmarking_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698