tor-browser

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

preload-image-png-mislabeled-as-html-nosniff.tentative.sub.html (899B)


      1 <!DOCTYPE html>
      2 <!-- This test verifies observable CORB impact on <link rel="preload"> elements.
      3 -->
      4 <meta charset="utf-8">
      5 <script src="/resources/testharness.js"></script>
      6 <script src="/resources/testharnessreport.js"></script>
      7 <div id=log></div>
      8 
      9 <script>
     10 async_test(function(t) {
     11  // With CORB the link.onerror event will be reached
     12  // (because CORB will block the cross-origin preload).
     13  window.preloadErrorEvent = t.step_func_done();
     14 
     15  // Without CORB the link.onload event will be reached.
     16  window.preloadLoadEvent = t.unreached_func("link/preload onload event reached.");
     17 });
     18 </script>
     19 
     20 <!-- www1 is cross-origin, so the HTTP response is CORB-eligible -->
     21 <link rel="preload" as="image"
     22      onerror="window.preloadErrorEvent()"
     23      onload="window.preloadLoadEvent()"
     24      href="http://{{domains[www1]}}:{{ports[http][0]}}/fetch/corb/resources/png-mislabeled-as-html-nosniff.png">