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

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

Issue 1244783006: Add Finch testing configs for ReportCertificateErrors study (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix GetLatestHostnameReported() const definition Created 5 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 | « no previous file | chrome/browser/ssl/certificate_reporting_test_utils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ssl/captive_portal_blocking_page_browsertest.cc
diff --git a/chrome/browser/ssl/captive_portal_blocking_page_browsertest.cc b/chrome/browser/ssl/captive_portal_blocking_page_browsertest.cc
index 0d649ee633bc87fb176f524546a33baa85c1b2c0..6330b0e7d231f5491bc06e39c4263677351962ff 100644
--- a/chrome/browser/ssl/captive_portal_blocking_page_browsertest.cc
+++ b/chrome/browser/ssl/captive_portal_blocking_page_browsertest.cc
@@ -279,14 +279,18 @@ IN_PROC_BROWSER_TEST_F(CaptivePortalBlockingPageTest,
}
IN_PROC_BROWSER_TEST_F(CaptivePortalBlockingPageTest, CertReportingOptIn) {
- CertificateReportingTestUtils::SetCertReportingFinchConfig(
- CertReportHelper::kFinchGroupShowPossiblySend, "1.0");
- TestCertReporting(CertificateReportingTestUtils::EXTENDED_REPORTING_OPT_IN);
+ // This test should only run if the Finch config is such that reports
+ // will be sent when opted in. This tests that a report *is* sent when
+ // the user opts in under such a Finch config, and the below test
+ // tests that a report *is not* sent when the user doesn't opt in
+ // (under any Finch config).
+ if (CertificateReportingTestUtils::GetReportExpectedFromFinch() ==
+ CertificateReportingTestUtils::CERT_REPORT_EXPECTED) {
+ TestCertReporting(CertificateReportingTestUtils::EXTENDED_REPORTING_OPT_IN);
+ }
}
IN_PROC_BROWSER_TEST_F(CaptivePortalBlockingPageTest, CertReportingOptOut) {
- CertificateReportingTestUtils::SetCertReportingFinchConfig(
- CertReportHelper::kFinchGroupShowPossiblySend, "1.0");
TestCertReporting(
CertificateReportingTestUtils::EXTENDED_REPORTING_DO_NOT_OPT_IN);
}
« no previous file with comments | « no previous file | chrome/browser/ssl/certificate_reporting_test_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698