mirror of
https://github.com/microsoft/playwright.git
synced 2024-12-15 14:11:50 +03:00
fix(webkit): make interception tests pass (#516)
This commit is contained in:
parent
057e466a65
commit
6a0dba7b56
@ -64,9 +64,19 @@ export class WKPageProxy {
|
||||
this._pageProxySession.dispatchMessage(message);
|
||||
}
|
||||
|
||||
private _isProvisionalCrossProcessLoadInProgress() : boolean {
|
||||
for (const anySession of this._sessions.values()) {
|
||||
if ((anySession as any)[provisionalMessagesSymbol])
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
handleProvisionalLoadFailed(event: Protocol.Browser.provisionalLoadFailedPayload) {
|
||||
if (!this._wkPage)
|
||||
return;
|
||||
if (!this._isProvisionalCrossProcessLoadInProgress())
|
||||
return;
|
||||
let errorText = event.error;
|
||||
if (errorText.includes('cancelled'))
|
||||
errorText += '; maybe frame was detached?';
|
||||
|
Loading…
Reference in New Issue
Block a user