Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

fix(webkit): do not fire FrameNavigated when receive resource tree (#432)

Yury Semikhatskyb6f1b179066b
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 => {