Skip to content

Commit 9cc54a9

Browse files
authored
chore: roll to chromium-tip-of-tree 1379, update for builds being CfT (#37883)
1 parent 6c335d6 commit 9cc54a9

File tree

3 files changed

+74
-32
lines changed

3 files changed

+74
-32
lines changed

packages/playwright-core/browsers.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@
1515
},
1616
{
1717
"name": "chromium-tip-of-tree",
18-
"revision": "1371",
18+
"revision": "1379",
1919
"installByDefault": false,
20-
"browserVersion": "142.0.7430.0"
20+
"browserVersion": "143.0.7476.0"
2121
},
2222
{
2323
"name": "chromium-tip-of-tree-headless-shell",
24-
"revision": "1371",
24+
"revision": "1379",
2525
"installByDefault": false,
26-
"browserVersion": "142.0.7430.0"
26+
"browserVersion": "143.0.7476.0"
2727
},
2828
{
2929
"name": "firefox",

packages/playwright-core/src/server/registry/index.ts

Lines changed: 56 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import { installDependenciesLinux, installDependenciesWindows, validateDependenc
2626
import { calculateSha1, getAsBooleanFromENV, getFromENV, getPackageManagerExecCommand } from '../../utils';
2727
import { wrapInASCIIBox } from '../utils/ascii';
2828
import { debugLogger } from '../utils/debugLogger';
29-
import { hostPlatform, isOfficiallySupportedPlatform } from '../utils/hostPlatform';
29+
import { shortPlatform, hostPlatform, isOfficiallySupportedPlatform } from '../utils/hostPlatform';
3030
import { fetchData, NET_DEFAULT_TIMEOUT } from '../utils/network';
3131
import { spawnAsync } from '../utils/spawnAsync';
3232
import { getEmbedderName } from '../utils/userAgent';
@@ -60,34 +60,68 @@ if (process.env.PW_TEST_CDN_THAT_SHOULD_WORK) {
6060

6161
const EXECUTABLE_PATHS = {
6262
'chromium': {
63-
'linux': ['chrome-linux', 'chrome'],
64-
'mac': ['chrome-mac', 'Chromium.app', 'Contents', 'MacOS', 'Chromium'],
65-
'win': ['chrome-win', 'chrome.exe'],
63+
'<unknown>': undefined,
64+
'linux-x64': ['chrome-linux', 'chrome'],
65+
'linux-arm64': ['chrome-linux', 'chrome'],
66+
'mac-x64': ['chrome-mac', 'Chromium.app', 'Contents', 'MacOS', 'Chromium'],
67+
'mac-arm64': ['chrome-mac', 'Chromium.app', 'Contents', 'MacOS', 'Chromium'],
68+
'win-x64': ['chrome-win', 'chrome.exe'],
6669
},
6770
'chromium-headless-shell': {
68-
'linux': ['chrome-linux', 'headless_shell'],
69-
'mac': ['chrome-mac', 'headless_shell'],
70-
'win': ['chrome-win', 'headless_shell.exe'],
71+
'<unknown>': undefined,
72+
'linux-x64': ['chrome-linux', 'headless_shell'],
73+
'linux-arm64': ['chrome-linux', 'headless_shell'],
74+
'mac-x64': ['chrome-mac', 'headless_shell'],
75+
'mac-arm64': ['chrome-mac', 'headless_shell'],
76+
'win-x64': ['chrome-win', 'headless_shell.exe'],
77+
},
78+
'chromium-tip-of-tree': {
79+
'<unknown>': undefined,
80+
'linux-x64': ['chrome-linux64', 'chrome'],
81+
'linux-arm64': ['chrome-linux', 'chrome'], // non-cft build
82+
'mac-x64': ['chrome-mac-x64', 'Google Chrome for Testing.app', 'Contents', 'MacOS', 'Google Chrome for Testing'],
83+
'mac-arm64': ['chrome-mac-arm64', 'Google Chrome for Testing.app', 'Contents', 'MacOS', 'Google Chrome for Testing'],
84+
'win-x64': ['chrome-win64', 'chrome.exe'],
85+
},
86+
'chromium-tip-of-tree-headless-shell': {
87+
'<unknown>': undefined,
88+
'linux-x64': ['chrome-headless-shell-linux64', 'chrome-headless-shell'],
89+
'linux-arm64': ['chrome-linux', 'chrome'], // non-cft build
90+
'mac-x64': ['chrome-headless-shell-mac-x64', 'chrome-headless-shell'],
91+
'mac-arm64': ['chrome-headless-shell-mac-arm64', 'chrome-headless-shell'],
92+
'win-x64': ['chrome-headless-shell-win64', 'chrome-headless-shell.exe'],
7193
},
7294
'firefox': {
73-
'linux': ['firefox', 'firefox'],
74-
'mac': ['firefox', 'Nightly.app', 'Contents', 'MacOS', 'firefox'],
75-
'win': ['firefox', 'firefox.exe'],
95+
'<unknown>': undefined,
96+
'linux-x64': ['firefox', 'firefox'],
97+
'linux-arm64': ['firefox', 'firefox'],
98+
'mac-x64': ['firefox', 'Nightly.app', 'Contents', 'MacOS', 'firefox'],
99+
'mac-arm64': ['firefox', 'Nightly.app', 'Contents', 'MacOS', 'firefox'],
100+
'win-x64': ['firefox', 'firefox.exe'],
76101
},
77102
'webkit': {
78-
'linux': ['pw_run.sh'],
79-
'mac': ['pw_run.sh'],
80-
'win': ['Playwright.exe'],
103+
'<unknown>': undefined,
104+
'linux-x64': ['pw_run.sh'],
105+
'linux-arm64': ['pw_run.sh'],
106+
'mac-x64': ['pw_run.sh'],
107+
'mac-arm64': ['pw_run.sh'],
108+
'win-x64': ['Playwright.exe'],
81109
},
82110
'ffmpeg': {
83-
'linux': ['ffmpeg-linux'],
84-
'mac': ['ffmpeg-mac'],
85-
'win': ['ffmpeg-win64.exe'],
111+
'<unknown>': undefined,
112+
'linux-x64': ['ffmpeg-linux'],
113+
'linux-arm64': ['ffmpeg-linux'],
114+
'mac-x64': ['ffmpeg-mac'],
115+
'mac-arm64': ['ffmpeg-mac'],
116+
'win-x64': ['ffmpeg-win64.exe'],
86117
},
87118
'winldd': {
88-
'linux': undefined,
89-
'mac': undefined,
90-
'win': ['PrintDeps.exe'],
119+
'<unknown>': undefined,
120+
'linux-x64': undefined,
121+
'linux-arm64': undefined,
122+
'mac-x64': undefined,
123+
'mac-arm64': undefined,
124+
'win-x64': ['PrintDeps.exe'],
91125
},
92126
};
93127

@@ -529,13 +563,7 @@ export class Registry {
529563
constructor(browsersJSON: BrowsersJSON) {
530564
const descriptors = readDescriptors(browsersJSON);
531565
const findExecutablePath = (dir: string, name: keyof typeof EXECUTABLE_PATHS) => {
532-
let tokens = undefined;
533-
if (process.platform === 'linux')
534-
tokens = EXECUTABLE_PATHS[name]['linux'];
535-
else if (process.platform === 'darwin')
536-
tokens = EXECUTABLE_PATHS[name]['mac'];
537-
else if (process.platform === 'win32')
538-
tokens = EXECUTABLE_PATHS[name]['win'];
566+
const tokens = EXECUTABLE_PATHS[name][shortPlatform];
539567
return tokens ? path.join(dir, ...tokens) : undefined;
540568
};
541569
const executablePathOrDie = (name: string, e: string | undefined, installByDefault: boolean, sdkLanguage: string) => {
@@ -604,7 +632,7 @@ export class Registry {
604632
});
605633

606634
const chromiumTipOfTreeHeadlessShell = descriptors.find(d => d.name === 'chromium-tip-of-tree-headless-shell')!;
607-
const chromiumTipOfTreeHeadlessShellExecutable = findExecutablePath(chromiumTipOfTreeHeadlessShell.dir, 'chromium-headless-shell');
635+
const chromiumTipOfTreeHeadlessShellExecutable = findExecutablePath(chromiumTipOfTreeHeadlessShell.dir, 'chromium-tip-of-tree-headless-shell');
608636
this._executables.push({
609637
type: 'channel',
610638
name: 'chromium-tip-of-tree-headless-shell',
@@ -622,7 +650,7 @@ export class Registry {
622650
});
623651

624652
const chromiumTipOfTree = descriptors.find(d => d.name === 'chromium-tip-of-tree')!;
625-
const chromiumTipOfTreeExecutable = findExecutablePath(chromiumTipOfTree.dir, 'chromium');
653+
const chromiumTipOfTreeExecutable = findExecutablePath(chromiumTipOfTree.dir, 'chromium-tip-of-tree');
626654
this._executables.push({
627655
type: 'tool',
628656
name: 'chromium-tip-of-tree',

packages/playwright-core/src/server/utils/hostPlatform.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,3 +119,17 @@ function calculatePlatform(): { hostPlatform: HostPlatform, isOfficiallySupporte
119119
}
120120

121121
export const { hostPlatform, isOfficiallySupportedPlatform } = calculatePlatform();
122+
123+
export type ShortPlatform = 'mac-x64' | 'mac-arm64' | 'linux-x64' | 'linux-arm64' | 'win-x64' | '<unknown>';
124+
125+
function toShortPlatform(hostPlatform: HostPlatform): ShortPlatform {
126+
if (hostPlatform === '<unknown>')
127+
return '<unknown>';
128+
if (hostPlatform === 'win64')
129+
return 'win-x64';
130+
if (hostPlatform.startsWith('mac'))
131+
return hostPlatform.endsWith('arm64') ? 'mac-arm64' : 'mac-x64';
132+
return hostPlatform.endsWith('arm64') ? 'linux-arm64' : 'linux-x64';
133+
}
134+
135+
export const shortPlatform = toShortPlatform(hostPlatform);

0 commit comments

Comments
 (0)