tor-browser

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

video.html (1062B)


      1 <!DOCTYPE html>
      2 <title>Layout Instability: no shifts from advancing video track</title>
      3 <link rel="help" href="https://wicg.github.io/layout-instability/" />
      4 <script src="/resources/testharness.js"></script>
      5 <script src="/resources/testharnessreport.js"></script>
      6 <script src="resources/test-adapter.js"></script>
      7 <script src="resources/util.js"></script>
      8 <video controls>
      9  <source src="/media/white.webm" type="video/webm">
     10 </video>
     11 <script>
     12 
     13 promise_test(async () => {
     14  const watcher = new ScoreWatcher;
     15  var video = document.querySelector("video");
     16 
     17  await new Promise(resolve => { video.oncanplay = resolve; });
     18  await waitForAnimationFrames(2);
     19 
     20  // TODO(crbug.com/1088311): There are still some shifts from creating the
     21  // <video>, so the score is already > 0 here. For now, just verify that
     22  // advancing the track does not increase it further.
     23  var currentScore = watcher.score;
     24 
     25  video.currentTime = 5;
     26 
     27  await waitForAnimationFrames(3);
     28  cls_expect(watcher, {score: currentScore});
     29 
     30 }, "No shifts from advancing video track.");
     31 
     32 </script>