Commit af21999b authored by John Chen's avatar John Chen Committed by Commit Bot

[ChromeDriver] Give warning if exclude user-data-dir

ChromeDriver relies on the user-data-dir switch for its operations,
and ignores attempts by the client to exclude this switch. This CL
adds a warning message if the client attempts to exclude user-data-dir.

Bug: chromedriver:1981
Change-Id: I733f16fbdb6bea5dcf130ce7ad97664036f689be
Reviewed-on: https://chromium-review.googlesource.com/662598
Commit-Queue: John Chen <johnchen@chromium.org>
Reviewed-by: default avatarShuotao Gao <stgao@chromium.org>
Cr-Commit-Position: refs/heads/master@{#501303}
parent 23d375d3
...@@ -144,6 +144,8 @@ Status PrepareCommandLine(uint16_t port, ...@@ -144,6 +144,8 @@ Status PrepareCommandLine(uint16_t port,
} }
switches.SetFromSwitches(capabilities.switches); switches.SetFromSwitches(capabilities.switches);
if (capabilities.exclude_switches.count("user-data-dir") > 0)
LOG(WARNING) << "excluding user-data-dir switch is not supported";
base::FilePath user_data_dir_path; base::FilePath user_data_dir_path;
if (switches.HasSwitch("user-data-dir")) { if (switches.HasSwitch("user-data-dir")) {
user_data_dir_path = base::FilePath( user_data_dir_path = base::FilePath(
......
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