Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(webkit): make click work with cross-process _blank target #2083

Merged
merged 1 commit into from
May 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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