mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
fix(firefox): add test to make sure remote browser can be closed (#4023)
This commit is contained in:
parent
c35821a1a1
commit
9782f9c827
@ -9,7 +9,7 @@
|
|||||||
"node": ">=8.9.4"
|
"node": ">=8.9.4"
|
||||||
},
|
},
|
||||||
"puppeteer": {
|
"puppeteer": {
|
||||||
"firefox_revision": "c74102def6c16584c155a98741e8143ab5d615b9"
|
"firefox_revision": "10282bfac697c69a6fdfeec4cddae7caf98e1969"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"install": "node install.js",
|
"install": "node install.js",
|
||||||
|
@ -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');
|
expect(await secondPage.evaluate(() => 7 * 6)).toBe(42, 'original browser should still work');
|
||||||
await originalBrowser.close();
|
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}) => {
|
it('should support ignoreHTTPSErrors option', async({httpsServer}) => {
|
||||||
const originalBrowser = await puppeteer.launch(defaultBrowserOptions);
|
const originalBrowser = await puppeteer.launch(defaultBrowserOptions);
|
||||||
const browserWSEndpoint = originalBrowser.wsEndpoint();
|
const browserWSEndpoint = originalBrowser.wsEndpoint();
|
||||||
|
Loading…
Reference in New Issue
Block a user