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

Unified Diff: chrome/browser/captive_portal/captive_portal_browsertest.cc

Issue 10795038: Enable captive portal detection by default. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Missed the browser_tests Created 8 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | chrome/browser/captive_portal/captive_portal_service.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/captive_portal/captive_portal_browsertest.cc
===================================================================
--- chrome/browser/captive_portal/captive_portal_browsertest.cc (revision 148558)
+++ chrome/browser/captive_portal/captive_portal_browsertest.cc (working copy)
@@ -761,7 +761,6 @@
CaptivePortalBrowserTest();
// InProcessBrowserTest:
- virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE;
virtual void SetUpOnMainThread() OVERRIDE;
virtual void CleanUpOnMainThread() OVERRIDE;
@@ -898,6 +897,11 @@
base::Bind(&chrome_browser_net::SetUrlRequestMocksEnabled, true));
URLRequestMockCaptivePortalJobFactory::AddUrlHandlers();
+ // Double-check that the captive portal service isn't enabled by default for
+ // browser tests.
+ EXPECT_TRUE(CaptivePortalService::is_disabled_for_testing());
+
+ CaptivePortalService::set_is_disabled_for_testing(false);
EnableCaptivePortalDetection(browser()->profile(), true);
// Set the captive portal service to use URLRequestMockCaptivePortalJob's
@@ -911,11 +915,6 @@
EXPECT_FALSE(CheckPending(browser()));
}
-void CaptivePortalBrowserTest::SetUpCommandLine(
- CommandLine* command_line) {
- command_line->AppendSwitch(switches::kCaptivePortalDetection);
-}
-
void CaptivePortalBrowserTest::EnableCaptivePortalDetection(
Profile* profile, bool enabled) {
profile->GetPrefs()->SetBoolean(prefs::kAlternateErrorPagesEnabled, enabled);
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | chrome/browser/captive_portal/captive_portal_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698