mirror of
https://github.com/microsoft/playwright.git
synced 2024-12-14 13:45:36 +03:00
test: fix cookie tests on WebKit (#2359)
WebKit does not allow third party cookies.
This commit is contained in:
parent
43eed027bd
commit
d532cd5d9f
@ -111,9 +111,9 @@ describe('launchPersistentContext()', function() {
|
||||
document.cookie = 'username=John Doe';
|
||||
return document.cookie;
|
||||
});
|
||||
expect(documentCookie).toBe('username=John Doe');
|
||||
await page.waitForTimeout(2000);
|
||||
const allowsThirdParty = CHROMIUM || FFOX;
|
||||
expect(documentCookie).toBe(allowsThirdParty ? 'username=John Doe' : '');
|
||||
const cookies = await context.cookies(server.CROSS_PROCESS_PREFIX + '/grid.html');
|
||||
if (allowsThirdParty) {
|
||||
expect(cookies).toEqual([
|
||||
|
@ -96,9 +96,9 @@ describe('Headful', function() {
|
||||
document.cookie = 'username=John Doe';
|
||||
return document.cookie;
|
||||
});
|
||||
expect(documentCookie).toBe('username=John Doe');
|
||||
await page.waitForTimeout(2000);
|
||||
const allowsThirdParty = CHROMIUM || FFOX;
|
||||
expect(documentCookie).toBe(allowsThirdParty ? 'username=John Doe' : '');
|
||||
const cookies = await page.context().cookies(server.CROSS_PROCESS_PREFIX + '/grid.html');
|
||||
if (allowsThirdParty) {
|
||||
expect(cookies).toEqual([
|
||||
|
Loading…
Reference in New Issue
Block a user