fix(firefox): properly handle navigations (#27132)
In firefox, the `frameRequestedNavigation` is coming from renderer and thus can happen **after** the `Network.requestWillBeSent`, which is dispatched from the browser process. Fixes https://github.com/microsoft/playwright/issues/24132
This commit is contained in:
parent
6b36a50969
commit
94e272ba0f
|
|
@ -200,7 +200,9 @@ export class FrameManager {
|
||||||
// Do not override request with undefined.
|
// Do not override request with undefined.
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
frame.setPendingDocument({ documentId, request: undefined });
|
|
||||||
|
const request = documentId ? Array.from(frame._inflightRequests).find(request => request._documentId === documentId) : undefined;
|
||||||
|
frame.setPendingDocument({ documentId, request });
|
||||||
}
|
}
|
||||||
|
|
||||||
frameCommittedNewDocumentNavigation(frameId: string, url: string, name: string, documentId: string, initial: boolean) {
|
frameCommittedNewDocumentNavigation(frameId: string, url: string, name: string, documentId: string, initial: boolean) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue