fix: only a single disable features flag is allowed (#10887)

This commit is contained in:
Alex Rudenko 2023-09-12 09:20:30 +02:00 committed by GitHub
parent d08ad5fbbe
commit 4852e222b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -166,6 +166,20 @@ export class ChromeLauncher extends ProductLauncher {
override defaultArgs(options: BrowserLaunchArgumentOptions = {}): string[] {
// See https://github.com/GoogleChrome/chrome-launcher/blob/main/docs/chrome-flags-for-tools.md
const disabledFeatures = [
'Translate',
// AcceptCHFrame disabled because of crbug.com/1348106.
'AcceptCHFrame',
'MediaRouter',
'OptimizationHints',
];
if (!USE_TAB_TARGET) {
disabledFeatures.push('Prerender2');
disabledFeatures.push('BackForwardCache');
}
const chromeArguments = [
'--allow-pre-commit-input',
'--disable-background-networking',
@ -178,11 +192,7 @@ export class ChromeLauncher extends ProductLauncher {
'--disable-default-apps',
'--disable-dev-shm-usage',
'--disable-extensions',
// AcceptCHFrame disabled because of crbug.com/1348106.
'--disable-features=Translate,AcceptCHFrame,MediaRouter,OptimizationHints',
...(USE_TAB_TARGET
? []
: ['--disable-features=Prerender2,BackForwardCache']),
`--disable-features=${disabledFeatures.join(',')}`,
'--disable-hang-monitor',
'--disable-ipc-flooding-protection',
'--disable-popup-blocking',