Bug 1935611 - Fix libyuv/libpng link failed for loongarch64. r=glandium,tnikkel,ng
[gecko.git] / dom / canvas / test / test_offscreencanvas_sizechange.html
blob9763cc7dad4f00b6b39d9d2c370d273fb953c763
1 <!DOCTYPE HTML>
2 <html>
3 <head>
4 <title>WebGL in OffscreenCanvas</title>
5 <script src="/tests/SimpleTest/SimpleTest.js"></script>
6 <link rel="stylesheet" href="/tests/SimpleTest/test.css">
7 </head>
8 <body>
9 <canvas id="c" width="64" height="64"></canvas>
10 <script>
12 SimpleTest.waitForExplicitFinish();
14 function runTest() {
16 var htmlCanvas = document.getElementById("c");
17 var worker = new Worker("offscreencanvas.js");
19 worker.onmessage = function(evt) {
20 var msg = evt.data || {};
21 if (msg.type == "test") {
22 ok(msg.result, msg.name);
24 if (msg.type == "finish") {
25 worker.terminate();
26 SimpleTest.finish();
30 var offscreenCanvas = htmlCanvas.transferControlToOffscreen();
31 worker.postMessage({test: 'webgl_changesize', canvas: offscreenCanvas}, [offscreenCanvas]);
34 SpecialPowers.pushPrefEnv({'set': [
35 ['webgl.force-enabled', true],
36 ]}, runTest);
38 </script>
39 </body>
40 </html>