summaryrefslogtreecommitdiffstats
path: root/dom/media/test/test_vp9_superframes.html
blob: c570561b3194ecb62ce8391b22d79e1a9ded2cae (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
29
30
31
<!DOCTYPE HTML>
<html>
<head>
  <title>Test that all VP9 frames are decoded (contains superframes)</title>
  <script src="/tests/SimpleTest/SimpleTest.js"></script>
  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
</head>
<body>
<pre id="test">
<script class="testbody" type="text/javascript">

SimpleTest.waitForExplicitFinish();

function test() {
  var video = document.createElement("video");
  video.src = "vp9-superframes.webm";
  video.play();
  video.addEventListener("ended", function () {
    let vpq = video.getVideoPlaybackQuality();
    is(vpq.totalVideoFrames, 120, "totalVideoFrames must contains 120 frames");
    SimpleTest.finish();
  });
}

addLoadEvent(function() {
  test();
});
</script>
</pre>
</body>
</html>