[7.5] FTR: fix "DevToolsActivePort file doesn't exist" error o… (#49834)

This commit is contained in:
Spencer 2019-10-31 07:07:28 -07:00 committed by GitHub
parent 908b83433b
commit 37b4dd230c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -77,13 +77,23 @@ async function attemptToCreateCommand(
case 'chrome': {
const chromeCapabilities = Capabilities.chrome();
const chromeOptions = [
'disable-translate',
'new-window',
// Disables the sandbox for all process types that are normally sandboxed.
'no-sandbox',
// Launches URL in new browser window.
'new-window',
// By default, file:// URIs cannot read other file:// URIs. This is an override for developers who need the old behavior for testing.
'allow-file-access-from-files',
// Use fake device for Media Stream to replace actual camera and microphone.
'use-fake-device-for-media-stream',
// Bypass the media stream infobar by selecting the default device for media streams (e.g. WebRTC). Works with --use-fake-device-for-media-stream.
'use-fake-ui-for-media-stream',
];
if (process.platform === 'linux') {
// The /dev/shm partition is too small in certain VM environments, causing
// Chrome to fail or crash. Use this flag to work-around this issue
// (a temporary directory will always be used to create anonymous shared memory files).
chromeOptions.push('disable-dev-shm-usage');
}
if (headlessBrowser === '1') {
// Use --disable-gpu to avoid an error from a missing Mesa library, as per
// See: https://chromium.googlesource.com/chromium/src/+/lkgr/headless/README.md