From ebadabb523849f346781fb29c6abcb4deaea7680 Mon Sep 17 00:00:00 2001 From: Gregg Tavares Date: Tue, 2 Jul 2024 17:21:24 -0700 Subject: [PATCH] add userAgentData --- test/tests/gpu-info.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/tests/gpu-info.js b/test/tests/gpu-info.js index 720953d..d73568a 100644 --- a/test/tests/gpu-info.js +++ b/test/tests/gpu-info.js @@ -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, () => {});