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
chore: replace CHROME with CHROMIUM (#465)
Yury Semikhatsky778ab3deff71
diff --git a/docs/api.md b/docs/api.mdindex adc89c996a..a13e8161ee 100644--- a/docs/api.md+++ b/docs/api.md@@ -2439,7 +2439,7 @@ Page is guaranteed to have a main frame which persists during navigations.- `preferCSSPageSize` <[boolean]> Give any CSS `@page` size declared in the page priority over what is declared in `width` and `height` or `format` options. Defaults to `false`, which will scale the content to fit the paper size.- returns: <[Promise]<[Buffer]>> Promise which resolves with PDF buffer.-> **NOTE** Generating a pdf is currently only supported in Chrome headless.+> **NOTE** Generating a pdf is currently only supported in Chromium headless.`page.pdf()` generates a pdf of the page with `print` css media. To generate a pdf with `screen` media, call [page.emulateMedia({ type: 'screen' })](#pageemulatemedia) before calling `page.pdf()`:@@ -3118,7 +3118,7 @@ The Accessibility class provides methods for inspecting Chromium's accessibilityAccessibility is a very platform-specific thing. On different platforms, there are different screen readers that might have wildly different output.-Blink - Chrome's rendering engine - has a concept of "accessibility tree", which is then translated into different platform-specific APIs. Accessibility namespace gives users+Blink - Chromium's rendering engine - has a concept of "accessibility tree", which is then translated into different platform-specific APIs. Accessibility namespace gives usersaccess to the Blink Accessibility Tree.Most of the accessibility tree gets filtered out when converting from Blink AX Tree to Platform-specific AX-Tree or by assistive technologies themselves. By default, Playwright tries to approximate this filtering, exposing only the "interesting" nodes of the tree.diff --git a/install.js b/install.jsindex 7aedbb6667..617d918bb4 100644--- a/install.js+++ b/install.js@@ -34,7 +34,7 @@ try {try {const chromeRevision = await downloadBrowser('chromium', require('./chromium'));if (protocolGenerator)- protocolGenerator.generateChromeProtocol(chromeRevision);+ protocolGenerator.generateChromiunProtocol(chromeRevision);} catch (e) {console.warn(e.message);}diff --git a/src/server/crPlaywright.ts b/src/server/crPlaywright.tsindex f1de1bbfda..c6860199c2 100644--- a/src/server/crPlaywright.ts+++ b/src/server/crPlaywright.ts@@ -36,14 +36,14 @@ export type SlowMoOptions = {slowMo?: number,};-export type ChromeArgOptions = {+export type ChromiumArgOptions = {headless?: boolean,args?: string[],userDataDir?: string,devtools?: boolean,};-export type LaunchOptions = ChromeArgOptions & SlowMoOptions & {+export type LaunchOptions = ChromiumArgOptions & SlowMoOptions & {executablePath?: string,ignoreDefaultArgs?: boolean | string[],handleSIGINT?: boolean,@@ -129,7 +129,7 @@ export class CRPlaywright implements Playwright {if (!chromeArguments.some(argument => argument.startsWith('--remote-debugging-')))chromeArguments.push(pipe ? '--remote-debugging-pipe' : '--remote-debugging-port=0');if (!chromeArguments.some(arg => arg.startsWith('--user-data-dir'))) {- temporaryUserDataDir = await mkdtempAsync(CHROME_PROFILE_PATH);+ temporaryUserDataDir = await mkdtempAsync(CHROMIUM_PROFILE_PATH);chromeArguments.push(`--user-data-dir=${temporaryUserDataDir}`);}@@ -168,7 +168,7 @@ export class CRPlaywright implements Playwright {let connectOptions: CRConnectOptions | undefined;if (!usePipe) {- const timeoutError = new TimeoutError(`Timed out after ${timeout} ms while trying to connect to Chrome! The only Chrome revision guaranteed to work is r${this._revision}`);+ const timeoutError = new TimeoutError(`Timed out after ${timeout} ms while trying to connect to Chromium! The only Chromium revision guaranteed to work is r${this._revision}`);const match = await waitForLine(launchedProcess, launchedProcess.stderr, /^DevTools listening on (ws:\/\/.*)$/, timeout, timeoutError);const browserWSEndpoint = match[1];connectOptions = { browserWSEndpoint, slowMo };@@ -195,7 +195,7 @@ export class CRPlaywright implements Playwright {return { TimeoutError };}- defaultArgs(options: ChromeArgOptions = {}): string[] {+ defaultArgs(options: ChromiumArgOptions = {}): string[] {const {devtools = false,headless = !devtools,@@ -279,7 +279,7 @@ export class CRPlaywright implements Playwright {const mkdtempAsync = platform.promisify(fs.mkdtemp);-const CHROME_PROFILE_PATH = path.join(os.tmpdir(), 'playwright_dev_profile-');+const CHROMIUM_PROFILE_PATH = path.join(os.tmpdir(), 'playwright_dev_profile-');const DEFAULT_ARGS = ['--disable-background-networking',diff --git a/test/accessibility.spec.js b/test/accessibility.spec.jsindex d24224a580..7c13afd9c0 100644--- a/test/accessibility.spec.js+++ b/test/accessibility.spec.js@@ -15,7 +15,7 @@* limitations under the License.*/-module.exports.describe = function({testRunner, expect, FFOX, CHROME, WEBKIT}) {+module.exports.describe = function({testRunner, expect, FFOX, CHROMIUM, WEBKIT}) {const {describe, xdescribe, fdescribe} = testRunner;const {it, fit, xit, dit} = testRunner;const {beforeAll, beforeEach, afterAll, afterEach} = testRunner;@@ -62,7 +62,7 @@ module.exports.describe = function({testRunner, expect, FFOX, CHROME, WEBKIT}) {{role: 'combobox option', name: 'First Option', selected: true},{role: 'combobox option', name: 'Second Option'}]}]- } : CHROME ? {+ } : CHROMIUM ? {role: 'WebArea',name: 'Accessibility Test',children: [@@ -113,7 +113,7 @@ module.exports.describe = function({testRunner, expect, FFOX, CHROME, WEBKIT}) {role: 'text leaf',name: 'hi'}]- } : CHROME ? {+ } : CHROMIUM ? {role: 'textbox',name: '',value: 'hi',@@ -308,7 +308,7 @@ module.exports.describe = function({testRunner, expect, FFOX, CHROME, WEBKIT}) {role: 'entry',name: 'my favorite textbox',value: 'this is the inner content yo'- } : CHROME ? {+ } : CHROMIUM ? {role: 'textbox',name: 'my favorite textbox',value: 'this is the inner content '@@ -331,7 +331,7 @@ module.exports.describe = function({testRunner, expect, FFOX, CHROME, WEBKIT}) {role: 'checkbutton',name: 'my favorite checkbox',checked: true- } : CHROME ? {+ } : CHROMIUM ? {role: 'checkbox',name: 'my favorite checkbox',checked: truediff --git a/test/assets/beforeunload.html b/test/assets/beforeunload.htmlindex b246905190..332ac464e5 100644--- a/test/assets/beforeunload.html+++ b/test/assets/beforeunload.html@@ -1,7 +1,7 @@<div>beforeunload demo.</div><script>window.addEventListener('beforeunload', event => {- // Chrome & WebKit way.+ // Chromium & WebKit way.event.returnValue = 'Leave?';// Firefox way.event.preventDefault();diff --git a/test/browser.spec.js b/test/browser.spec.jsindex 862a67b832..b598f59ba0 100644--- a/test/browser.spec.js+++ b/test/browser.spec.js@@ -15,7 +15,7 @@* limitations under the License.*/-module.exports.describe = function({testRunner, expect, headless, playwright, FFOX, CHROME, WEBKIT}) {+module.exports.describe = function({testRunner, expect, headless, playwright, FFOX, CHROMIUM, WEBKIT}) {const {describe, xdescribe, fdescribe} = testRunner;const {it, fit, xit, dit} = testRunner;const {beforeAll, beforeEach, afterAll, afterEach} = testRunner;diff --git a/test/browsercontext.spec.js b/test/browsercontext.spec.jsindex e86a45c022..b3f5a003f9 100644--- a/test/browsercontext.spec.js+++ b/test/browsercontext.spec.js@@ -17,7 +17,7 @@const utils = require('./utils');-module.exports.describe = function({testRunner, expect, playwright, CHROME, WEBKIT}) {+module.exports.describe = function({testRunner, expect, playwright, CHROMIUM, WEBKIT}) {const {describe, xdescribe, fdescribe} = testRunner;const {it, fit, xit, dit} = testRunner;const {beforeAll, beforeEach, afterAll, afterEach} = testRunner;diff --git a/test/chromium/chromium.spec.js b/test/chromium/chromium.spec.jsindex 445a971a2c..dd6eec8e49 100644--- a/test/chromium/chromium.spec.js+++ b/test/chromium/chromium.spec.js@@ -16,7 +16,7 @@const { waitEvent } = require('../utils');-module.exports.describe = function({testRunner, expect, playwright, FFOX, CHROME, WEBKIT}) {+module.exports.describe = function({testRunner, expect, playwright, FFOX, CHROMIUM, WEBKIT}) {const {describe, xdescribe, fdescribe} = testRunner;const {it, fit, xit, dit} = testRunner;const {beforeAll, beforeEach, afterAll, afterEach} = testRunner;diff --git a/test/chromium/connect.spec.js b/test/chromium/connect.spec.jsindex 447b866055..4ca873bc18 100644--- a/test/chromium/connect.spec.js+++ b/test/chromium/connect.spec.js@@ -17,7 +17,7 @@const utils = require('../utils');-module.exports.describe = function({testRunner, expect, defaultBrowserOptions, playwright, FFOX, CHROME, WEBKIT}) {+module.exports.describe = function({testRunner, expect, defaultBrowserOptions, playwright, FFOX, CHROMIUM, WEBKIT}) {const {describe, xdescribe, fdescribe} = testRunner;const {it, fit, xit, dit} = testRunner;const {beforeAll, beforeEach, afterAll, afterEach} = testRunner;diff --git a/test/chromium/coverage.spec.js b/test/chromium/coverage.spec.jsindex c6c7fb0655..37e79b3464 100644--- a/test/chromium/coverage.spec.js+++ b/test/chromium/coverage.spec.js@@ -14,7 +14,7 @@* limitations under the License.*/-module.exports.describe = function({testRunner, expect, FFOX, CHROME, WEBKIT}) {+module.exports.describe = function({testRunner, expect, FFOX, CHROMIUM, WEBKIT}) {const {describe, xdescribe, fdescribe} = testRunner;const {it, fit, xit, dit} = testRunner;const {beforeAll, beforeEach, afterAll, afterEach} = testRunner;diff --git a/test/chromium/headful.spec.js b/test/chromium/headful.spec.jsindex a709654de0..0e54ba4365 100644--- a/test/chromium/headful.spec.js+++ b/test/chromium/headful.spec.js@@ -24,7 +24,7 @@ const mkdtempAsync = util.promisify(fs.mkdtemp);const TMP_FOLDER = path.join(os.tmpdir(), 'pptr_tmp_folder-');-module.exports.describe = function({testRunner, expect, playwright, defaultBrowserOptions, FFOX, CHROME, WEBKIT}) {+module.exports.describe = function({testRunner, expect, playwright, defaultBrowserOptions, FFOX, CHROMIUM, WEBKIT}) {const {describe, xdescribe, fdescribe} = testRunner;const {it, fit, xit, dit} = testRunner;const {beforeAll, beforeEach, afterAll, afterEach} = testRunner;diff --git a/test/chromium/oopif.spec.js b/test/chromium/oopif.spec.jsindex 23c384773a..92cdf9982a 100644--- a/test/chromium/oopif.spec.js+++ b/test/chromium/oopif.spec.js@@ -14,7 +14,7 @@* limitations under the License.*/-module.exports.describe = function({testRunner, expect, defaultBrowserOptions, playwright, FFOX, CHROME, WEBKIT}) {+module.exports.describe = function({testRunner, expect, defaultBrowserOptions, playwright, FFOX, CHROMIUM, WEBKIT}) {const {describe, xdescribe, fdescribe} = testRunner;const {it, fit, xit, dit} = testRunner;const {beforeAll, beforeEach, afterAll, afterEach} = testRunner;diff --git a/test/chromium/session.spec.js b/test/chromium/session.spec.jsindex 6809e24dbe..8c6ddf82bb 100644--- a/test/chromium/session.spec.js+++ b/test/chromium/session.spec.js@@ -16,7 +16,7 @@const { waitEvent } = require('../utils');-module.exports.describe = function({testRunner, expect, FFOX, CHROME, WEBKIT}) {+module.exports.describe = function({testRunner, expect, FFOX, CHROMIUM, WEBKIT}) {const {describe, xdescribe, fdescribe} = testRunner;const {it, fit, xit, dit} = testRunner;const {beforeAll, beforeEach, afterAll, afterEach} = testRunner;diff --git a/test/click.spec.js b/test/click.spec.jsindex fdb8934e59..4ae9189abf 100644--- a/test/click.spec.js+++ b/test/click.spec.js@@ -17,7 +17,7 @@const utils = require('./utils');-module.exports.describe = function({testRunner, expect, playwright, FFOX, CHROME, WEBKIT}) {+module.exports.describe = function({testRunner, expect, playwright, FFOX, CHROMIUM, WEBKIT}) {const {describe, xdescribe, fdescribe} = testRunner;const {it, fit, xit, dit} = testRunner;const {beforeAll, beforeEach, afterAll, afterEach} = testRunner;@@ -366,7 +366,7 @@ module.exports.describe = function({testRunner, expect, playwright, FFOX, CHROMEawait page.click('button');expect(await page.evaluate(() => shiftKey)).toBe(false);});- it.skip(CHROME)('should click an offscreen element when scroll-behavior is smooth', async({page}) => {+ it.skip(CHROMIUM)('should click an offscreen element when scroll-behavior is smooth', async({page}) => {await page.setContent(`<div style="border: 1px solid black; height: 500px; overflow: auto; width: 500px; scroll-behavior: smooth"><button style="margin-top: 2000px" onClick="window.clicked = true">hi</button>diff --git a/test/cookies.spec.js b/test/cookies.spec.jsindex 27ddfa4975..30f435eb25 100644--- a/test/cookies.spec.js+++ b/test/cookies.spec.js@@ -15,7 +15,7 @@* limitations under the License.*/-module.exports.describe = function({testRunner, expect, FFOX, CHROME, WEBKIT}) {+module.exports.describe = function({testRunner, expect, FFOX, CHROMIUM, WEBKIT}) {const {describe, xdescribe, fdescribe} = testRunner;const {it, fit, xit, dit} = testRunner;const {beforeAll, beforeEach, afterAll, afterEach} = testRunner;diff --git a/test/dialog.spec.js b/test/dialog.spec.jsindex 8210edb4a0..183169f5c1 100644--- a/test/dialog.spec.js+++ b/test/dialog.spec.js@@ -15,7 +15,7 @@* limitations under the License.*/-module.exports.describe = function({testRunner, expect, FFOX, CHROME, WEBKIT}) {+module.exports.describe = function({testRunner, expect, FFOX, CHROMIUM, WEBKIT}) {const {describe, xdescribe, fdescribe} = testRunner;const {it, fit, xit, dit} = testRunner;const {beforeAll, beforeEach, afterAll, afterEach} = testRunner;diff --git a/test/elementhandle.spec.js b/test/elementhandle.spec.jsindex 562661026f..6374313025 100644--- a/test/elementhandle.spec.js+++ b/test/elementhandle.spec.js@@ -17,7 +17,7 @@const utils = require('./utils');-module.exports.describe = function({testRunner, expect, FFOX, CHROME, WEBKIT}) {+module.exports.describe = function({testRunner, expect, FFOX, CHROMIUM, WEBKIT}) {const {describe, xdescribe, fdescribe} = testRunner;const {it, fit, xit, dit} = testRunner;const {beforeAll, beforeEach, afterAll, afterEach} = testRunner;diff --git a/test/emulation.spec.js b/test/emulation.spec.jsindex 2e10670ee5..b4ff63138e 100644--- a/test/emulation.spec.js+++ b/test/emulation.spec.js@@ -15,7 +15,7 @@* limitations under the License.*/-module.exports.describe = function({testRunner, expect, playwright, FFOX, CHROME, WEBKIT}) {+module.exports.describe = function({testRunner, expect, playwright, FFOX, CHROMIUM, WEBKIT}) {const {describe, xdescribe, fdescribe} = testRunner;const {it, fit, xit, dit} = testRunner;const {beforeAll, beforeEach, afterAll, afterEach} = testRunner;diff --git a/test/evaluation.spec.js b/test/evaluation.spec.jsindex e54a191435..9b1d5831b5 100644--- a/test/evaluation.spec.js+++ b/test/evaluation.spec.js@@ -19,7 +19,7 @@ const utils = require('./utils');const bigint = typeof BigInt !== 'undefined';-module.exports.describe = function({testRunner, expect, FFOX, CHROME, WEBKIT}) {+module.exports.describe = function({testRunner, expect, FFOX, CHROMIUM, WEBKIT}) {const {describe, xdescribe, fdescribe} = testRunner;const {it, fit, xit, dit} = testRunner;const {beforeAll, beforeEach, afterAll, afterEach} = testRunner;diff --git a/test/fixtures.spec.js b/test/fixtures.spec.jsindex 82b48d06c5..8c2f4c0f34 100644--- a/test/fixtures.spec.js+++ b/test/fixtures.spec.js@@ -18,7 +18,7 @@const path = require('path');const {spawn} = require('child_process');-module.exports.describe = function({testRunner, expect, defaultBrowserOptions, playwright, playwrightPath, FFOX, CHROME, WEBKIT}) {+module.exports.describe = function({testRunner, expect, defaultBrowserOptions, playwright, playwrightPath, FFOX, CHROMIUM, WEBKIT}) {const {describe, xdescribe, fdescribe} = testRunner;const {it, fit, xit, dit} = testRunner;const {beforeAll, beforeEach, afterAll, afterEach} = testRunner;diff --git a/test/frame.spec.js b/test/frame.spec.jsindex ac5eee1eaa..d99d3f719a 100644--- a/test/frame.spec.js+++ b/test/frame.spec.js@@ -17,7 +17,7 @@const utils = require('./utils');-module.exports.describe = function({testRunner, expect, FFOX, CHROME, WEBKIT}) {+module.exports.describe = function({testRunner, expect, FFOX, CHROMIUM, WEBKIT}) {const {describe, xdescribe, fdescribe} = testRunner;const {it, fit, xit, dit} = testRunner;const {beforeAll, beforeEach, afterAll, afterEach} = testRunner;diff --git a/test/ignorehttpserrors.spec.js b/test/ignorehttpserrors.spec.jsindex 65a7911afa..b9b623b53f 100644--- a/test/ignorehttpserrors.spec.js+++ b/test/ignorehttpserrors.spec.js@@ -15,7 +15,7 @@* limitations under the License.*/-module.exports.describe = function({testRunner, expect, defaultBrowserOptions, playwright, FFOX, CHROME, WEBKIT}) {+module.exports.describe = function({testRunner, expect, defaultBrowserOptions, playwright, FFOX, CHROMIUM, WEBKIT}) {const {describe, xdescribe, fdescribe} = testRunner;const {it, fit, xit, dit} = testRunner;const {beforeAll, beforeEach, afterAll, afterEach} = testRunner;diff --git a/test/input.spec.js b/test/input.spec.jsindex 80c3334357..d51ed762b4 100644--- a/test/input.spec.js+++ b/test/input.spec.js@@ -19,7 +19,7 @@ const path = require('path');const FILE_TO_UPLOAD = path.join(__dirname, '/assets/file-to-upload.txt');-module.exports.describe = function({testRunner, expect, playwright, FFOX, CHROME, WEBKIT}) {+module.exports.describe = function({testRunner, expect, playwright, FFOX, CHROMIUM, WEBKIT}) {const {describe, xdescribe, fdescribe} = testRunner;const {it, fit, xit, dit} = testRunner;const {beforeAll, beforeEach, afterAll, afterEach} = testRunner;diff --git a/test/interception.spec.js b/test/interception.spec.jsindex 76fd08c767..b6b8ea7f03 100644--- a/test/interception.spec.js+++ b/test/interception.spec.js@@ -19,7 +19,7 @@ const fs = require('fs');const path = require('path');const utils = require('./utils');-module.exports.describe = function({testRunner, expect, defaultBrowserOptions, playwright, FFOX, CHROME, WEBKIT}) {+module.exports.describe = function({testRunner, expect, defaultBrowserOptions, playwright, FFOX, CHROMIUM, WEBKIT}) {const {describe, xdescribe, fdescribe} = testRunner;const {it, fit, xit, dit} = testRunner;const {beforeAll, beforeEach, afterAll, afterEach} = testRunner;@@ -532,7 +532,7 @@ module.exports.describe = function({testRunner, expect, defaultBrowserOptions, pexpect(response.status()).toBe(200);});it('should fail if wrong credentials', async({page, server}) => {- // Use unique user/password since Chrome caches credentials per origin.+ // Use unique user/password since Chromium caches credentials per origin.server.setAuth('/empty.html', 'user2', 'pass2');await page.authenticate({username: 'foo',@@ -542,7 +542,7 @@ module.exports.describe = function({testRunner, expect, defaultBrowserOptions, pexpect(response.status()).toBe(401);});it('should allow disable authentication', async({page, server}) => {- // Use unique user/password since Chrome caches credentials per origin.+ // Use unique user/password since Chromium caches credentials per origin.server.setAuth('/empty.html', 'user3', 'pass3');await page.authenticate({username: 'user3',@@ -551,7 +551,7 @@ module.exports.describe = function({testRunner, expect, defaultBrowserOptions, plet response = await page.goto(server.EMPTY_PAGE);expect(response.status()).toBe(200);await page.authenticate(null);- // Navigate to a different origin to bust Chrome's credential caching.+ // Navigate to a different origin to bust Chromium's credential caching.response = await page.goto(server.CROSS_PROCESS_PREFIX + '/empty.html');expect(response.status()).toBe(401);});diff --git a/test/jshandle.spec.js b/test/jshandle.spec.jsindex 798c5f90e4..0dcd0d61cc 100644--- a/test/jshandle.spec.js+++ b/test/jshandle.spec.js@@ -15,7 +15,7 @@* limitations under the License.*/-module.exports.describe = function({testRunner, expect, CHROME, FFOX, WEBKIT}) {+module.exports.describe = function({testRunner, expect, CHROMIUM, FFOX, WEBKIT}) {const {describe, xdescribe, fdescribe} = testRunner;const {it, fit, xit, dit} = testRunner;const {beforeAll, beforeEach, afterAll, afterEach} = testRunner;@@ -93,7 +93,7 @@ module.exports.describe = function({testRunner, expect, CHROME, FFOX, WEBKIT}) {await windowHandle.jsonValue().catch(e => error = e);if (WEBKIT)expect(error.message).toContain('Object has too long reference chain');- else if (CHROME)+ else if (CHROMIUM)expect(error.message).toContain('Object reference chain is too long');else if (FFOX)expect(error.message).toContain('Object is not serializable');diff --git a/test/keyboard.spec.js b/test/keyboard.spec.jsindex 7efe97a2fc..0ade260ee6 100644--- a/test/keyboard.spec.js+++ b/test/keyboard.spec.js@@ -18,7 +18,7 @@const utils = require('./utils');const os = require('os');-module.exports.describe = function({testRunner, expect, FFOX, CHROME, WEBKIT, MAC}) {+module.exports.describe = function({testRunner, expect, FFOX, CHROMIUM, WEBKIT, MAC}) {const {describe, xdescribe, fdescribe} = testRunner;const {it, fit, xit, dit} = testRunner;const {beforeAll, beforeEach, afterAll, afterEach} = testRunner;@@ -227,7 +227,7 @@ module.exports.describe = function({testRunner, expect, FFOX, CHROME, WEBKIT, MAawait textarea.type('πΉ Tokyo street Japan π―π΅');expect(await frame.$eval('textarea', textarea => textarea.value)).toBe('πΉ Tokyo street Japan π―π΅');});- it.skip(CHROME && MAC)('should handle selectAll', async({page, server}) => {+ it.skip(CHROMIUM && MAC)('should handle selectAll', async({page, server}) => {await page.goto(server.PREFIX + '/input/textarea.html');const textarea = await page.$('textarea');await textarea.type('some text');@@ -238,7 +238,7 @@ module.exports.describe = function({testRunner, expect, FFOX, CHROME, WEBKIT, MAawait page.keyboard.press('Backspace');expect(await page.$eval('textarea', textarea => textarea.value)).toBe('');});- it.skip(CHROME && MAC)('should be able to prevent selectAll', async({page, server}) => {+ it.skip(CHROMIUM && MAC)('should be able to prevent selectAll', async({page, server}) => {await page.goto(server.PREFIX + '/input/textarea.html');const textarea = await page.$('textarea');await textarea.type('some text');diff --git a/test/mouse.spec.js b/test/mouse.spec.jsindex df64f60100..4586338086 100644--- a/test/mouse.spec.js+++ b/test/mouse.spec.js@@ -26,7 +26,7 @@ function dimensions() {};}-module.exports.describe = function({testRunner, expect, FFOX, CHROME, WEBKIT, MAC}) {+module.exports.describe = function({testRunner, expect, FFOX, CHROMIUM, WEBKIT, MAC}) {const {describe, xdescribe, fdescribe} = testRunner;const {it, fit, xit, dit} = testRunner;const {beforeAll, beforeEach, afterAll, afterEach} = testRunner;diff --git a/test/navigation.spec.js b/test/navigation.spec.jsindex af1a336780..4e1824e8ef 100644--- a/test/navigation.spec.js+++ b/test/navigation.spec.js@@ -18,7 +18,7 @@const utils = require('./utils');const { performance } = require('perf_hooks');-module.exports.describe = function({testRunner, expect, playwright, FFOX, CHROME, WEBKIT}) {+module.exports.describe = function({testRunner, expect, playwright, FFOX, CHROMIUM, WEBKIT}) {const {describe, xdescribe, fdescribe} = testRunner;const {it, fit, xit, dit} = testRunner;const {beforeAll, beforeEach, afterAll, afterEach} = testRunner;@@ -116,7 +116,7 @@ module.exports.describe = function({testRunner, expect, playwright, FFOX, CHROMElet error = null;await page.goto(server.EMPTY_PAGE).catch(e => error = e);expect(error).not.toBe(null);- if (CHROME)+ if (CHROMIUM)expect(error.message).toContain('net::ERR_ABORTED');elseexpect(error.message).toContain('NS_BINDING_ABORTED');@@ -136,7 +136,7 @@ module.exports.describe = function({testRunner, expect, playwright, FFOX, CHROMEit('should fail when navigating to bad url', async({page, server}) => {let error = null;await page.goto('asdfasdf').catch(e => error = e);- if (CHROME || WEBKIT)+ if (CHROMIUM || WEBKIT)expect(error.message).toContain('Cannot navigate to invalid URL');elseexpect(error.message).toContain('Invalid url');@@ -170,7 +170,7 @@ module.exports.describe = function({testRunner, expect, playwright, FFOX, CHROMEit('should fail when main resources failed to load', async({page, server}) => {let error = null;await page.goto('http://localhost:44123/non-existing-url').catch(e => error = e);- if (CHROME)+ if (CHROMIUM)expect(error.message).toContain('net::ERR_CONNECTION_REFUSED');else if (WEBKIT)expect(error.message).toContain('Could not connect');@@ -889,7 +889,7 @@ module.exports.describe = function({testRunner, expect, playwright, FFOX, CHROME});function expectSSLError(errorMessage) {- if (CHROME) {+ if (CHROMIUM) {expect(errorMessage).toContain('net::ERR_CERT_AUTHORITY_INVALID');} else if (WEBKIT) {if (process.platform === 'darwin')diff --git a/test/network.spec.js b/test/network.spec.jsindex 91e1dcee0d..f63fc1e7f8 100644--- a/test/network.spec.js+++ b/test/network.spec.js@@ -19,7 +19,7 @@ const fs = require('fs');const path = require('path');const utils = require('./utils');-module.exports.describe = function({testRunner, expect, FFOX, CHROME, WEBKIT}) {+module.exports.describe = function({testRunner, expect, FFOX, CHROMIUM, WEBKIT}) {const {describe, xdescribe, fdescribe} = testRunner;const {it, fit, xit, dit} = testRunner;const {beforeAll, beforeEach, afterAll, afterEach} = testRunner;@@ -77,7 +77,7 @@ module.exports.describe = function({testRunner, expect, FFOX, CHROME, WEBKIT}) {describe('Request.headers', function() {it('should work', async({page, server}) => {const response = await page.goto(server.EMPTY_PAGE);- if (CHROME)+ if (CHROMIUM)expect(response.request().headers()['user-agent']).toContain('Chrome');else if (FFOX)expect(response.request().headers()['user-agent']).toContain('Firefox');@@ -245,7 +245,7 @@ module.exports.describe = function({testRunner, expect, FFOX, CHROME, WEBKIT}) {expect(failedRequests[0].url()).toContain('one-style.css');expect(failedRequests[0].response()).toBe(null);expect(failedRequests[0].resourceType()).toBe('stylesheet');- if (CHROME) {+ if (CHROMIUM) {expect(failedRequests[0].failure().errorText).toBe('net::ERR_INVALID_HTTP_RESPONSE');} else if (WEBKIT) {if (process.platform === 'darwin')diff --git a/test/page.spec.js b/test/page.spec.jsindex 3a2fcb9be8..6f4ddd18b7 100644--- a/test/page.spec.js+++ b/test/page.spec.js@@ -19,7 +19,7 @@ const path = require('path');const utils = require('./utils');const {waitEvent} = utils;-module.exports.describe = function({testRunner, expect, headless, playwright, FFOX, CHROME, WEBKIT}) {+module.exports.describe = function({testRunner, expect, headless, playwright, FFOX, CHROMIUM, WEBKIT}) {const {describe, xdescribe, fdescribe} = testRunner;const {it, fit, xit, dit} = testRunner;const {beforeAll, beforeEach, afterAll, afterEach} = testRunner;@@ -50,7 +50,7 @@ module.exports.describe = function({testRunner, expect, headless, playwright, FFconst dialog = await waitEvent(newPage, 'dialog');expect(dialog.type()).toBe('beforeunload');expect(dialog.defaultValue()).toBe('');- if (CHROME)+ if (CHROMIUM)expect(dialog.message()).toBe('');else if (WEBKIT)expect(dialog.message()).toBe('Leave?');@@ -113,7 +113,7 @@ module.exports.describe = function({testRunner, expect, headless, playwright, FFit('should throw when page crashes', async({page}) => {let error = null;page.on('error', err => error = err);- if (CHROME)+ if (CHROMIUM)page.goto('chrome://crash').catch(e => {});else if (WEBKIT)page._delegate._session.send('Page.crash', {}).catch(e => {});@@ -674,7 +674,7 @@ module.exports.describe = function({testRunner, expect, headless, playwright, FFexpect(await page.evaluate(() => __injected)).toBe(42);});- (CHROME || FFOX) && it('should include sourceURL when path is provided', async({page, server}) => {+ (CHROMIUM || FFOX) && it('should include sourceURL when path is provided', async({page, server}) => {await page.goto(server.EMPTY_PAGE);await page.addScriptTag({ path: path.join(__dirname, 'assets/injectedfile.js') });const result = await page.evaluate(() => __injectedError.stack);diff --git a/test/playwright.spec.js b/test/playwright.spec.jsindex 0b7ac2ff77..db42e3016b 100644--- a/test/playwright.spec.js+++ b/test/playwright.spec.js@@ -29,7 +29,7 @@ module.exports.describe = ({testRunner, product, playwrightPath}) => {const {it, fit, xit, dit} = testRunner;const {beforeAll, beforeEach, afterAll, afterEach} = testRunner;- const CHROME = product === 'Chromium';+ const CHROMIUM = product === 'Chromium';const FFOX = product === 'Firefox';const WEBKIT = product === 'WebKit';const MAC = os.platform() === 'darwin';@@ -76,7 +76,7 @@ module.exports.describe = ({testRunner, product, playwrightPath}) => {product,FFOX,WEBKIT,- CHROME,+ CHROMIUM,MAC,LINUX,WIN,@@ -170,14 +170,14 @@ module.exports.describe = ({testRunner, product, playwrightPath}) => {testRunner.loadTests(require('./geolocation.spec.js'), testOptions);testRunner.loadTests(require('./workers.spec.js'), testOptions);- if (CHROME) {+ if (CHROMIUM) {testRunner.loadTests(require('./chromium/chromium.spec.js'), testOptions);testRunner.loadTests(require('./chromium/coverage.spec.js'), testOptions);testRunner.loadTests(require('./chromium/pdf.spec.js'), testOptions);testRunner.loadTests(require('./chromium/session.spec.js'), testOptions);}- if (CHROME || FFOX) {+ if (CHROMIUM || FFOX) {testRunner.loadTests(require('./features/permissions.spec.js'), testOptions);}@@ -187,7 +187,7 @@ module.exports.describe = ({testRunner, product, playwrightPath}) => {testRunner.loadTests(require('./browser.spec.js'), testOptions);testRunner.loadTests(require('./browsercontext.spec.js'), testOptions);testRunner.loadTests(require('./ignorehttpserrors.spec.js'), testOptions);- if (CHROME) {+ if (CHROMIUM) {testRunner.loadTests(require('./chromium/browser.spec.js'), testOptions);}if (FFOX) {@@ -200,7 +200,7 @@ module.exports.describe = ({testRunner, product, playwrightPath}) => {testRunner.loadTests(require('./fixtures.spec.js'), testOptions);testRunner.loadTests(require('./launcher.spec.js'), testOptions);- if (CHROME) {+ if (CHROMIUM) {testRunner.loadTests(require('./chromium/connect.spec.js'), testOptions);testRunner.loadTests(require('./chromium/launcher.spec.js'), testOptions);testRunner.loadTests(require('./chromium/headful.spec.js'), testOptions);diff --git a/test/queryselector.spec.js b/test/queryselector.spec.jsindex 24908de976..7e4b70983c 100644--- a/test/queryselector.spec.js+++ b/test/queryselector.spec.js@@ -15,7 +15,7 @@* limitations under the License.*/-module.exports.describe = function({testRunner, expect, product, FFOX, CHROME, WEBKIT}) {+module.exports.describe = function({testRunner, expect, product, FFOX, CHROMIUM, WEBKIT}) {const {describe, xdescribe, fdescribe} = testRunner;const {it, fit, xit, dit} = testRunner;const {beforeAll, beforeEach, afterAll, afterEach} = testRunner;diff --git a/test/screenshot.spec.js b/test/screenshot.spec.jsindex 771ab077c1..3b48ffbc7b 100644--- a/test/screenshot.spec.js+++ b/test/screenshot.spec.js@@ -15,7 +15,7 @@* limitations under the License.*/-module.exports.describe = function({testRunner, expect, product, FFOX, CHROME, WEBKIT}) {+module.exports.describe = function({testRunner, expect, product, FFOX, CHROMIUM, WEBKIT}) {const {describe, xdescribe, fdescribe} = testRunner;const {it, fit, xit, dit} = testRunner;const {beforeAll, beforeEach, afterAll, afterEach} = testRunner;diff --git a/test/waittask.spec.js b/test/waittask.spec.jsindex 4d169b9a59..4f53b3d287 100644--- a/test/waittask.spec.js+++ b/test/waittask.spec.js@@ -17,7 +17,7 @@const utils = require('./utils');-module.exports.describe = function({testRunner, expect, product, playwright, FFOX, CHROME, WEBKIT}) {+module.exports.describe = function({testRunner, expect, product, playwright, FFOX, CHROMIUM, WEBKIT}) {const {describe, xdescribe, fdescribe} = testRunner;const {it, fit, xit, dit} = testRunner;const {beforeAll, beforeEach, afterAll, afterEach} = testRunner;diff --git a/test/web.spec.js b/test/web.spec.jsindex 12b41f0800..bf4a5e1142 100644--- a/test/web.spec.js+++ b/test/web.spec.js@@ -14,12 +14,12 @@* limitations under the License.*/-module.exports.describe = function({testRunner, expect, defaultBrowserOptions, playwright, product, CHROME, FFOX}) {+module.exports.describe = function({testRunner, expect, defaultBrowserOptions, playwright, product, CHROMIUM, FFOX}) {const {describe, xdescribe, fdescribe} = testRunner;const {it, fit, xit, dit} = testRunner;const {beforeAll, beforeEach, afterAll, afterEach} = testRunner;- (CHROME || FFOX) && describe('Web SDK', function() {+ (CHROMIUM || FFOX) && describe('Web SDK', function() {beforeAll(async state => {state.controlledBrowserServer = await playwright.launchServer({ ...defaultBrowserOptions, pipe: false });state.hostBrowserServer = await playwright.launchServer(defaultBrowserOptions);diff --git a/test/workers.spec.js b/test/workers.spec.jsindex 54e5c5510f..6498980eb0 100644--- a/test/workers.spec.js+++ b/test/workers.spec.js@@ -18,7 +18,7 @@const utils = require('./utils');const { waitEvent } = utils;-module.exports.describe = function({testRunner, expect, FFOX, CHROME, WEBKIT}) {+module.exports.describe = function({testRunner, expect, FFOX, CHROMIUM, WEBKIT}) {const {describe, xdescribe, fdescribe} = testRunner;const {it, fit, xit, dit} = testRunner;const {beforeAll, beforeEach, afterAll, afterEach} = testRunner;diff --git a/utils/protocol-types-generator/index.js b/utils/protocol-types-generator/index.jsindex d33342b3c8..e935450bb6 100644--- a/utils/protocol-types-generator/index.js+++ b/utils/protocol-types-generator/index.js@@ -5,7 +5,7 @@ const StreamZip = require('node-stream-zip');const vm = require('vm');const os = require('os');-async function generateChromeProtocol(revision) {+async function generateChromiunProtocol(revision) {const outputPath = path.join(__dirname, '..', '..', 'src', 'chromium', 'protocol.ts');if (revision.local && fs.existsSync(outputPath))return;@@ -215,4 +215,4 @@ function firefoxTypeToString(type, indent=' ') {return type['$type'];}-module.exports = {generateChromeProtocol, generateFirefoxProtocol, generateWebKitProtocol};\ No newline at end of file+module.exports = {generateChromiunProtocol, generateFirefoxProtocol, generateWebKitProtocol};\ No newline at end of file