Bug 1915045 Ensure decode tasks are scheduled on BufferingState::Enter() r=media...
[gecko.git] / js / xpconnect / tests / mochitest / test_class_static_block_worker.html
blobe3ce063fe9a4239b5e3cdfed50c04d13541dcc02
1 <!DOCTYPE HTML>
2 <html>
3 <head>
4 <meta charset="utf-8">
5 <title>Test class static fields</title>
6 <script src="/tests/SimpleTest/SimpleTest.js"></script>
7 <script type="application/javascript">
8 // Make sure static classes parse in regular context too:
9 class B {
10 static { this.x = 12; }
12 is(B.x, 12, "static block set class value");
13 console.log("script");
14 function go() {
15 SimpleTest.waitForExplicitFinish();
17 let worker = new Worker('class_static_worker.js');
19 console.log("message")
20 worker.onmessage = function(e) {
22 is(e.data, 12, "correctly allocated class-static containing-class in worker");
23 SimpleTest.finish();
25 worker.postMessage("get");
26 info("Messages posted");
28 go();
29 </script>
30 </head>
32 </html>