tor-browser

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

preloader-css-import.html (1082B)


      1 <!DOCTYPE html>
      2 <meta charset="utf-8">
      3 <script src="/resources/testharness.js"></script>
      4 <script src="/resources/testharnessreport.js"></script>
      5 <script>
      6    var t = async_test('Imported inline CSS is not blocked on pending CSS');
      7 </script>
      8 <link rel=stylesheet href="resources/dummy.css?first-preloader-css-import&pipe=trickle(d1)">
      9 <script>
     10    var this_script_is_necessary_to_block_the_inline_style_processing = true;
     11 </script>
     12 <style>
     13 @import url("resources/dummy.css?second-preloader-css-import");
     14 </style>
     15 <script>
     16    window.addEventListener("load", t.step_func_done(() => {
     17        let entries = performance.getEntriesByType('resource');
     18        let first;
     19        let second;
     20        for (entry of entries) {
     21            if (entry.name.includes("first")) {
     22                first = entry;
     23            }
     24            if (entry.name.includes("second")) {
     25                second = entry;
     26            }
     27        }
     28        assert_true(first.responseEnd > second.startTime, "The second resource start time should not be blocked on the first resource response");
     29    }));
     30 </script>