tor-browser

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

marker-vm-state.https.html (872B)


      1 <!DOCTYPE html>
      2 <html>
      3 
      4 <head>
      5  <script src="/resources/testharness.js"></script>
      6  <script src="/resources/testharnessreport.js"></script>
      7 
      8  <script src="../resources/profile-utils.js"></script>
      9 </head>
     10 
     11 <body>
     12 
     13  <script>
     14    // Note: moving these function definitions will change the expected
     15    //       outcomes below.
     16    function scriptFunction(sample) {
     17      sample();
     18    }
     19  </script>
     20 
     21  <script>
     22    promise_test(async t => {
     23      // *.headers file should ensure we sesrve COOP and COEP headers.
     24      assert_true(self.crossOriginIsolated,
     25        "Cross origin isolation is required to surface markers");
     26      const trace = await ProfileUtils.profileFunction(scriptFunction);
     27 
     28      assert_true(ProfileUtils.containsSample(trace, {
     29        stackId: 7,
     30        marker: 'script'
     31      }));
     32    }, 'markers logged correctly');
     33 
     34  </script>
     35 </body>
     36 
     37 </html>