Skip to content

Commit 03ca297

Browse files
authored
fix(webkit): make click work with cross-process _blank target (#2083)
1 parent f2fcb2b commit 03ca297

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/webkit/wkPage.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,8 +257,8 @@ export class WKPage implements PageDelegate {
257257
});
258258
assert(targetInfo.type === 'page', 'Only page targets are expected in WebKit, received: ' + targetInfo.type);
259259

260-
if (!this._initializedPage) {
261-
assert(!targetInfo.isProvisional);
260+
if (!targetInfo.isProvisional) {
261+
assert(!this._initializedPage);
262262
let pageOrError: Page | Error;
263263
try {
264264
this._setSession(session);

test/navigation.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -994,7 +994,7 @@ describe('Click navigation', function() {
994994
await page.goto(server.EMPTY_PAGE);
995995
await page.click('"Click me"');
996996
});
997-
it.fail(WEBKIT)('should work with cross-process _blank target', async({page, server}) => {
997+
it('should work with cross-process _blank target', async({page, server}) => {
998998
server.setRoute('/empty.html', (req, res) => {
999999
res.end(`<a href="${server.CROSS_PROCESS_PREFIX}/empty.html" target="_blank">Click me</a>`);
10001000
});

0 commit comments

Comments
 (0)