Commit cd37bf32 authored by Erik Anderson's avatar Erik Anderson Committed by Commit Bot

set 1.0 sending threshold for SSLUITestWithExtendedReporting tests

The SSLUITestWithExtendedReporting.TestBrokenHTTPSReportingCloseTab test is failing on official builds because the ReportCertificateErrors sending threshold is configured to be less than 1.0 (100%) for the stable channel. This change forces it to 1.0 to ensure the test passes regardless of the value provided by the experimentation server.

Bug: 795820
Change-Id: Icbcb839745be7e67d15e2ce998d943d37369e23b
Reviewed-on: https://chromium-review.googlesource.com/c/1450239Reviewed-by: default avatarEmily Stark <estark@chromium.org>
Commit-Queue: Erik Anderson <Erik.Anderson@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#628555}
parent 235f2d1d
...@@ -100,6 +100,7 @@ ...@@ -100,6 +100,7 @@
#include "components/ssl_errors/error_classification.h" #include "components/ssl_errors/error_classification.h"
#include "components/strings/grit/components_strings.h" #include "components/strings/grit/components_strings.h"
#include "components/variations/variations_associated_data.h" #include "components/variations/variations_associated_data.h"
#include "components/variations/variations_params_manager.h"
#include "components/variations/variations_switches.h" #include "components/variations/variations_switches.h"
#include "components/web_modal/web_contents_modal_dialog_manager.h" #include "components/web_modal/web_contents_modal_dialog_manager.h"
#include "content/public/browser/browser_context.h" #include "content/public/browser/browser_context.h"
...@@ -1253,6 +1254,16 @@ class SSLUITestWithExtendedReporting : public SSLUITest { ...@@ -1253,6 +1254,16 @@ class SSLUITestWithExtendedReporting : public SSLUITest {
// been called. // been called.
CertReportHelper::SetFakeOfficialBuildForTesting(); CertReportHelper::SetFakeOfficialBuildForTesting();
} }
void SetUpCommandLine(base::CommandLine* command_line) override {
SSLUITest::SetUpCommandLine(command_line);
// CertReportHelper::ShouldReportCertificateError checks the value of this
// variation. Ensure reporting is enabled.
variations::testing::VariationParamsManager::AppendVariationParams(
"ReportCertificateErrors", "ShowAndPossiblySend",
{{"sendingThreshold", "1.0"}}, command_line);
}
}; };
INSTANTIATE_TEST_SUITE_P(, INSTANTIATE_TEST_SUITE_P(,
...@@ -2769,18 +2780,10 @@ IN_PROC_BROWSER_TEST_P(SSLUITest, TestDisplaysInsecureForm) { ...@@ -2769,18 +2780,10 @@ IN_PROC_BROWSER_TEST_P(SSLUITest, TestDisplaysInsecureForm) {
AuthState::DISPLAYED_FORM_WITH_INSECURE_ACTION); AuthState::DISPLAYED_FORM_WITH_INSECURE_ACTION);
} }
// TODO(crbug.com/795820): Fails in Windows, Linux and Mac official builds.
#if defined(OFFICIAL_BUILD)
#define MAYBE_TestBrokenHTTPSReportingCloseTab \
DISABLED_TestBrokenHTTPSReportingCloseTab
#else
#define MAYBE_TestBrokenHTTPSReportingCloseTab TestBrokenHTTPSReportingCloseTab
#endif
// Test that a report is sent if the user closes the tab on an interstitial // Test that a report is sent if the user closes the tab on an interstitial
// before making a decision to proceed or go back. // before making a decision to proceed or go back.
IN_PROC_BROWSER_TEST_P(SSLUITestWithExtendedReporting, IN_PROC_BROWSER_TEST_P(SSLUITestWithExtendedReporting,
MAYBE_TestBrokenHTTPSReportingCloseTab) { TestBrokenHTTPSReportingCloseTab) {
ASSERT_TRUE(https_server_expired_.Start()); ASSERT_TRUE(https_server_expired_.Start());
base::RunLoop run_loop; base::RunLoop run_loop;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment