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 r1539 (#41970)
microsoft-playwright-automation[bot]acb546508378
diff --git a/browser_patches/firefox/juggler/NetworkObserver.js b/browser_patches/firefox/juggler/NetworkObserver.jsindex 85264a49df..464bfdd8ee 100644--- a/browser_patches/firefox/juggler/NetworkObserver.js+++ b/browser_patches/firefox/juggler/NetworkObserver.js@@ -301,13 +301,12 @@ class NetworkRequest {const proxy = this._networkObserver._targetRegistry.getProxyInfo(aChannel);credentials = proxy ? {username: proxy.username, password: proxy.password} : null;} else {- credentials = pageNetwork._target.browserContext().httpCredentials;+ const origin = (aChannel.URI.scheme + '://' + aChannel.URI.hostPort).toLowerCase();+ const httpCredentials = pageNetwork._target.browserContext().httpCredentials || [];+ credentials = httpCredentials.find(c => !c.origin || c.origin.toLowerCase() === origin) || null;}if (!credentials)return false;- const origin = aChannel.URI.scheme + '://' + aChannel.URI.hostPort;- if (credentials.origin && origin.toLowerCase() !== credentials.origin.toLowerCase())- return false;authInfo.username = credentials.username;authInfo.password = credentials.password;// This will produce a new request with respective auth header set.diff --git a/browser_patches/firefox/juggler/protocol/Protocol.js b/browser_patches/firefox/juggler/protocol/Protocol.jsindex db4f203fba..f6a3f89f81 100644--- a/browser_patches/firefox/juggler/protocol/Protocol.js+++ b/browser_patches/firefox/juggler/protocol/Protocol.js@@ -273,7 +273,7 @@ const Browser = {'setHTTPCredentials': {params: {browserContextId: t.Optional(t.String),- credentials: t.Nullable(networkTypes.HTTPCredentials),+ credentials: t.Nullable(t.Array(networkTypes.HTTPCredentials)),},},'setRequestInterception': {diff --git a/packages/playwright-core/browsers.json b/packages/playwright-core/browsers.jsonindex 25e42eae2b..ccd46d1955 100644--- a/packages/playwright-core/browsers.json+++ b/packages/playwright-core/browsers.json@@ -31,7 +31,7 @@},{"name": "firefox",- "revision": "1538",+ "revision": "1539","installByDefault": true,"browserVersion": "153.0","title": "Firefox"diff --git a/packages/playwright-core/src/server/firefox/ffBrowser.ts b/packages/playwright-core/src/server/firefox/ffBrowser.tsindex fa1e1b6576..c02dad2086 100644--- a/packages/playwright-core/src/server/firefox/ffBrowser.ts+++ b/packages/playwright-core/src/server/firefox/ffBrowser.ts@@ -322,7 +322,7 @@ export class FFBrowserContext extends BrowserContext {let credentials = null;if (httpCredentials) {const { username, password, origin } = httpCredentials;- credentials = { username, password, origin };+ credentials = [{ username, password, origin }];}await this._browser.session.send('Browser.setHTTPCredentials', { browserContextId: this._browserContextId, credentials });}diff --git a/packages/playwright-core/src/server/firefox/protocol.d.ts b/packages/playwright-core/src/server/firefox/protocol.d.tsindex e55a72ce40..18da296d70 100644--- a/packages/playwright-core/src/server/firefox/protocol.d.ts+++ b/packages/playwright-core/src/server/firefox/protocol.d.ts@@ -136,7 +136,7 @@ export namespace Protocol {username: string;password: string;origin?: string;- }|null;+ }[]|null;};export type setHTTPCredentialsReturnValue = void;export type setRequestInterceptionParameters = {