test: fix the popup test on WebKit / GTK (#384)

This commit is contained in:
Pavel Feldman 2020-01-06 13:31:37 -08:00 committed by GitHub
parent 491eeeef7e
commit a3e3ff73bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -173,11 +173,11 @@ module.exports.describe = function({testRunner, expect, headless, playwright, FF
expect(await popup.evaluate(() => !!window.opener)).toBe(false);
});
// Crashes with Target closed on WebKit / Linux.
it.skip(WEBKIT || FFOX)('should not treat navigations as new popups', async({page, server}) => {
it('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([
new Promise(x => page.once('popup', x)),
page.waitForEvent('popup').then(popup => { popup.waitForLoadState(); return popup; }),
page.click('a'),
]);
let badSecondPopup = false;