tor-browser

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

fcp-with-rtl.html (875B)


      1 <!DOCTYPE html>
      2 <head>
      3 <title>Performance Paint Timing Test: FCP due to direction change</title>
      4 <style>
      5  #text {
      6    right: -100px;
      7    position: absolute;
      8  }
      9 
     10  body {
     11    direction: rtl;
     12  }
     13 </style>
     14 </head>
     15 <body>
     16 <script src="../resources/utils.js"></script>
     17 <script src="/resources/testharness.js"></script>
     18 <script src="/resources/testharnessreport.js"></script>
     19 <div id="text">TEXT</div>
     20 <script>
     21  setup({"hide_test_state": true});
     22  promise_test(async t => {
     23      assert_implements(window.PerformancePaintTiming, "Paint Timing isn't supported.");
     24      await new Promise(r => window.addEventListener('load', r));
     25      await assertNoFirstContentfulPaint(t);
     26      document.body.style.direction = 'ltr'
     27      await assertFirstContentfulPaint(t);
     28  }, 'FCP should fire when coordinates are negative, if within document scrollable area');
     29 </script>
     30 </body>
     31 </html>