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(webkit): roll to r2341 (#42061)
microsoft-playwright-automation[bot]30d5b2ecc6d9
diff --git a/packages/playwright-core/browsers.json b/packages/playwright-core/browsers.jsonindex 72d9910640..9e0d425343 100644--- a/packages/playwright-core/browsers.json+++ b/packages/playwright-core/browsers.json@@ -24,7 +24,7 @@},{"name": "webkit",- "revision": "2340",+ "revision": "2341","installByDefault": true,"revisionOverrides": {"mac14": "2251",diff --git a/packages/playwright-core/src/server/webkit/protocol.d.ts b/packages/playwright-core/src/server/webkit/protocol.d.tsindex 922ef8a9c6..f7ccf4086b 100644--- a/packages/playwright-core/src/server/webkit/protocol.d.ts+++ b/packages/playwright-core/src/server/webkit/protocol.d.ts@@ -3571,6 +3571,7 @@ might return multiple quads for inline nodes.* Unique script identifier.*/export type ScriptId = string;+ export type ScriptType = "program"|"module"|"webassembly";/*** Call frame identifier.*/@@ -3588,7 +3589,7 @@ might return multiple quads for inline nodes.*/lineNumber: number;/**- * Column number in the script (0-based).+ * Column number in the script (0-based) or bytecode offset for WebAssembly modules (0-based).*/columnNumber?: number;}@@ -3791,9 +3792,17 @@ might return multiple quads for inline nodes.*/endLine: number;/**- * Length of the last line of the script.+ * Length of the last line of the script or the end bytecode offset for WebAssembly modules.*/endColumn: number;+ /**+ * Identifier of the execution context in which this script was parsed.+ */+ executionContextId: Runtime.ExecutionContextId;+ /**+ * Type of script.+ */+ scriptType: ScriptType;/*** Determines whether this script is a user extension script.*/@@ -3807,9 +3816,13 @@ might return multiple quads for inline nodes.*/sourceMapURL?: string;/**- * True if this script was parsed as a module.+ * Human-readable name of the script.*/- module?: boolean;+ displayName?: string;+ /**+ * Identifier of the network request associated with this script (if any).+ */+ requestId?: Network.RequestId;}/*** Fired when virtual machine fails to parse the script.diff --git a/tests/library/client-certificates.spec.ts b/tests/library/client-certificates.spec.tsindex a468dd48bb..0684a504d3 100644--- a/tests/library/client-certificates.spec.ts+++ b/tests/library/client-certificates.spec.ts@@ -344,7 +344,7 @@ test.describe('browser', () => {test('should not intercept TLS for origins without a client certificate', {annotation: { type: 'issue', description: 'https://github.com/microsoft/playwright/issues/41106' },- }, async ({ browser, asset, httpsServer, browserName, platform, channel }) => {+ }, async ({ browser, asset, httpsServer }) => {// If the proxy intercepted this origin, the browser would see its self-signed cert (CN=localhost)// instead of the real server cert (CN=playwright-test).const page = await browser.newPage({@@ -356,14 +356,8 @@ test.describe('browser', () => {});const response = await page.goto(httpsServer.EMPTY_PAGE);expect(response.ok()).toBe(true);- const subjectName = (await response.securityDetails()).subjectName;- if (browserName === 'webkit' && platform === 'win32' && channel !== 'webkit-wsl') {- // Don't ask me why this is "true" on Windows WebKit.- expect(subjectName).toContain('true');- } else {- // This is "CN=playwright-test" in some ubuntu webkits, and "playwright-test" in other browsers.- expect(subjectName).toContain('playwright-test');- }+ const securityDetails = await response.securityDetails();+ expect(securityDetails.subjectName).toContain('playwright-test');await page.close();});diff --git a/tests/library/har.spec.ts b/tests/library/har.spec.tsindex 984091ed7b..143a3186b1 100644--- a/tests/library/har.spec.ts+++ b/tests/library/har.spec.ts@@ -697,18 +697,16 @@ it('should return server address directly from response', async ({ page, server,expect(port).toBe(server.PORT);});-it('should return security details directly from response', async ({ contextFactory, httpsServer, browserName, platform, channel, isFrozenWebkit }) => {+it('should return security details directly from response', async ({ contextFactory, httpsServer, browserName, platform, isFrozenWebkit }) => {it.skip(isFrozenWebkit);const context = await contextFactory({ ignoreHTTPSErrors: true });const page = await context.newPage();const response = await page.goto(httpsServer.EMPTY_PAGE);const securityDetails = await response!.securityDetails();- if (channel === 'webkit-wsl')- // The Linux WebKit build reports the real subject name, but (like the Windows port) does not surface the TLS protocol.+ if (browserName === 'webkit' && platform === 'win32')+ // WebKit on Windows does not surface the TLS protocol.expect({ ...securityDetails, protocol: undefined }).toEqual({ subjectName: 'playwright-test', validFrom: 1691708270, validTo: 2007068270 });- else if (browserName === 'webkit' && platform === 'win32')- expect({ ...securityDetails, protocol: undefined }).toEqual({ subjectName: 'true', validFrom: 1691708270, validTo: 2007068270 });else if (browserName === 'webkit')expect(securityDetails).toEqual({ protocol: 'TLS 1.3', subjectName: 'playwright-test', validFrom: 1691708270, validTo: 2007068270 });else