tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

test_spectre_mitigations.html (839B)


      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();
     14 
     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");
     19  };
     20 
     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>