Shared test helpers for setting cmdline switches for field trial params.
This CL introduces the following helpers for setting field trial params
from test code:
content/public/test/test_util.h:
// Appends command line switches to |command_line| to enable the
// |feature| and to set field trial params associated with the feature
// as specified by |param_name| and |param_value|.
void EnableFeatureWithParam(const base::Feature& feature,
const std::string& param_name,
const std::string& param_value,
base::CommandLine* command_line);
components/variations/variations_params_manager.h:
// Appends command line switches to |command_line| in a way that
// mimics SetVariationParams.
static void AppendVariationParams(
const std::string& trial_name,
const std::string& trial_group_name,
const std::map<std::string, std::string>& param_values,
base::CommandLine* command_line);
Change-Id: Ibdcd7931c2894b9d5d77334d286bf3142034591a
Bug: 740701
Tbr: [email protected], [email protected], [email protected]
Reviewed-on: https://chromium-review.googlesource.com/565224
Commit-Queue: Lukasz Anforowicz <[email protected]>
Reviewed-by: Ryan Sleevi <[email protected]>
Reviewed-by: Dan Sinclair <[email protected]>
Reviewed-by: Benoit L <[email protected]>
Reviewed-by: Charlie Reis (OOO until July 19) <[email protected]>
Reviewed-by: Alexei Svitkine (slow) <[email protected]>
Cr-Commit-Position: refs/heads/master@{#486814}
22 files changed