test: add a failing test for Page.waitForLoadState

This commit is contained in:
Joel Einbinder 2020-01-14 13:20:53 -08:00
parent 5b1aef4c20
commit bc154d0a09
2 changed files with 11 additions and 2 deletions

View file

@ -764,6 +764,16 @@ module.exports.describe = function({testRunner, expect, playwright, FFOX, CHROMI
response.end('Not found');
await navigationPromise;
});
it.skip(WEBKIT || FFOX)('should work with pages that have loaded before being connected to', async({page, context, server}) => {
await page.goto(server.EMPTY_PAGE);
await page.evaluate(async () => {
const child = window.open(document.location.href);
while(child.document.readyState !== 'complete' || child.document.location.href === 'about:blank')
await new Promise(setTimeout);
});
const [, childPage] = await context.pages();
await childPage.waitForLoadState();
});
});
describe('Page.goBack', function() {

View file

@ -172,8 +172,7 @@ module.exports.describe = function({testRunner, expect, headless, playwright, FF
expect(await page.evaluate(() => !!window.opener)).toBe(false);
expect(await popup.evaluate(() => !!window.opener)).toBe(false);
});
// Crashes with Target closed on WebKit / Linux.
it('should not treat navigations as new popups', async({page, server}) => {
it.skip(WEBKIT || FFOX)('should not treat navigations as new popups', async({page, server}) => {
await page.goto(server.EMPTY_PAGE);
await page.setContent('<a target=_blank rel=noopener href="/one-style.html">yo</a>');
const [popup] = await Promise.all([