Skip to content

Commit

Permalink
add userAgentData
Browse files Browse the repository at this point in the history
  • Loading branch information
greggman committed Jul 3, 2024
1 parent ca51657 commit ebadabb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/tests/gpu-info.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ function objLikeToObj(objLike) {

export async function getInfo() {
const adapter = await navigator.gpu.requestAdapter();
const info = adapter?.info || await adapter?.requestAdapterInfo() || {error: 'no info'};
const title = JSON.stringify(objLikeToObj(info), null, 2);
const title = JSON.stringify({
gpu: objLikeToObj(adapter?.info || await adapter?.requestAdapterInfo() || { webgpuError: 'no info' }),
userAgentData: JSON.parse(JSON.stringify(navigator.userAgentData || { userAgentData: 'none' })),
}, null, 2);

describe('gpu info', () => {
it(title, () => {});
Expand Down

0 comments on commit ebadabb

Please sign in to comment.