fix(firefox): do not create first window on start (#1727)

This commit is contained in:
Yury Semikhatsky 2020-04-10 14:12:30 -07:00 committed by GitHub
parent 99c3f2b279
commit a1ffed6052
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

View File

@ -185,8 +185,13 @@ export class Firefox implements BrowserType<FFBrowser> {
firefoxArguments.push('-juggler', String(port));
firefoxArguments.push(...args);
if (launchType === 'persistent') {
if (args.every(arg => arg.startsWith('-')))
firefoxArguments.push('about:blank');
} else {
firefoxArguments.push('-silent');
}
return firefoxArguments;
}
}

View File

@ -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;