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: bauerb@chromium.org, bartfab@chromium.org, nparker@chromium.org Reviewed-on: https://chromium-review.googlesource.com/565224 Commit-Queue: Lukasz Anforowicz <lukasza@chromium.org> Reviewed-by:Ryan Sleevi <rsleevi@chromium.org> Reviewed-by:
Dan Sinclair <dsinclair@chromium.org> Reviewed-by:
Benoit L <lizeb@chromium.org> Reviewed-by:
Charlie Reis (OOO until July 19) <creis@chromium.org> Reviewed-by:
Alexei Svitkine (slow) <asvitkine@chromium.org> Cr-Commit-Position: refs/heads/master@{#486814}
Showing
Please register or sign in to comment