chore: introduce chromium-tip-of-tree-headless-shell (#33964)
This commit is contained in:
parent
217a0e9003
commit
8d57b7543e
21
.github/workflows/tests_secondary.yml
vendored
21
.github/workflows/tests_secondary.yml
vendored
|
|
@ -234,6 +234,27 @@ jobs:
|
||||||
env:
|
env:
|
||||||
PWTEST_CHANNEL: chromium-tip-of-tree
|
PWTEST_CHANNEL: chromium-tip-of-tree
|
||||||
|
|
||||||
|
chromium_tot_headless_shell:
|
||||||
|
name: Chromium tip-of-tree headless-shell-${{ matrix.os }}
|
||||||
|
environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }}
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: [ubuntu-20.04]
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: ./.github/actions/run-test
|
||||||
|
with:
|
||||||
|
browsers-to-install: chromium-tip-of-tree-headless-shell
|
||||||
|
command: npm run ctest
|
||||||
|
bot-name: "chromium-tip-of-tree-headless-shell-${{ matrix.os }}"
|
||||||
|
flakiness-client-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_CLIENT_ID }}
|
||||||
|
flakiness-tenant-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_TENANT_ID }}
|
||||||
|
flakiness-subscription-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_SUBSCRIPTION_ID }}
|
||||||
|
env:
|
||||||
|
PWTEST_CHANNEL: chromium-tip-of-tree-headless-shell
|
||||||
|
|
||||||
firefox_beta:
|
firefox_beta:
|
||||||
name: Firefox Beta ${{ matrix.os }}
|
name: Firefox Beta ${{ matrix.os }}
|
||||||
environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }}
|
environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }}
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,12 @@
|
||||||
"installByDefault": false,
|
"installByDefault": false,
|
||||||
"browserVersion": "133.0.6887.0"
|
"browserVersion": "133.0.6887.0"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "chromium-tip-of-tree-headless-shell",
|
||||||
|
"revision": "1285",
|
||||||
|
"installByDefault": true,
|
||||||
|
"browserVersion": "133.0.6887.0"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "firefox",
|
"name": "firefox",
|
||||||
"revision": "1466",
|
"revision": "1466",
|
||||||
|
|
|
||||||
|
|
@ -174,6 +174,35 @@ const DOWNLOAD_PATHS: Record<BrowserName | InternalTool, DownloadPaths> = {
|
||||||
'mac15-arm64': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-mac-arm64.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',
|
'win64': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-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',
|
||||||
|
'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-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-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',
|
||||||
|
},
|
||||||
'firefox': {
|
'firefox': {
|
||||||
'<unknown>': undefined,
|
'<unknown>': undefined,
|
||||||
'ubuntu18.04-x64': undefined,
|
'ubuntu18.04-x64': undefined,
|
||||||
|
|
@ -410,10 +439,10 @@ function readDescriptors(browsersJSON: BrowsersJSON): BrowsersJSONDescriptor[] {
|
||||||
}
|
}
|
||||||
|
|
||||||
export type BrowserName = 'chromium' | 'firefox' | 'webkit' | 'bidi';
|
export type BrowserName = 'chromium' | 'firefox' | 'webkit' | 'bidi';
|
||||||
type InternalTool = 'ffmpeg' | 'firefox-beta' | 'chromium-tip-of-tree' | 'chromium-headless-shell' | 'android';
|
type InternalTool = 'ffmpeg' | 'firefox-beta' | 'chromium-tip-of-tree' | 'chromium-headless-shell' | 'chromium-tip-of-tree-headless-shell' | 'android';
|
||||||
type BidiChannel = 'bidi-firefox-stable' | 'bidi-firefox-beta' | 'bidi-firefox-nightly' | 'bidi-chrome-canary' | 'bidi-chrome-stable' | 'bidi-chromium';
|
type BidiChannel = 'bidi-firefox-stable' | 'bidi-firefox-beta' | 'bidi-firefox-nightly' | 'bidi-chrome-canary' | 'bidi-chrome-stable' | 'bidi-chromium';
|
||||||
type ChromiumChannel = 'chrome' | 'chrome-beta' | 'chrome-dev' | 'chrome-canary' | 'msedge' | 'msedge-beta' | 'msedge-dev' | 'msedge-canary';
|
type ChromiumChannel = 'chrome' | 'chrome-beta' | 'chrome-dev' | 'chrome-canary' | 'msedge' | 'msedge-beta' | 'msedge-dev' | 'msedge-canary';
|
||||||
const allDownloadable = ['android', 'chromium', 'firefox', 'webkit', 'ffmpeg', 'firefox-beta', 'chromium-tip-of-tree', 'chromium-headless-shell'];
|
const allDownloadable = ['android', 'chromium', 'firefox', 'webkit', 'ffmpeg', 'firefox-beta', 'chromium-tip-of-tree', 'chromium-headless-shell', 'chromium-tip-of-tree-headless-shell'];
|
||||||
|
|
||||||
export interface Executable {
|
export interface Executable {
|
||||||
type: 'browser' | 'tool' | 'channel';
|
type: 'browser' | 'tool' | 'channel';
|
||||||
|
|
@ -514,6 +543,24 @@ export class Registry {
|
||||||
_isHermeticInstallation: true,
|
_isHermeticInstallation: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const chromiumTipOfTreeHeadlessShell = descriptors.find(d => d.name === 'chromium-tip-of-tree-headless-shell')!;
|
||||||
|
const chromiumTipOfTreeHeadlessShellExecutable = findExecutablePath(chromiumTipOfTreeHeadlessShell.dir, 'chromium-headless-shell');
|
||||||
|
this._executables.push({
|
||||||
|
type: 'channel',
|
||||||
|
name: 'chromium-tip-of-tree-headless-shell',
|
||||||
|
browserName: 'chromium',
|
||||||
|
directory: chromiumTipOfTreeHeadlessShell.dir,
|
||||||
|
executablePath: () => chromiumTipOfTreeHeadlessShellExecutable,
|
||||||
|
executablePathOrDie: (sdkLanguage: string) => executablePathOrDie('chromium', chromiumTipOfTreeHeadlessShellExecutable, chromiumTipOfTreeHeadlessShell.installByDefault, sdkLanguage),
|
||||||
|
installType: chromiumTipOfTreeHeadlessShell.installByDefault ? 'download-by-default' : 'download-on-demand',
|
||||||
|
_validateHostRequirements: (sdkLanguage: string) => this._validateHostRequirements(sdkLanguage, chromiumTipOfTreeHeadlessShell.dir, ['chrome-linux'], [], ['chrome-win']),
|
||||||
|
downloadURLs: this._downloadURLs(chromiumTipOfTreeHeadlessShell),
|
||||||
|
browserVersion: chromium.browserVersion,
|
||||||
|
_install: () => this._downloadExecutable(chromiumTipOfTreeHeadlessShell, chromiumTipOfTreeHeadlessShellExecutable),
|
||||||
|
_dependencyGroup: 'chromium',
|
||||||
|
_isHermeticInstallation: true,
|
||||||
|
});
|
||||||
|
|
||||||
const chromiumTipOfTree = descriptors.find(d => d.name === 'chromium-tip-of-tree')!;
|
const chromiumTipOfTree = descriptors.find(d => d.name === 'chromium-tip-of-tree')!;
|
||||||
const chromiumTipOfTreeExecutable = findExecutablePath(chromiumTipOfTree.dir, 'chromium');
|
const chromiumTipOfTreeExecutable = findExecutablePath(chromiumTipOfTree.dir, 'chromium');
|
||||||
this._executables.push({
|
this._executables.push({
|
||||||
|
|
|
||||||
|
|
@ -99,7 +99,7 @@ const test = baseTest.extend<BrowserTestTestFixtures, BrowserTestWorkerFixtures>
|
||||||
isWebView2: [false, { scope: 'worker' }],
|
isWebView2: [false, { scope: 'worker' }],
|
||||||
|
|
||||||
isHeadlessShell: [async ({ browserName, channel, headless }, use) => {
|
isHeadlessShell: [async ({ browserName, channel, headless }, use) => {
|
||||||
await use(browserName === 'chromium' && (channel === 'chromium-headless-shell' || (!channel && headless)));
|
await use(browserName === 'chromium' && (channel === 'chromium-headless-shell' || channel === 'chromium-tip-of-tree-headless-shell' || (!channel && headless)));
|
||||||
}, { scope: 'worker' }],
|
}, { scope: 'worker' }],
|
||||||
|
|
||||||
contextFactory: async ({ _contextFactory }: any, run) => {
|
contextFactory: async ({ _contextFactory }: any, run) => {
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ import { PNG } from 'playwright-core/lib/utilsBundle';
|
||||||
import { expect, playwrightTest as it } from '../config/browserTest';
|
import { expect, playwrightTest as it } from '../config/browserTest';
|
||||||
|
|
||||||
it.use({ headless: false });
|
it.use({ headless: false });
|
||||||
it.skip(({ channel }) => channel === 'chromium-headless-shell', 'shell is never headed');
|
it.skip(({ channel }) => channel === 'chromium-headless-shell' || channel === 'chromium-tip-of-tree-headless-shell', 'shell is never headed');
|
||||||
|
|
||||||
it('should have default url when launching browser @smoke', async ({ launchPersistent }) => {
|
it('should have default url when launching browser @smoke', async ({ launchPersistent }) => {
|
||||||
const { context } = await launchPersistent();
|
const { context } = await launchPersistent();
|
||||||
|
|
|
||||||
|
|
@ -45,6 +45,7 @@ it('should throw a friendly error if its headed and there is no xserver on linux
|
||||||
it.skip(platform !== 'linux');
|
it.skip(platform !== 'linux');
|
||||||
it.skip(mode.startsWith('service'));
|
it.skip(mode.startsWith('service'));
|
||||||
it.skip(channel === 'chromium-headless-shell', 'shell is never headed');
|
it.skip(channel === 'chromium-headless-shell', 'shell is never headed');
|
||||||
|
it.skip(channel === 'chromium-tip-of-tree-headless-shell', 'shell is never headed');
|
||||||
|
|
||||||
const error: Error = await browserType.launch({
|
const error: Error = await browserType.launch({
|
||||||
headless: false,
|
headless: false,
|
||||||
|
|
|
||||||
|
|
@ -100,6 +100,10 @@ Example:
|
||||||
const headlessShellBrowser = await browsersJSON.browsers.find(b => b.name === 'chromium-headless-shell');
|
const headlessShellBrowser = await browsersJSON.browsers.find(b => b.name === 'chromium-headless-shell');
|
||||||
headlessShellBrowser.revision = revision;
|
headlessShellBrowser.revision = revision;
|
||||||
headlessShellBrowser.browserVersion = browserVersion;
|
headlessShellBrowser.browserVersion = browserVersion;
|
||||||
|
} else if (browserName === 'chromium-tip-of-tree') {
|
||||||
|
const tipOfTreeBrowser = await browsersJSON.browsers.find(b => b.name === 'chromium-tip-of-tree-headless-shell');
|
||||||
|
tipOfTreeBrowser.revision = revision;
|
||||||
|
tipOfTreeBrowser.browserVersion = browserVersion;
|
||||||
}
|
}
|
||||||
|
|
||||||
fs.writeFileSync(path.join(CORE_PATH, 'browsers.json'), JSON.stringify(browsersJSON, null, 2) + '\n');
|
fs.writeFileSync(path.join(CORE_PATH, 'browsers.json'), JSON.stringify(browsersJSON, null, 2) + '\n');
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue