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

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

Issue 1035023002: Adding the Finch code for the certificate error reporter experiment (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Finch support for unittests Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ssl/ssl_blocking_page.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_browser_tests.cc
diff --git a/chrome/browser/ssl/ssl_browser_tests.cc b/chrome/browser/ssl/ssl_browser_tests.cc
index ba69fe78eb8b47aee9d8ebc1bb8ecb8fff4a3cc8..014cd183d2561642fe0c58ad95f702f24cf58b6f 100644
--- a/chrome/browser/ssl/ssl_browser_tests.cc
+++ b/chrome/browser/ssl/ssl_browser_tests.cc
@@ -6,6 +6,7 @@
#include "base/bind_helpers.h"
#include "base/callback.h"
#include "base/command_line.h"
+#include "base/metrics/field_trial.h"
#include "base/prefs/pref_service.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
@@ -31,6 +32,7 @@
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h"
#include "components/content_settings/core/browser/host_content_settings_map.h"
+#include "components/variations/variations_associated_data.h"
#include "components/web_modal/web_contents_modal_dialog_manager.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/interstitial_page.h"
@@ -1128,6 +1130,12 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, MAYBE_TestDisplaysInsecureContent) {
// send a report.
IN_PROC_BROWSER_TEST_F(SSLUITestWithExtendedReporting,
TestBrokenHTTPSProceedWithReporting) {
+ base::FieldTrialList::CreateFieldTrial("ReportCertificateErrors",
+ "ShowAndPossiblySend");
+ std::map<std::string, std::string> params;
+ params["possibly_send"] = "1.0";
+ variations::AssociateVariationParams("ReportCertificateErrors",
+ "ShowAndPossiblySend", params);
TestBrokenHTTPSReporting(CertificateReporting::EXTENDED_REPORTING_OPT_IN,
CertificateReporting::SSL_INTERSTITIAL_PROCEED,
CertificateReporting::CERT_REPORT_EXPECTED,
@@ -1139,6 +1147,12 @@ IN_PROC_BROWSER_TEST_F(SSLUITestWithExtendedReporting,
// FraudulentCertificateReporter sees a request to send a report.
IN_PROC_BROWSER_TEST_F(SSLUITestWithExtendedReporting,
TestBrokenHTTPSGoBackWithReporting) {
+ base::FieldTrialList::CreateFieldTrial("ReportCertificateErrors",
estark 2015/04/01 20:47:43 I think this code should appear on the 4 tests bel
+ "ShowAndPossiblySend");
+ std::map<std::string, std::string> params;
+ params["possibly_send"] = "1.0";
+ variations::AssociateVariationParams("ReportCertificateErrors",
+ "ShowAndPossiblySend", params);
TestBrokenHTTPSReporting(
CertificateReporting::EXTENDED_REPORTING_OPT_IN,
CertificateReporting::SSL_INTERSTITIAL_DO_NOT_PROCEED,
« no previous file with comments | « chrome/browser/ssl/ssl_blocking_page.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698