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 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 895 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
906 GURL(kMockCaptivePortalTestUrl)); | 906 GURL(kMockCaptivePortalTestUrl)); |
907 } | 907 } |
908 | 908 |
909 void CaptivePortalBrowserTest::CleanUpOnMainThread() { | 909 void CaptivePortalBrowserTest::CleanUpOnMainThread() { |
910 // No test should have a captive portal check pending on quit. | 910 // No test should have a captive portal check pending on quit. |
911 EXPECT_FALSE(CheckPending(browser())); | 911 EXPECT_FALSE(CheckPending(browser())); |
912 } | 912 } |
913 | 913 |
914 void CaptivePortalBrowserTest::SetUpCommandLine( | 914 void CaptivePortalBrowserTest::SetUpCommandLine( |
915 CommandLine* command_line) { | 915 CommandLine* command_line) { |
916 command_line->AppendSwitch(switches::kCaptivePortalDetection); | 916 command_line->AppendSwitchASCII(switches::kCaptivePortalDetection, |
| 917 switches::kCaptivePortalDetectionEnabled); |
917 } | 918 } |
918 | 919 |
919 void CaptivePortalBrowserTest::EnableCaptivePortalDetection( | 920 void CaptivePortalBrowserTest::EnableCaptivePortalDetection( |
920 Profile* profile, bool enabled) { | 921 Profile* profile, bool enabled) { |
921 profile->GetPrefs()->SetBoolean(prefs::kAlternateErrorPagesEnabled, enabled); | 922 profile->GetPrefs()->SetBoolean(prefs::kAlternateErrorPagesEnabled, enabled); |
922 } | 923 } |
923 | 924 |
924 void CaptivePortalBrowserTest::SetUpCaptivePortalService(Profile* profile, | 925 void CaptivePortalBrowserTest::SetUpCaptivePortalService(Profile* profile, |
925 const GURL& test_url) { | 926 const GURL& test_url) { |
926 CaptivePortalService* captive_portal_service = | 927 CaptivePortalService* captive_portal_service = |
(...skipping 1070 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1997 base::Bind(&AddHstsHost, | 1998 base::Bind(&AddHstsHost, |
1998 make_scoped_refptr(browser()->profile()->GetRequestContext()), | 1999 make_scoped_refptr(browser()->profile()->GetRequestContext()), |
1999 http_timeout_url.host())); | 2000 http_timeout_url.host())); |
2000 | 2001 |
2001 SlowLoadBehindCaptivePortal(browser(), true, http_timeout_url); | 2002 SlowLoadBehindCaptivePortal(browser(), true, http_timeout_url); |
2002 Login(browser(), 1, 0); | 2003 Login(browser(), 1, 0); |
2003 FailLoadsAfterLogin(browser(), 1); | 2004 FailLoadsAfterLogin(browser(), 1); |
2004 } | 2005 } |
2005 | 2006 |
2006 } // namespace captive_portal | 2007 } // namespace captive_portal |
OLD | NEW |