Bug 1915045 Ensure decode tasks are scheduled on BufferingState::Enter() r=media...
[gecko.git] / js / xpconnect / tests / mochitest / test_spectre_mitigations.html
blob034087324320f1ce066fa1451e11cf940926d22b
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <meta charset="utf-8">
5 <title>Tests for Spectre mitigations</title>
6 <script src="/tests/SimpleTest/SimpleTest.js"></script>
7 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
8 </head>
9 <body>
10 <script>
11 add_task(async function() {
12 const { Cu } = SpecialPowers;
13 const options = Cu.getJSTestingFunctions().getJitCompilerOptions();
15 const testMitigation = function(name) {
16 let val = options[name];
17 ok(val === 0 || val === 1, "must be valid JitOption");
18 is(Boolean(val), !SpecialPowers.useRemoteSubframes, "must be enabled if Fission is disabled");
21 testMitigation("spectre.index-masking");
22 testMitigation("spectre.object-mitigations");
23 testMitigation("spectre.string-mitigations");
24 testMitigation("spectre.value-masking");
25 });
26 </script>
27 </body>
28 </html>