tor-browser

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

observe-video.tentative.html (1220B)


      1 <!DOCTYPE HTML>
      2 <html>
      3 <head>
      4  <meta charset=utf-8>
      5  <title>Largest Contentful Paint: observe video.</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      // 136 is the size of the animated GIF 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                  `/media/test-1s.webm?pipe=trickle(1500:d${delay_pipe_value})`;
     20      const entry = await load_video_and_observe(url);
     21      // Video is 320 x 184.
     22      const size = 320 * 184;
     23      // TODO(yoav): Validate size as well as load and render times. "skip" is
     24      // currently causing those checks to be skipped.
     25      checkImage(entry, url, 'video_id', size, beforeLoad, ["skip"]);
     26    }, "Same origin animated image is observable and has a first frame.");
     27  </script>
     28 </body>
     29 </html>