Backed out changeset 7272b7396c78 (bug 1932758) for causing fenix debug failures...
[gecko.git] / dom / canvas / test / webgl-conf / checkout / conformance / offscreencanvas / context-lost-restored-worker.html
blob62d6ef60a50fce0dfeac6b3549d998f1e4be4577
1 <!--
2 Copyright (c) 2019 The Khronos Group Inc.
3 Use of this source code is governed by an MIT-style license that can be
4 found in the LICENSE.txt file.
5 -->
6 <!DOCTYPE html>
7 <html>
8 <head>
9 <meta charset="utf-8">
10 <link rel="stylesheet" href="../../resources/js-test-style.css"/>
11 <script src="../../js/js-test-pre.js"></script>
12 <script src="../../js/webgl-test-utils.js"></script>
13 <script>
14 function init()
16 description("Tests behavior under a restored context for OffscreenCanvas in a worker.");
18 if (!window.OffscreenCanvas) {
19 testPassed("No OffscreenCanvas support");
20 finishTest();
21 return;
24 var worker = new Worker('context-lost-restored-worker.js');
25 worker.postMessage("Start worker");
26 worker.onmessage = function(e) {
27 if (e.data == "Test passed") {
28 testPassed("All tests have passed");
29 } else {
30 testFailed("Some test failed");
32 finishTest();
33 return;
37 </script>
38 </head>
39 <body onload="init()">
40 <div id="description"></div>
41 <div id="console"></div>
42 </body>
43 </html>