Bug 1935611 - Fix libyuv/libpng link failed for loongarch64. r=glandium,tnikkel,ng
[gecko.git] / dom / webgpu / mochitest / test_navigator_gpu_not_replaceable.html
blobbd6bdb719bcd38d000e545d182c60361f478097e
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."
14 const originalNavigatorGpu = navigator.gpu;
16 const BAD_GPU_VAL = "ohcrapthisisbad";
17 ok(
18 navigator.gpu !== BAD_GPU_VAL,
19 "`navigator.gpu` should never equal `BAD_GPU_VAL` (before replacement attempt)"
21 navigator.gpu = BAD_GPU_VAL;
22 ok(
23 navigator.gpu !== BAD_GPU_VAL,
24 "`navigator.gpu` should never equal `BAD_GPU_VAL` (after replacement attempt)"
26 ok(
27 navigator.gpu === originalNavigatorGpu,
28 "`navigator.gpu` should equal originally observed value after attempted replacement"
30 </script>
31 </body>
32 </html>