tor-browser

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

observe-animated-image-webp.tentative.html (1090B)


      1 <!DOCTYPE HTML>
      2 <html>
      3 <head>
      4  <meta charset=utf-8>
      5  <title>Largest Contentful Paint: observe image.</title>
      6  <script src="/resources/testharness.js"></script>
      7  <script src="/resources/testharnessreport.js"></script>
      8  <script src="../resources/largest-contentful-paint-helpers.js"></script>
      9 </head>
     10 <body>
     11  <script>
     12    promise_test(async () => {
     13      assert_implements(window.LargestContentfulPaint,
     14                        "LargestContentfulPaint is not implemented");
     15      const beforeLoad = performance.now();
     16      // 142 is the size of the animated WebP up until the first frame.
     17      // The trickle pipe delays the response after the first frame by 1 second.
     18      const url = window.location.origin +
     19        `/images/webp-animated.webp?pipe=trickle(142:d${delay_pipe_value})`;
     20      const entry = await load_and_observe(url);
     21      // webp-animated.webp is 11 by 29.
     22      const size = 11 * 29;
     23      checkImage(entry, url, 'image_id', size, beforeLoad, ["animated"]);
     24    }, "Same origin animated image is observable and has a first frame.");
     25  </script>
     26 </body>
     27 </html>