mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00: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);
|
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) {
|
handleProvisionalLoadFailed(event: Protocol.Browser.provisionalLoadFailedPayload) {
|
||||||
if (!this._wkPage)
|
if (!this._wkPage)
|
||||||
return;
|
return;
|
||||||
|
if (!this._isProvisionalCrossProcessLoadInProgress())
|
||||||
|
return;
|
||||||
let errorText = event.error;
|
let errorText = event.error;
|
||||||
if (errorText.includes('cancelled'))
|
if (errorText.includes('cancelled'))
|
||||||
errorText += '; maybe frame was detached?';
|
errorText += '; maybe frame was detached?';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user