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

Unified Diff: chrome/browser/ssl/ssl_error_handler_unittest.cc

Issue 819443003: Add finch gate for captive portal interstitial. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix unit tests Created 5 years, 11 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/ssl/ssl_error_handler.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ssl/ssl_error_handler_unittest.cc
diff --git a/chrome/browser/ssl/ssl_error_handler_unittest.cc b/chrome/browser/ssl/ssl_error_handler_unittest.cc
index fa8ae410e4785e4ff761c2a1bb2d357e9d48994f..8efad4bf53ecc54a459a3b18c8dafe0f9448852e 100644
--- a/chrome/browser/ssl/ssl_error_handler_unittest.cc
+++ b/chrome/browser/ssl/ssl_error_handler_unittest.cc
@@ -6,6 +6,7 @@
#include "base/callback.h"
#include "base/message_loop/message_loop.h"
+#include "base/metrics/field_trial.h"
#include "base/run_loop.h"
#include "base/time/time.h"
#include "chrome/browser/captive_portal/captive_portal_service.h"
@@ -96,13 +97,20 @@ class TestSSLErrorHandler : public SSLErrorHandler {
class SSLErrorHandlerTest : public ChromeRenderViewHostTestHarness {
public:
+ SSLErrorHandlerTest()
+ : field_trial_list_(NULL) {
+ }
+
void SetUp() override {
ChromeRenderViewHostTestHarness::SetUp();
SSLErrorHandler::SetInterstitialDelayTypeForTest(SSLErrorHandler::NONE);
error_handler_.reset(new TestSSLErrorHandler(profile(),
web_contents(),
ssl_info_));
- }
+ // Enable finch experiment for captive portal interstitials.
+ ASSERT_TRUE(base::FieldTrialList::CreateFieldTrial(
+ "CaptivePortalInterstitial", "Enabled"));
+}
void TearDown() override {
EXPECT_FALSE(error_handler()->IsTimerRunning());
@@ -115,6 +123,7 @@ class SSLErrorHandlerTest : public ChromeRenderViewHostTestHarness {
private:
net::SSLInfo ssl_info_;
scoped_ptr<TestSSLErrorHandler> error_handler_;
+ base::FieldTrialList field_trial_list_;
};
#if defined(ENABLE_CAPTIVE_PORTAL_DETECTION)
« no previous file with comments | « chrome/browser/ssl/ssl_error_handler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698