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

This commit is contained in:
Yury Semikhatsky 2020-05-02 10:57:33 -07:00 committed by GitHub
parent f2fcb2b017
commit 03ca297890
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -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);

View File

@ -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>`);
});