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"/>
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");