Skip to content

Commit

Permalink
add more info and use ignore-gpu-blacklist
Browse files Browse the repository at this point in the history
  • Loading branch information
greggman committed Jul 2, 2024
1 parent b6099f7 commit 7132366
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
6 changes: 5 additions & 1 deletion test/puppeteer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 => {
Expand Down
10 changes: 7 additions & 3 deletions test/tests/gpu-info.js
Original file line number Diff line number Diff line change
@@ -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', () => {
Expand Down

0 comments on commit 7132366

Please sign in to comment.