Bug 1935611 - Fix libyuv/libpng link failed for loongarch64. r=glandium,tnikkel,ng
[gecko.git] / dom / webgpu / mochitest / test_device_creation.html
blob0785c8288554c77ffd3edb6d97e6f4518299c152
1 <!doctype html>
2 <html>
3 <head>
4 <meta charset="utf-8" />
5 <script src="/tests/SimpleTest/SimpleTest.js"></script>
6 <link rel="stylesheet" href="/tests/SimpleTest/test.css" />
7 </head>
8 <body>
9 <script>
10 ok(
11 SpecialPowers.getBoolPref("dom.webgpu.enabled"),
12 "Pref should be enabled."
15 const func = async function () {
16 const adapter = await navigator.gpu.requestAdapter();
17 const limits = adapter.limits;
18 const features = adapter.features;
19 const device = await adapter.requestDevice();
20 ok(device !== undefined, "device !== undefined");
23 SimpleTest.waitForExplicitFinish();
24 func()
25 .catch(e => ok(false, "Unhandled exception " + e))
26 .finally(() => SimpleTest.finish());
27 </script>
28 </body>
29 </html>