Commit da7f0a0a authored by Brandon Walderman's avatar Brandon Walderman Committed by Commit Bot

Add --no-service-autorun switch for ChromeDriver sessions.

The --no-service-autorun command line switch prevents service processes
from registering for autorun. This change updates ChromeDriver to use
this flag for desktop sessions. Service processes are tied to the
same user data directory as the browser process that launched them. If
a service process is created during a ChromeDriver session, it will use
the temporary user data directory that ChromeDriver created. This
directory is deleted at the end of the ChromeDriver session so it will
be meaningless after a machine reboot. The --no-service-autorun switch
ensures that we don't try to launch a service process with a previously
deleted user data directory on startup.

This issue was first found in Microsoft Edge. A notification service
is created and added to autorun by default when Edge starts for the
first time in a new profile. A downstream fixed has been checked in to
disable this service when --enable-automation is passed on the command
line. However, --no-service-autorun is still a good idea for
ChromeDriver since any potential service processes that are created
during a ChromeDriver session should not create OS artifacts such as
autorun entries that persist beyond the ChromeDriver session.

Bug: 1132969
Change-Id: I12c501b9e6c9ff8887f28fdd6f3144b113218e62
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2436773Reviewed-by: default avatarJohn Chen <johnchen@chromium.org>
Commit-Queue: Brandon Walderman <brwalder@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#811397}
parent 2e3f45f2
...@@ -95,6 +95,7 @@ const char* const kDesktopSwitches[] = { ...@@ -95,6 +95,7 @@ const char* const kDesktopSwitches[] = {
// After completion of the migration, we should remove this. // After completion of the migration, we should remove this.
// See crbug.com/911943 for detail. // See crbug.com/911943 for detail.
"enable-blink-features=ShadowDOMV0", "enable-blink-features=ShadowDOMV0",
"no-service-autorun",
}; };
const char* const kAndroidSwitches[] = { const char* const kAndroidSwitches[] = {
......
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