Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

chore: align chromium-tot download and launch with chromium (#38798)

Dmitry Gozman2140debac0e6
diff --git a/packages/playwright-core/src/server/chromium/chromium.ts b/packages/playwright-core/src/server/chromium/chromium.ts
index 723d3c1777..cd442d3fdd 100644
--- a/packages/playwright-core/src/server/chromium/chromium.ts
+++ b/packages/playwright-core/src/server/chromium/chromium.ts
@@ -363,6 +363,8 @@ export class Chromium extends BrowserType {
override getExecutableName(options: types.LaunchOptions): string {
if (options.channel && registry.isChromiumAlias(options.channel))
return 'chromium';
+ if (options.channel === 'chromium-tip-of-tree')
+ return options.headless ? 'chromium-tip-of-tree-headless-shell' : 'chromium-tip-of-tree';
if (options.channel)
return options.channel;
return options.headless ? 'chromium-headless-shell' : 'chromium';
diff --git a/packages/playwright-core/src/server/registry/index.ts b/packages/playwright-core/src/server/registry/index.ts
index a50a645fb2..0024a9eede 100644
--- a/packages/playwright-core/src/server/registry/index.ts
+++ b/packages/playwright-core/src/server/registry/index.ts
@@ -205,64 +205,64 @@ const DOWNLOAD_PATHS: Record<string, DownloadPaths> = {
'chromium-tip-of-tree': {
'<unknown>': undefined,
'ubuntu18.04-x64': undefined,
- 'ubuntu20.04-x64': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-linux.zip',
- 'ubuntu22.04-x64': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-linux.zip',
- 'ubuntu24.04-x64': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-linux.zip',
+ 'ubuntu20.04-x64': cftUrl('linux64/chrome-linux64.zip'),
+ 'ubuntu22.04-x64': cftUrl('linux64/chrome-linux64.zip'),
+ 'ubuntu24.04-x64': cftUrl('linux64/chrome-linux64.zip'),
'ubuntu18.04-arm64': undefined,
'ubuntu20.04-arm64': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-linux-arm64.zip',
'ubuntu22.04-arm64': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-linux-arm64.zip',
'ubuntu24.04-arm64': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-linux-arm64.zip',
- 'debian11-x64': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-linux.zip',
+ 'debian11-x64': cftUrl('linux64/chrome-linux64.zip'),
'debian11-arm64': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-linux-arm64.zip',
- 'debian12-x64': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-linux.zip',
+ 'debian12-x64': cftUrl('linux64/chrome-linux64.zip'),
'debian12-arm64': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-linux-arm64.zip',
- 'debian13-x64': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-linux.zip',
+ 'debian13-x64': cftUrl('linux64/chrome-linux64.zip'),
'debian13-arm64': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-linux-arm64.zip',
- 'mac10.13': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-mac.zip',
- 'mac10.14': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-mac.zip',
- 'mac10.15': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-mac.zip',
- 'mac11': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-mac.zip',
- 'mac11-arm64': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-mac-arm64.zip',
- 'mac12': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-mac.zip',
- 'mac12-arm64': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-mac-arm64.zip',
- 'mac13': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-mac.zip',
- 'mac13-arm64': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-mac-arm64.zip',
- 'mac14': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-mac.zip',
- 'mac14-arm64': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-mac-arm64.zip',
- 'mac15': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-mac.zip',
- 'mac15-arm64': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-mac-arm64.zip',
- 'win64': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-win64.zip',
+ 'mac10.13': cftUrl('mac-x64/chrome-mac-x64.zip'),
+ 'mac10.14': cftUrl('mac-x64/chrome-mac-x64.zip'),
+ 'mac10.15': cftUrl('mac-x64/chrome-mac-x64.zip'),
+ 'mac11': cftUrl('mac-x64/chrome-mac-x64.zip'),
+ 'mac11-arm64': cftUrl('mac-arm64/chrome-mac-arm64.zip'),
+ 'mac12': cftUrl('mac-x64/chrome-mac-x64.zip'),
+ 'mac12-arm64': cftUrl('mac-arm64/chrome-mac-arm64.zip'),
+ 'mac13': cftUrl('mac-x64/chrome-mac-x64.zip'),
+ 'mac13-arm64': cftUrl('mac-arm64/chrome-mac-arm64.zip'),
+ 'mac14': cftUrl('mac-x64/chrome-mac-x64.zip'),
+ 'mac14-arm64': cftUrl('mac-arm64/chrome-mac-arm64.zip'),
+ 'mac15': cftUrl('mac-x64/chrome-mac-x64.zip'),
+ 'mac15-arm64': cftUrl('mac-arm64/chrome-mac-arm64.zip'),
+ 'win64': cftUrl('win64/chrome-win64.zip'),
},
'chromium-tip-of-tree-headless-shell': {
'<unknown>': undefined,
'ubuntu18.04-x64': undefined,
- 'ubuntu20.04-x64': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-headless-shell-linux.zip',
- 'ubuntu22.04-x64': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-headless-shell-linux.zip',
- 'ubuntu24.04-x64': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-headless-shell-linux.zip',
+ 'ubuntu20.04-x64': cftUrl('linux64/chrome-headless-shell-linux64.zip'),
+ 'ubuntu22.04-x64': cftUrl('linux64/chrome-headless-shell-linux64.zip'),
+ 'ubuntu24.04-x64': cftUrl('linux64/chrome-headless-shell-linux64.zip'),
'ubuntu18.04-arm64': undefined,
'ubuntu20.04-arm64': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-headless-shell-linux-arm64.zip',
'ubuntu22.04-arm64': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-headless-shell-linux-arm64.zip',
'ubuntu24.04-arm64': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-headless-shell-linux-arm64.zip',
- 'debian11-x64': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-headless-shell-linux.zip',
+ 'debian11-x64': cftUrl('linux64/chrome-headless-shell-linux64.zip'),
'debian11-arm64': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-headless-shell-linux-arm64.zip',
- 'debian12-x64': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-headless-shell-linux.zip',
+ 'debian12-x64': cftUrl('linux64/chrome-headless-shell-linux64.zip'),
'debian12-arm64': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-headless-shell-linux-arm64.zip',
- 'debian13-x64': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-headless-shell-linux.zip',
+ 'debian13-x64': cftUrl('linux64/chrome-headless-shell-linux64.zip'),
'debian13-arm64': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-headless-shell-linux-arm64.zip',
'mac10.13': undefined,
'mac10.14': undefined,
'mac10.15': undefined,
- 'mac11': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-headless-shell-mac.zip',
- 'mac11-arm64': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-headless-shell-mac-arm64.zip',
- 'mac12': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-headless-shell-mac.zip',
- 'mac12-arm64': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-headless-shell-mac-arm64.zip',
- 'mac13': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-headless-shell-mac.zip',
- 'mac13-arm64': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-headless-shell-mac-arm64.zip',
- 'mac14': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-headless-shell-mac.zip',
- 'mac14-arm64': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-headless-shell-mac-arm64.zip',
- 'mac15': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-headless-shell-mac.zip',
- 'mac15-arm64': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-headless-shell-mac-arm64.zip',
- 'win64': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-headless-shell-win64.zip',
+ 'mac11': cftUrl('mac-x64/chrome-headless-shell-mac-x64.zip'),
+ 'mac11-arm64': cftUrl('mac-arm64/chrome-headless-shell-mac-arm64.zip'),
+ 'mac12': cftUrl('mac-x64/chrome-headless-shell-mac-x64.zip'),
+ 'mac12-arm64': cftUrl('mac-arm64/chrome-headless-shell-mac-arm64.zip'),
+ 'mac13': cftUrl('mac-x64/chrome-headless-shell-mac-x64.zip'),
+ 'mac13-arm64': cftUrl('mac-arm64/chrome-headless-shell-mac-arm64.zip'),
+ 'mac14': cftUrl('mac-x64/chrome-headless-shell-mac-x64.zip'),
+ 'mac14-arm64': cftUrl('mac-arm64/chrome-headless-shell-mac-arm64.zip'),
+ 'mac15': cftUrl('mac-x64/chrome-headless-shell-mac-x64.zip'),
+ 'mac15-arm64': cftUrl('mac-arm64/chrome-headless-shell-mac-arm64.zip'),
+ 'win64': cftUrl('win64/chrome-headless-shell-win64.zip'),
},
'firefox': {
'<unknown>': undefined,
@@ -1413,9 +1413,9 @@ export class Registry {
private _defaultBrowsersToInstall(options: { shell?: 'no' | 'only' }): Executable[] {
let executables = this.defaultExecutables();
if (options.shell === 'no')
- executables = executables.filter(e => e.name !== 'chromium-headless-shell');
+ executables = executables.filter(e => e.name !== 'chromium-headless-shell' && e.name !== 'chromium-tip-of-tree-headless-shell');
if (options.shell === 'only')
- executables = executables.filter(e => e.name !== 'chromium');
+ executables = executables.filter(e => e.name !== 'chromium' && e.name !== 'chromium-tip-of-tree');
return executables;
}
@@ -1451,6 +1451,11 @@ export class Registry {
handleArgument('chromium');
if (options.shell !== 'no')
handleArgument('chromium-headless-shell');
+ } else if (alias === 'chromium-tip-of-tree') {
+ if (options.shell !== 'only')
+ handleArgument('chromium-tip-of-tree');
+ if (options.shell !== 'no')
+ handleArgument('chromium-tip-of-tree-headless-shell');
} else {
handleArgument(alias);
}
diff --git a/tests/config/browserTest.ts b/tests/config/browserTest.ts
index 5278da0b43..c464fa7d79 100644
--- a/tests/config/browserTest.ts
+++ b/tests/config/browserTest.ts
@@ -105,7 +105,9 @@ const test = baseTest.extend<BrowserTestTestFixtures, BrowserTestWorkerFixtures>
electronMajorVersion: [0, { scope: 'worker' }],
isHeadlessShell: [async ({ browserName, channel, headless }, use) => {
- await use(browserName === 'chromium' && (channel === 'chromium-headless-shell' || channel === 'chromium-tip-of-tree-headless-shell' || (!channel && headless)));
+ const isShell = channel === 'chromium-headless-shell' || (!channel && headless);
+ const isToTShell = channel === 'chromium-tip-of-tree-headless-shell' || (channel === 'chromium-tip-of-tree' && headless);
+ await use(browserName === 'chromium' && (isShell || isToTShell));
}, { scope: 'worker' }],
contextFactory: async ({ _contextFactory }: any, run) => {