Skip to content

Commit

Permalink
feat(roll): roll Firefox to r1450 (#30865)
Browse files Browse the repository at this point in the history
  • Loading branch information
mxschmitt committed May 19, 2024
1 parent 9188ff7 commit 162c18f
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 45 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# 🎭 Playwright

[![npm version](https://img.shields.io/npm/v/playwright.svg)](https://www.npmjs.com/package/playwright) <!-- GEN:chromium-version-badge -->[![Chromium version](https://img.shields.io/badge/chromium-126.0.6478.8-blue.svg?logo=google-chrome)](https://www.chromium.org/Home)<!-- GEN:stop --> <!-- GEN:firefox-version-badge -->[![Firefox version](https://img.shields.io/badge/firefox-125.0.1-blue.svg?logo=firefoxbrowser)](https://www.mozilla.org/en-US/firefox/new/)<!-- GEN:stop --> <!-- GEN:webkit-version-badge -->[![WebKit version](https://img.shields.io/badge/webkit-17.4-blue.svg?logo=safari)](https://webkit.org/)<!-- GEN:stop -->
[![npm version](https://img.shields.io/npm/v/playwright.svg)](https://www.npmjs.com/package/playwright) <!-- GEN:chromium-version-badge -->[![Chromium version](https://img.shields.io/badge/chromium-126.0.6478.8-blue.svg?logo=google-chrome)](https://www.chromium.org/Home)<!-- GEN:stop --> <!-- GEN:firefox-version-badge -->[![Firefox version](https://img.shields.io/badge/firefox-126.0-blue.svg?logo=firefoxbrowser)](https://www.mozilla.org/en-US/firefox/new/)<!-- GEN:stop --> <!-- GEN:webkit-version-badge -->[![WebKit version](https://img.shields.io/badge/webkit-17.4-blue.svg?logo=safari)](https://webkit.org/)<!-- GEN:stop -->

## [Documentation](https://playwright.dev) | [API reference](https://playwright.dev/docs/api/class-playwright)

Expand All @@ -10,7 +10,7 @@ Playwright is a framework for Web Testing and Automation. It allows testing [Chr
| :--- | :---: | :---: | :---: |
| Chromium <!-- GEN:chromium-version -->126.0.6478.8<!-- GEN:stop --> | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| WebKit <!-- GEN:webkit-version -->17.4<!-- GEN:stop --> | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| Firefox <!-- GEN:firefox-version -->125.0.1<!-- GEN:stop --> | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| Firefox <!-- GEN:firefox-version -->126.0<!-- GEN:stop --> | :white_check_mark: | :white_check_mark: | :white_check_mark: |

Headless execution is supported for all browsers on all platforms. Check out [system requirements](https://playwright.dev/docs/intro#system-requirements) for details.

Expand Down
8 changes: 4 additions & 4 deletions packages/playwright-core/browsers.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@
},
{
"name": "firefox",
"revision": "1449",
"revision": "1450",
"installByDefault": true,
"browserVersion": "125.0.1"
"browserVersion": "126.0"
},
{
"name": "firefox-beta",
"revision": "1449",
"revision": "1450",
"installByDefault": false,
"browserVersion": "126.0b1"
"browserVersion": "127.0b3"
},
{
"name": "webkit",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1472,7 +1472,7 @@
"defaultBrowserType": "chromium"
},
"Desktop Firefox HiDPI": {
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:125.0.1) Gecko/20100101 Firefox/125.0.1",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:126.0) Gecko/20100101 Firefox/126.0",
"screen": {
"width": 1792,
"height": 1120
Expand Down Expand Up @@ -1532,7 +1532,7 @@
"defaultBrowserType": "chromium"
},
"Desktop Firefox": {
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:125.0.1) Gecko/20100101 Firefox/125.0.1",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:126.0) Gecko/20100101 Firefox/126.0",
"screen": {
"width": 1920,
"height": 1080
Expand Down
44 changes: 22 additions & 22 deletions packages/playwright-core/src/server/registry/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,17 +137,17 @@ const DOWNLOAD_PATHS: Record<BrowserName | InternalTool, DownloadPaths> = {
'debian11-arm64': 'builds/firefox/%s/firefox-debian-11-arm64.zip',
'debian12-x64': 'builds/firefox/%s/firefox-debian-12.zip',
'debian12-arm64': 'builds/firefox/%s/firefox-debian-12-arm64.zip',
'mac10.13': 'builds/firefox/%s/firefox-mac-13.zip',
'mac10.14': 'builds/firefox/%s/firefox-mac-13.zip',
'mac10.15': 'builds/firefox/%s/firefox-mac-13.zip',
'mac11': 'builds/firefox/%s/firefox-mac-13.zip',
'mac11-arm64': 'builds/firefox/%s/firefox-mac-13-arm64.zip',
'mac12': 'builds/firefox/%s/firefox-mac-13.zip',
'mac12-arm64': 'builds/firefox/%s/firefox-mac-13-arm64.zip',
'mac13': 'builds/firefox/%s/firefox-mac-13.zip',
'mac13-arm64': 'builds/firefox/%s/firefox-mac-13-arm64.zip',
'mac14': 'builds/firefox/%s/firefox-mac-13.zip',
'mac14-arm64': 'builds/firefox/%s/firefox-mac-13-arm64.zip',
'mac10.13': 'builds/firefox/%s/firefox-mac.zip',
'mac10.14': 'builds/firefox/%s/firefox-mac.zip',
'mac10.15': 'builds/firefox/%s/firefox-mac.zip',
'mac11': 'builds/firefox/%s/firefox-mac.zip',
'mac11-arm64': 'builds/firefox/%s/firefox-mac-arm64.zip',
'mac12': 'builds/firefox/%s/firefox-mac.zip',
'mac12-arm64': 'builds/firefox/%s/firefox-mac-arm64.zip',
'mac13': 'builds/firefox/%s/firefox-mac.zip',
'mac13-arm64': 'builds/firefox/%s/firefox-mac-arm64.zip',
'mac14': 'builds/firefox/%s/firefox-mac.zip',
'mac14-arm64': 'builds/firefox/%s/firefox-mac-arm64.zip',
'win64': 'builds/firefox/%s/firefox-win64.zip',
},
'firefox-beta': {
Expand All @@ -162,17 +162,17 @@ const DOWNLOAD_PATHS: Record<BrowserName | InternalTool, DownloadPaths> = {
'debian11-arm64': 'builds/firefox-beta/%s/firefox-beta-debian-11-arm64.zip',
'debian12-x64': 'builds/firefox-beta/%s/firefox-beta-debian-12.zip',
'debian12-arm64': 'builds/firefox-beta/%s/firefox-beta-debian-12-arm64.zip',
'mac10.13': 'builds/firefox-beta/%s/firefox-beta-mac-13.zip',
'mac10.14': 'builds/firefox-beta/%s/firefox-beta-mac-13.zip',
'mac10.15': 'builds/firefox-beta/%s/firefox-beta-mac-13.zip',
'mac11': 'builds/firefox-beta/%s/firefox-beta-mac-13.zip',
'mac11-arm64': 'builds/firefox-beta/%s/firefox-beta-mac-13-arm64.zip',
'mac12': 'builds/firefox-beta/%s/firefox-beta-mac-13.zip',
'mac12-arm64': 'builds/firefox-beta/%s/firefox-beta-mac-13-arm64.zip',
'mac13': 'builds/firefox-beta/%s/firefox-beta-mac-13.zip',
'mac13-arm64': 'builds/firefox-beta/%s/firefox-beta-mac-13-arm64.zip',
'mac14': 'builds/firefox-beta/%s/firefox-beta-mac-13.zip',
'mac14-arm64': 'builds/firefox-beta/%s/firefox-beta-mac-13-arm64.zip',
'mac10.13': 'builds/firefox-beta/%s/firefox-beta-mac.zip',
'mac10.14': 'builds/firefox-beta/%s/firefox-beta-mac.zip',
'mac10.15': 'builds/firefox-beta/%s/firefox-beta-mac.zip',
'mac11': 'builds/firefox-beta/%s/firefox-beta-mac.zip',
'mac11-arm64': 'builds/firefox-beta/%s/firefox-beta-mac-arm64.zip',
'mac12': 'builds/firefox-beta/%s/firefox-beta-mac.zip',
'mac12-arm64': 'builds/firefox-beta/%s/firefox-beta-mac-arm64.zip',
'mac13': 'builds/firefox-beta/%s/firefox-beta-mac.zip',
'mac13-arm64': 'builds/firefox-beta/%s/firefox-beta-mac-arm64.zip',
'mac14': 'builds/firefox-beta/%s/firefox-beta-mac.zip',
'mac14-arm64': 'builds/firefox-beta/%s/firefox-beta-mac-arm64.zip',
'win64': 'builds/firefox-beta/%s/firefox-beta-win64.zip',
},
'webkit': {
Expand Down
23 changes: 10 additions & 13 deletions tests/page/page-network-request.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,9 @@ import { test as it, expect } from './pageTest';
import { attachFrame } from '../config/utils';
import fs from 'fs';

function adjustServerHeaders(headers: Object, browserName: string, channel: string) {
if (browserName === 'firefox' && channel === 'firefox-beta') {
// This is a new experimental feature, only enabled in Firefox Beta for now.
function adjustServerHeaders(headers: Object, browserName: string) {
if (browserName === 'firefox')
delete headers['priority'];
}
return headers;
}

Expand Down Expand Up @@ -90,7 +88,7 @@ it('should return headers', async ({ page, server, browserName }) => {
expect(response.request().headers()['user-agent']).toContain('WebKit');
});

it('should get the same headers as the server', async ({ page, server, browserName, platform, isElectron, browserMajorVersion, channel }) => {
it('should get the same headers as the server', async ({ page, server, browserName, platform, isElectron, browserMajorVersion }) => {
it.skip(isElectron && browserMajorVersion < 99, 'This needs Chromium >= 99');
it.fail(browserName === 'webkit' && platform === 'win32', 'Curl does not show accept-encoding and accept-language');
let serverRequest;
Expand All @@ -100,10 +98,10 @@ it('should get the same headers as the server', async ({ page, server, browserNa
});
const response = await page.goto(server.PREFIX + '/empty.html');
const headers = await response.request().allHeaders();
expect(headers).toEqual(adjustServerHeaders(serverRequest.headers, browserName, channel));
expect(headers).toEqual(adjustServerHeaders(serverRequest.headers, browserName));
});

it('should not return allHeaders() until they are available', async ({ page, server, browserName, platform, isElectron, browserMajorVersion, channel }) => {
it('should not return allHeaders() until they are available', async ({ page, server, browserName, platform, isElectron, browserMajorVersion }) => {
it.skip(isElectron && browserMajorVersion < 99, 'This needs Chromium >= 99');
it.fail(browserName === 'webkit' && platform === 'win32', 'Curl does not show accept-encoding and accept-language');

Expand All @@ -122,13 +120,13 @@ it('should not return allHeaders() until they are available', async ({ page, ser

await page.goto(server.PREFIX + '/empty.html');
const requestHeaders = await requestHeadersPromise;
expect(requestHeaders).toEqual(adjustServerHeaders(serverRequest.headers, browserName, channel));
expect(requestHeaders).toEqual(adjustServerHeaders(serverRequest.headers, browserName));

const responseHeaders = await responseHeadersPromise;
expect(responseHeaders['foo']).toBe('bar');
});

it('should get the same headers as the server CORS', async ({ page, server, browserName, platform, isElectron, browserMajorVersion, channel }) => {
it('should get the same headers as the server CORS', async ({ page, server, browserName, platform, isElectron, browserMajorVersion, }) => {
it.skip(isElectron && browserMajorVersion < 99, 'This needs Chromium >= 99');
it.fail(browserName === 'webkit' && platform === 'win32', 'Curl does not show accept-encoding and accept-language');

Expand All @@ -147,7 +145,7 @@ it('should get the same headers as the server CORS', async ({ page, server, brow
expect(text).toBe('done');
const response = await responsePromise;
const headers = await response.request().allHeaders();
expect(headers).toEqual(adjustServerHeaders(serverRequest.headers, browserName, channel));
expect(headers).toEqual(adjustServerHeaders(serverRequest.headers, browserName));
});

it('should not get preflight CORS requests when intercepting', async ({ page, server, browserName, isAndroid }) => {
Expand Down Expand Up @@ -408,10 +406,9 @@ it('should report raw headers', async ({ page, server, browserName, platform, is
return { name, value: values[0] };
});
}
if (browserName === 'firefox' && channel === 'firefox-beta') {
// This is a new experimental feature, only enabled in Firefox Beta for now.
if (browserName === 'firefox')
expectedHeaders = expectedHeaders.filter(({ name }) => name.toLowerCase() !== 'priority');
}

res.end();
});
await page.goto(server.EMPTY_PAGE);
Expand Down
2 changes: 0 additions & 2 deletions utils/roll_browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,6 @@ Example:
'wk': 'webkit',
}[args[0].toLowerCase()] ?? args[0].toLowerCase();
const descriptors = [browsersJSON.browsers.find(b => b.name === browserName)];
if (browserName === 'firefox')
descriptors.push(browsersJSON.browsers.find(b => b.name === 'firefox-asan'));

if (!descriptors.every(d => !!d)) {
console.log(`Unknown browser "${browserName}"`);
Expand Down

0 comments on commit 162c18f

Please sign in to comment.