Commit d6caa886 authored by Tricia Crichton's avatar Tricia Crichton Committed by Commit Bot

[ChromeDriver] Add ignore-certificate-errors to cmd

If acceptInsecureCerts is true in capabilities, add
ignore-certificate-errors to Chrome commandline for Desktop and Android.

Bug: 3226
Change-Id: I853fca2c7b09302632b7bdd209441c5fff65effa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1915190Reviewed-by: default avatarJohn Chen <johnchen@chromium.org>
Commit-Queue: Tricia Crichton <triciac@chromium.org>
Cr-Commit-Position: refs/heads/master@{#715726}
parent 68baeeeb
...@@ -151,6 +151,9 @@ Status PrepareDesktopCommandLine(const Capabilities& capabilities, ...@@ -151,6 +151,9 @@ Status PrepareDesktopCommandLine(const Capabilities& capabilities,
switches.SetUnparsedSwitch(common_switch); switches.SetUnparsedSwitch(common_switch);
for (auto* desktop_switch : kDesktopSwitches) for (auto* desktop_switch : kDesktopSwitches)
switches.SetUnparsedSwitch(desktop_switch); switches.SetUnparsedSwitch(desktop_switch);
if (capabilities.accept_insecure_certs) {
switches.SetSwitch("ignore-certificate-errors");
}
for (const auto& excluded_switch : capabilities.exclude_switches) { for (const auto& excluded_switch : capabilities.exclude_switches) {
switches.RemoveSwitch(excluded_switch); switches.RemoveSwitch(excluded_switch);
} }
...@@ -621,6 +624,9 @@ Status LaunchAndroidChrome(network::mojom::URLLoaderFactory* factory, ...@@ -621,6 +624,9 @@ Status LaunchAndroidChrome(network::mojom::URLLoaderFactory* factory,
switches.SetUnparsedSwitch(common_switch); switches.SetUnparsedSwitch(common_switch);
for (auto* android_switch : kAndroidSwitches) for (auto* android_switch : kAndroidSwitches)
switches.SetUnparsedSwitch(android_switch); switches.SetUnparsedSwitch(android_switch);
if (capabilities.accept_insecure_certs) {
switches.SetSwitch("ignore-certificate-errors");
}
for (auto excluded_switch : capabilities.exclude_switches) for (auto excluded_switch : capabilities.exclude_switches)
switches.RemoveSwitch(excluded_switch); switches.RemoveSwitch(excluded_switch);
status = device->SetUp( status = device->SetUp(
......
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