fix eslint for test/webgl.js
This commit is contained in:
parent
90b3a93424
commit
eaadf5bc2f
1 changed files with 12 additions and 12 deletions
|
|
@ -1,17 +1,17 @@
|
||||||
import { chromium } from 'patchright';
|
import { chromium } from 'patchright';
|
||||||
import { handleSIGINT, prompt } from '../src/util.js';
|
import { handleSIGINT } from '../src/util.js';
|
||||||
import { cfg } from '../src/config.js';
|
import { cfg } from '../src/config.js';
|
||||||
|
|
||||||
const context = await chromium.launchPersistentContext(cfg.dir.browser, {
|
const context = await chromium.launchPersistentContext(cfg.dir.browser, {
|
||||||
headless: false, // don't use cfg.headless headless here since SHOW=0 will lead to captcha
|
headless: false, // don't use cfg.headless headless here since SHOW=0 will lead to captcha
|
||||||
locale: 'en-US', // ignore OS locale to be sure to have english text for locators
|
locale: 'en-US', // ignore OS locale to be sure to have english text for locators
|
||||||
recordVideo: cfg.record ? { dir: 'data/record/', size: { width: cfg.width, height: cfg.height } } : undefined, // will record a .webm video for each page navigated; without size, video would be scaled down to fit 800x800
|
recordVideo: cfg.record ? { dir: 'data/record/', size: { width: cfg.width, height: cfg.height } } : undefined, // will record a .webm video for each page navigated; without size, video would be scaled down to fit 800x800
|
||||||
handleSIGINT: false, // have to handle ourselves and call context.close(), otherwise recordings from above won't be saved
|
handleSIGINT: false, // have to handle ourselves and call context.close(), otherwise recordings from above won't be saved
|
||||||
// https://peter.sh/experiments/chromium-command-line-switches/
|
// https://peter.sh/experiments/chromium-command-line-switches/
|
||||||
args: [
|
args: [
|
||||||
'--hide-crash-restore-bubble',
|
'--hide-crash-restore-bubble',
|
||||||
'--ignore-gpu-blocklist', // required for OpenGL to be enabled
|
'--ignore-gpu-blocklist', // required for OpenGL to be enabled
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
|
||||||
handleSIGINT(context);
|
handleSIGINT(context);
|
||||||
|
|
@ -21,7 +21,7 @@ await page.goto('https://get.webgl.org/');
|
||||||
console.log(await page.locator('h1').innerText());
|
console.log(await page.locator('h1').innerText());
|
||||||
await page.goto('https://webglreport.com/?v=2');
|
await page.goto('https://webglreport.com/?v=2');
|
||||||
console.log(await page.locator('tr:has-text("Unmasked Renderer")').innerText());
|
console.log(await page.locator('tr:has-text("Unmasked Renderer")').innerText());
|
||||||
console.log('Waiting. You can check chrome://gpu as well via noVNC. Press ctrl-c to quit...')
|
console.log('Waiting. You can check chrome://gpu as well via noVNC. Press ctrl-c to quit...');
|
||||||
// without --ignore-gpu-blocklist: OpenGL Disabled, WebGL: Software only, hardware acceleration unavailable.
|
// without --ignore-gpu-blocklist: OpenGL Disabled, WebGL: Software only, hardware acceleration unavailable.
|
||||||
// Unmasked Renderer: ANGLE (Mesa, llvmpipe (LLVM 15.0.7 128 bits), OpenGL 4.5)
|
// Unmasked Renderer: ANGLE (Mesa, llvmpipe (LLVM 15.0.7 128 bits), OpenGL 4.5)
|
||||||
// with --ignore-gpu-blocklist: OpenGL Enabled, WebGL: Hardware accelerated
|
// with --ignore-gpu-blocklist: OpenGL Enabled, WebGL: Hardware accelerated
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue