Bug 1915045 Ensure decode tasks are scheduled on BufferingState::Enter() r=media...
[gecko.git] / js / xpconnect / tests / mochitest / test_shadowRealm.html
blob311ce6810755fdebb6a7f150897c2210123466d3
1 <!DOCTYPE HTML>
2 <html>
3 <head>
4 <meta charset="utf-8">
5 <title>Test for ShadowRealms</title>
6 <script src="/tests/SimpleTest/SimpleTest.js"></script>
7 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
8 <iframe id="ifr"></iframe>
9 </head>
11 <body>
12 <p id="display"></p>
13 <script type="application/javascript">
14 SimpleTest.waitForExplicitFinish();
15 info("running")
17 let realm = new ShadowRealm();
19 let install = (fun, internal_name) => {
20 let installer = realm.evaluate(`var ${internal_name}; (x) => { ${internal_name} = x}`);
21 installer(fun);
24 install(info, "log");
25 install(is, "is");
26 realm.evaluate(`is(true, true, 'inside realm')`);
28 is(realm.evaluate("10"), 10, "ten is ten");
30 SimpleTest.finish();
31 </script>
32 </body>
34 </html>