Skip to content

Commit

Permalink
fix: improve fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
OrKoN committed Apr 29, 2022
1 parent ab832a6 commit 096c7f7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/node/Launcher.ts
Expand Up @@ -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',
Expand All @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion test/launcher.spec.ts
Expand Up @@ -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();
Expand Down
3 changes: 3 additions & 0 deletions test/mocha-utils.ts
Expand Up @@ -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
);
Expand Down

0 comments on commit 096c7f7

Please sign in to comment.