From 7132366ab1cefb9ec37207764e5c2ce8a8d6e4ff Mon Sep 17 00:00:00 2001 From: Gregg Tavares Date: Tue, 2 Jul 2024 16:13:54 -0700 Subject: [PATCH] add more info and use ignore-gpu-blacklist --- test/puppeteer.js | 6 +++++- test/tests/gpu-info.js | 10 +++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/test/puppeteer.js b/test/puppeteer.js index c3f15f48..aea33018 100755 --- a/test/puppeteer.js +++ b/test/puppeteer.js @@ -39,7 +39,11 @@ function makePromiseInfo() { } async function test(port) { - const browser = await puppeteer.launch({}); + const browser = await puppeteer.launch({ + args: [ + '--ignore-gpu-blocklist', + ], + }); const page = await browser.newPage(); page.on('console', async e => { diff --git a/test/tests/gpu-info.js b/test/tests/gpu-info.js index a98ac0a9..5eade875 100644 --- a/test/tests/gpu-info.js +++ b/test/tests/gpu-info.js @@ -1,9 +1,13 @@ import {describe, it} from '../mocha-support.js'; function getGPUInfo(gl, ext) { - return ext - ? ['UNMASKED_VENDOR_WEBGL', 'UNMASKED_RENDERER_WEBGL'].map(pname => `${pname}: ${gl.getParameter(ext[pname])}`).join(',\n') - : 'unavailable'; + return JSON.stringify({ + ...(ext + ? Object.fromEntries(['UNMASKED_VENDOR_WEBGL', 'UNMASKED_RENDERER_WEBGL'].map(pname => [pname, gl.getParameter(ext[pname])])) + : { WEBGL_debug_renderer_info: 'unavailable' } + ), + ...JSON.parse(JSON.stringify(navigator.userAgentData || {})), + }, null, 2); } describe('gpu info', () => {