summaryrefslogtreecommitdiffstats
path: root/dom/media/webvtt/test/reftest/vtt_reflow_display-ref.html
blob: 19f3208e6b074bc74a00e80c16ba10042caf5e54 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<!DOCTYPE HTML>
<html>
<link rel="stylesheet" href="vtt_reflow_display.css">
<body>
<div class="video-player">
  <div class="video-layer">
    <video id="v1" autoplay controls></video>
  </div>
</div>
<script>
/**
 * Simply play and pause a video without any cues.
 */
async function testDisplayCueDuringFrequentReflowRef() {
  const video = document.getElementById("v1");
  video.src = "white.webm";
  video.onplay = _ => {
    video.onplay = null;
    video.pause();
    document.documentElement.removeAttribute('class');
  }
};

window.addEventListener("MozReftestInvalidate",
                        testDisplayCueDuringFrequentReflowRef);
</script>
</body>
</html>