tor-browser

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

cross-origin-script-no-cors.sub.html (796B)


      1 <!DOCTYPE html>
      2 <html>
      3 <head>
      4  <script src="/resources/testharness.js"></script>
      5  <script src="/resources/testharnessreport.js"></script>
      6 
      7  <script src="resources/profile-utils.js"></script>
      8 
      9  <script src="https://{{hosts[alt][]}}:{{ports[https][0]}}/js-self-profiling/resources/profiling-script.js"></script>
     10 </head>
     11 <body>
     12  <script>
     13    promise_test(async t => {
     14      const trace = await ProfilingScript.profileBuiltinsInNewTask();
     15 
     16      // Ensure that no signal from the external script was gathered.
     17      assert_equals(trace.resources.length, 0);
     18      assert_equals(trace.frames.length, 0);
     19      assert_equals(trace.stacks.length, 0);
     20      assert_greater_than(trace.samples.length, 0);
     21    }, 'no-cors cross-origin script execution is not observable');
     22  </script>
     23 </body>
     24 </html>