From b6f1b179066b64b5426ffea7f353619a92d2ed28 Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Wed, 8 Jan 2020 15:32:13 -0800 Subject: [PATCH] fix(webkit): do not fire FrameNavigated when receive resource tree (#432) --- src/frames.ts | 2 +- test/evaluation.spec.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/frames.ts b/src/frames.ts index 8483166ac9..6ca12779bd 100644 --- a/src/frames.ts +++ b/src/frames.ts @@ -119,8 +119,8 @@ export class FrameManager { if (!initial) { for (const watcher of this._lifecycleWatchers) watcher._onCommittedNewDocumentNavigation(frame); + this._page.emit(Events.Page.FrameNavigated, frame); } - this._page.emit(Events.Page.FrameNavigated, frame); } frameCommittedSameDocumentNavigation(frameId: string, url: string) { diff --git a/test/evaluation.spec.js b/test/evaluation.spec.js index e06b8d1bdf..e54a191435 100644 --- a/test/evaluation.spec.js +++ b/test/evaluation.spec.js @@ -97,7 +97,7 @@ module.exports.describe = function({testRunner, expect, FFOX, CHROME, WEBKIT}) { await page.goto(server.EMPTY_PAGE); expect(await frameEvaluation).toBe(42); }); - it.skip(WEBKIT)('should work right after a cross-origin navigation', async({page, server}) => { + it('should work right after a cross-origin navigation', async({page, server}) => { await page.goto(server.EMPTY_PAGE); let frameEvaluation = null; page.on('framenavigated', async frame => {