Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
TypeScript automationchromechromiume2e-testingelectronend-to-end-testingfirefoxjavascriptplaywrighttesttest-automationtestingtesting-toolswebwebkit
feat(firefox): roll to r1548 (#42747)
microsoft-playwright-automation[bot]ad86e96fa75e
diff --git a/browser_patches/firefox/juggler/NetworkObserver.js b/browser_patches/firefox/juggler/NetworkObserver.jsindex b472f65a83..bc4428b996 100644--- a/browser_patches/firefox/juggler/NetworkObserver.js+++ b/browser_patches/firefox/juggler/NetworkObserver.js@@ -185,6 +185,8 @@ class NetworkRequest {if (this.redirectedFromId) {// Redirects are not interceptable.this._sendOnRequest(false);+ // Everything we need from the previous request has been inherited above.+ redirectedFrom._releaseReferences();}}@@ -447,6 +449,16 @@ class NetworkRequest {}delete this._responseBodyChunks;+ this._releaseReferences();+ }++ // Firefox may keep this object alive long after the request has finished+ // through callbacks or delegates, and we don't want to retain the page/window/context.+ _releaseReferences() {+ this.httpChannel = undefined;+ this._originalListener = undefined;+ this._pageNetwork = undefined;+ this._interceptedChannel = undefined;}_shouldIntercept() {diff --git a/browser_patches/firefox/juggler/content/Runtime.js b/browser_patches/firefox/juggler/content/Runtime.jsindex ec5c9487a7..7793bb9bb9 100644--- a/browser_patches/firefox/juggler/content/Runtime.js+++ b/browser_patches/firefox/juggler/content/Runtime.js@@ -553,18 +553,17 @@ class ExecutionContext {getObjectProperties(objectId) {if (!this._remoteObjects.has(objectId))- throw new Error('Cannot find object with id = ' + arg.objectId);+ throw new Error('Cannot find object with id = ' + objectId);const result = [];- for (let obj = this._remoteObjects.get(objectId); obj; obj = obj.proto) {- for (const propertyName of obj.getOwnPropertyNames()) {- const descriptor = obj.getOwnPropertyDescriptor(propertyName);- if (!descriptor.enumerable)- continue;- result.push({- name: propertyName,- value: this._createRemoteObject(descriptor.value),- });- }+ const obj = this._remoteObjects.get(objectId);+ for (const propertyName of obj.getOwnPropertyNames()) {+ const descriptor = obj.getOwnPropertyDescriptor(propertyName);+ if (!descriptor.enumerable)+ continue;+ result.push({+ name: propertyName,+ value: this._createRemoteObject(descriptor.value),+ });}return result;}diff --git a/packages/playwright-core/browsers.json b/packages/playwright-core/browsers.jsonindex af9e96047b..d8df150a1c 100644--- a/packages/playwright-core/browsers.json+++ b/packages/playwright-core/browsers.json@@ -17,7 +17,7 @@},{"name": "firefox",- "revision": "1546",+ "revision": "1548","installByDefault": true,"browserVersion": "155.0","title": "Firefox"