test(context): test that context.close() works for empty context (#1205)

This commit is contained in:
Yury Semikhatsky 2020-03-03 23:04:08 -08:00 committed by GitHub
parent 8aa88d5021
commit 771793f418
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View file

@ -10,7 +10,7 @@
"playwright": { "playwright": {
"chromium_revision": "745253", "chromium_revision": "745253",
"firefox_revision": "1032", "firefox_revision": "1032",
"webkit_revision": "1164" "webkit_revision": "1166"
}, },
"scripts": { "scripts": {
"ctest": "cross-env BROWSER=chromium node test/test.js", "ctest": "cross-env BROWSER=chromium node test/test.js",

View file

@ -109,6 +109,10 @@ module.exports.describe = function({testRunner, expect, playwright, CHROMIUM, FF
expect(await page.evaluate('window.innerHeight')).toBe(789); expect(await page.evaluate('window.innerHeight')).toBe(789);
await context.close(); await context.close();
}); });
it('close() should work for empty context', async({ browser }) => {
const context = await browser.newContext();
await context.close();
});
}); });
describe('BrowserContext({userAgent})', function() { describe('BrowserContext({userAgent})', function() {