From a1ffed605212158a7562aa2ff58346b49ad5be08 Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Fri, 10 Apr 2020 14:12:30 -0700 Subject: [PATCH] fix(firefox): do not create first window on start (#1727) --- src/server/firefox.ts | 9 +++++++-- test/fixtures.spec.js | 1 + 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/server/firefox.ts b/src/server/firefox.ts index f5ff763bf6..4ca982def1 100644 --- a/src/server/firefox.ts +++ b/src/server/firefox.ts @@ -185,8 +185,13 @@ export class Firefox implements BrowserType { firefoxArguments.push('-juggler', String(port)); firefoxArguments.push(...args); - if (args.every(arg => arg.startsWith('-'))) - firefoxArguments.push('about:blank'); + if (launchType === 'persistent') { + if (args.every(arg => arg.startsWith('-'))) + firefoxArguments.push('about:blank'); + } else { + firefoxArguments.push('-silent'); + } + return firefoxArguments; } } diff --git a/test/fixtures.spec.js b/test/fixtures.spec.js index 9eaed2af28..89e3ad3d24 100644 --- a/test/fixtures.spec.js +++ b/test/fixtures.spec.js @@ -26,6 +26,7 @@ async function testSignal(browserType, action, exitOnClose) { handleSIGINT: true, handleSIGTERM: true, handleSIGHUP: true, + executablePath: browserType.executablePath(), }); const res = spawn('node', [path.join(__dirname, 'fixtures', 'closeme.js'), playwrightPath, browserType.name(), JSON.stringify(options), exitOnClose ? 'true' : '']); let wsEndPointCallback;