Skip to content

Commit

Permalink
fix(webkit): make click work with cross-process _blank target (#2083)
Browse files Browse the repository at this point in the history
  • Loading branch information
yury-s authored May 2, 2020
1 parent f2fcb2b commit 03ca297
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/webkit/wkPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,8 @@ export class WKPage implements PageDelegate {
});
assert(targetInfo.type === 'page', 'Only page targets are expected in WebKit, received: ' + targetInfo.type);

if (!this._initializedPage) {
assert(!targetInfo.isProvisional);
if (!targetInfo.isProvisional) {
assert(!this._initializedPage);
let pageOrError: Page | Error;
try {
this._setSession(session);
Expand Down
2 changes: 1 addition & 1 deletion test/navigation.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -994,7 +994,7 @@ describe('Click navigation', function() {
await page.goto(server.EMPTY_PAGE);
await page.click('"Click me"');
});
it.fail(WEBKIT)('should work with cross-process _blank target', async({page, server}) => {
it('should work with cross-process _blank target', async({page, server}) => {
server.setRoute('/empty.html', (req, res) => {
res.end(`<a href="${server.CROSS_PROCESS_PREFIX}/empty.html" target="_blank">Click me</a>`);
});
Expand Down

0 comments on commit 03ca297

Please sign in to comment.