From 096c7f7035259474cd9fc4691a7fb74710ecf20c Mon Sep 17 00:00:00 2001 From: Alex Rudenko Date: Fri, 29 Apr 2022 07:36:35 +0200 Subject: [PATCH] fix: improve fixes --- src/node/Launcher.ts | 4 ++-- test/launcher.spec.ts | 2 +- test/mocha-utils.ts | 3 +++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/node/Launcher.ts b/src/node/Launcher.ts index 20a3fd309bc81..6ebe144d0cf6a 100644 --- a/src/node/Launcher.ts +++ b/src/node/Launcher.ts @@ -203,7 +203,7 @@ class ChromeLauncher implements ProductLauncher { defaultArgs(options: BrowserLaunchArgumentOptions = {}): string[] { const chromeArguments = [ - '--allow-pre-commit-input', // Allows input events to be dispatched while the compositor commits are in progress. Reduces flakiness in headful. + '--allow-pre-commit-input', // TODO(crbug.com/1320996): neither headful nor headless should rely on this flag. '--disable-background-networking', '--enable-features=NetworkService,NetworkServiceInProcess', '--disable-background-timer-throttling', @@ -214,7 +214,7 @@ class ChromeLauncher implements ProductLauncher { '--disable-default-apps', '--disable-dev-shm-usage', '--disable-extensions', - '--disable-features=Translate,BackForwardCache,NetworkTimeServiceQuerying', + '--disable-features=Translate,BackForwardCache', '--disable-hang-monitor', '--disable-ipc-flooding-protection', '--disable-popup-blocking', diff --git a/test/launcher.spec.ts b/test/launcher.spec.ts index fe6d67d7192ea..33cb1ff71fbd4 100644 --- a/test/launcher.spec.ts +++ b/test/launcher.spec.ts @@ -548,12 +548,12 @@ describe('Launcher specs', function () { async () => { const { defaultBrowserOptions, puppeteer } = getTestState(); const options = { - args: ['--no-startup-window'], waitForInitialPage: false, // This is needed to prevent Puppeteer from adding an initial blank page. // See also https://github.com/puppeteer/puppeteer/blob/ad6b736039436fcc5c0a262e5b575aa041427be3/src/node/Launcher.ts#L200 ignoreDefaultArgs: true, ...defaultBrowserOptions, + args: ['--no-startup-window'], }; const browser = await puppeteer.launch(options); const pages = await browser.pages(); diff --git a/test/mocha-utils.ts b/test/mocha-utils.ts index abf80397dc279..4bef98d3e64f2 100644 --- a/test/mocha-utils.ts +++ b/test/mocha-utils.ts @@ -84,6 +84,9 @@ const defaultBrowserOptions = Object.assign( executablePath: process.env.BINARY, headless: headless === 'chrome' ? ('chrome' as const) : isHeadless, dumpio: !!process.env.DUMPIO, + args: [ + '--disable-features=NetworkTimeServiceQuerying', // we disable this in tests so that proxy-related tests don't intercept queries from this service. + ], }, extraLaunchOptions );