feat(webkit): roll webkit to r1137 (#884)

This commit is contained in:
Pavel Feldman 2020-02-06 21:06:55 -08:00 committed by GitHub
parent fee83b17c9
commit fe2431e34b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 21 deletions

View File

@ -10,7 +10,7 @@
"playwright": {
"chromium_revision": "737027",
"firefox_revision": "1025",
"webkit_revision": "1134"
"webkit_revision": "1137"
},
"scripts": {
"ctest": "cross-env BROWSER=chromium node test/test.js",

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
module.exports.describe = function({testRunner, expect, playwright, FFOX, CHROMIUM, WEBKIT}) {
module.exports.describe = function({testRunner, expect, playwright, defaultBrowserOptions, FFOX, CHROMIUM, WEBKIT}) {
const {describe, xdescribe, fdescribe} = testRunner;
const {it, fit, xit, dit} = testRunner;
const {beforeAll, beforeEach, afterAll, afterEach} = testRunner;
@ -239,25 +239,17 @@ module.exports.describe = function({testRunner, expect, playwright, FFOX, CHROMI
expect(cookie).toBe('');
}
});
it('should isolate cookies between runs', async({server, context, newContext}) => {
let cookie = [];
server.setRoute('/empty.html', (req, res) => {
cookie = req.headers.cookie || '';
res.end();
});
await context.setCookies([{url: server.EMPTY_PAGE, name: 'runcookie', value: 'value'}]);
{
const page = await context.newPage();
await page.goto(server.EMPTY_PAGE);
expect(cookie).toBe('runcookie=value');
}
{
const browser = await playwright.launch();
const page = await browser.newPage();
await page.goto(server.EMPTY_PAGE);
expect(cookie).toBe('');
await browser.close();
}
it('should isolate cookies between launches', async({server}) => {
const browser1 = await playwright.launch(defaultBrowserOptions);
const context1 = await browser1.newContext();
await context1.setCookies([{url: server.EMPTY_PAGE, name: 'cookie-in-context-1', value: 'value', expires: Date.now() + 1000000000 }]);
await browser1.close();
const browser2 = await playwright.launch(defaultBrowserOptions);
const context2 = await browser2.newContext();
const cookies = await context2.cookies();
expect(cookies.length).toBe(0);
await browser2.close();
});
it('should set multiple cookies', async({context, page, server}) => {
await page.goto(server.EMPTY_PAGE);