tor-browser

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

fcp-iframe.html (944B)


      1 <!DOCTYPE html>
      2 <head>
      3    <title>
      4        Performance Paint Timing Test: Not only the top level document, paints
      5        in the iframe should also generate the entry
      6    </title>
      7 </head>
      8 <body>
      9 <script src="../resources/utils.js"></script>
     10 <script src="/resources/testharness.js"></script>
     11 <script src="/resources/testharnessreport.js"></script>
     12 <script>
     13 setup({"hide_test_state": true});
     14 async_test(function (t) {
     15    assert_implements(window.PerformancePaintTiming, "Paint Timing isn't supported.");
     16    window.addEventListener('message', t.step_func(e => {
     17        if (e.data.entryType == "paint" && e.data.name == "first-contentful-paint") {
     18            t.done();
     19        }
     20    }));
     21    const iframe = document.createElement('iframe');
     22    iframe.src = '../resources/subframe-painting.html';
     23    document.body.appendChild(iframe);
     24 }, 'Parent frame ignores paint-timing events fired from child image rendering.');
     25 </script>
     26 </body>
     27 </html>