Skip to content

Commit b8a0fc3

Browse files
authored
cherry-pick(#41309, #43149): Revert "fix(firefox): treat navigationCommitted events without navigationId as same-document URL updates (#41224)" (#41350)
1 parent b5a3175 commit b8a0fc3

2 files changed

Lines changed: 5 additions & 9 deletions

File tree

‎packages/playwright-core/src/server/firefox/ffPage.ts‎

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -239,18 +239,11 @@ export class FFPage implements PageDelegate {
239239
}
240240

241241
_onNavigationCommitted(params: Protocol.Page.navigationCommittedPayload) {
242-
if (!params.navigationId) {
243-
// Firefox replays the current navigation without a navigationId during a process swap (e.g. when restoring a persistent profile).
244-
// Treat these as same-document URL updates so they don't interrupt any in-flight new-document navigation in Frame.gotoImpl.
245-
this._page.frameManager.frameCommittedSameDocumentNavigation(params.frameId, params.url);
246-
return;
247-
}
248-
249242
for (const [workerId, worker] of this._workers) {
250243
if (worker.frameId === params.frameId)
251244
this._onWorkerDestroyed({ workerId });
252245
}
253-
this._page.frameManager.frameCommittedNewDocumentNavigation(params.frameId, params.url, params.name || '', params.navigationId, false);
246+
this._page.frameManager.frameCommittedNewDocumentNavigation(params.frameId, params.url, params.name || '', params.navigationId || '', false);
254247
}
255248

256249
_onSameDocumentNavigation(params: Protocol.Page.sameDocumentNavigationPayload) {

‎tests/library/defaultbrowsercontext-2.spec.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,10 @@ it('should create userDataDir if it does not exist', async ({ createUserDataDir,
144144

145145
it('should goto about:blank on relaunched persistent context', {
146146
annotation: { type: 'issue', description: 'https://github.com/microsoft/playwright/issues/41216' },
147-
}, async ({ browserType, createUserDataDir }) => {
147+
}, async ({ browserType, createUserDataDir, browserName }) => {
148+
it.fixme(browserName === 'firefox');
149+
it.slow();
150+
148151
const userDataDir = await createUserDataDir();
149152

150153
const context1 = await browserType.launchPersistentContext(userDataDir);

0 commit comments

Comments
 (0)