Skip to content

Commit

Permalink
fix(firefox): add test to make sure remote browser can be closed (#4023)
Browse files Browse the repository at this point in the history
  • Loading branch information
aslushnikov committed Feb 16, 2019
1 parent c35821a commit 9782f9c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion experimental/puppeteer-firefox/package.json
Expand Up @@ -9,7 +9,7 @@
"node": ">=8.9.4"
},
"puppeteer": {
"firefox_revision": "c74102def6c16584c155a98741e8143ab5d615b9"
"firefox_revision": "10282bfac697c69a6fdfeec4cddae7caf98e1969"
},
"scripts": {
"install": "node install.js",
Expand Down
10 changes: 10 additions & 0 deletions test/launcher.spec.js
Expand Up @@ -314,6 +314,16 @@ module.exports.addTests = function({testRunner, expect, defaultBrowserOptions, p
expect(await secondPage.evaluate(() => 7 * 6)).toBe(42, 'original browser should still work');
await originalBrowser.close();
});
it('should be able to close remote browser', async({server}) => {
const originalBrowser = await puppeteer.launch(defaultBrowserOptions);
const remoteBrowser = await puppeteer.connect({
browserWSEndpoint: originalBrowser.wsEndpoint()
});
await Promise.all([
utils.waitEvent(originalBrowser, 'disconnected'),
remoteBrowser.close(),
]);
});
it('should support ignoreHTTPSErrors option', async({httpsServer}) => {
const originalBrowser = await puppeteer.launch(defaultBrowserOptions);
const browserWSEndpoint = originalBrowser.wsEndpoint();
Expand Down

0 comments on commit 9782f9c

Please sign in to comment.