Skip to content

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

chore: replace CHROME with CHROMIUM (#465)

Yury Semikhatsky778ab3deff71
diff --git a/docs/api.md b/docs/api.md
index 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 accessibility
Accessibility 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 users
access 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.js
index 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.ts
index 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.js
index 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: true
diff --git a/test/assets/beforeunload.html b/test/assets/beforeunload.html
index 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.js
index 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.js
index 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.js
index 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.js
index 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.js
index 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.js
index 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.js
index 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.js
index 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.js
index 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, CHROME
await 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.js
index 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.js
index 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.js
index 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.js
index 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.js
index 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.js
index 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.js
index 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.js
index 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.js
index 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.js
index 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, p
expect(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, p
expect(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, p
let 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.js
index 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.js
index 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, MA
await 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, MA
await 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.js
index 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.js
index 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, CHROME
let 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');
else
expect(error.message).toContain('NS_BINDING_ABORTED');
@@ -136,7 +136,7 @@ module.exports.describe = function({testRunner, expect, playwright, FFOX, CHROME
it('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');
else
expect(error.message).toContain('Invalid url');
@@ -170,7 +170,7 @@ module.exports.describe = function({testRunner, expect, playwright, FFOX, CHROME
it('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.js
index 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.js
index 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, FF
const 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, FF
it('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, FF
expect(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.js
index 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.js
index 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.js
index 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.js
index 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.js
index 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.js
index 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.js
index 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