Bug 1943761 - Add class alignment to the mozsearch analysis file. r=asuth
[gecko.git] / dom / media / webvtt / test / mochitest / test_webvtt_infinite_processing_loop.html
blobc8a9380ca2a013ffa2e7da29b291ada52acb5db9
1 <!DOCTYPE HTML>
2 <html>
3 <head>
4 <title>Bug 1580015 - video hangs infinitely during playing subtitle</title>
5 <script src="/tests/SimpleTest/SimpleTest.js"></script>
6 <script type="text/javascript" src="manifest.js"></script>
7 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
8 <style>
9 .container {
10 width: 500px;
11 height: 300px;
12 background: pink;
13 display: flex;
14 justify-content: center;
17 video {
18 min-width: 95%;
19 max-width: 95%;
20 max-height: 95%;
22 </style>
23 </head>
24 <body>
25 <div class="container">
26 <video id="v" src="gizmo.mp4" controls>
27 <track src="basic.vtt" kind="subtitles" default>
28 </video>
29 </div>
30 <script type="text/javascript">
31 /**
32 * This test is used to ensure that we don't go into an infinite processing loop
33 * during playing subtitle when setting those CSS properties on video.
35 SimpleTest.waitForExplicitFinish();
37 let video = document.getElementById("v");
38 // We don't need to play whole video, in order to reduce test time, we can start
39 // from the half, which can also reproduce the issue.
40 video.currentTime = 3.0;
41 video.play();
42 video.onended = () => {
43 ok(true, "video ends without entering an infinite processing loop");
44 SimpleTest.finish();
47 </script>
48 </body>
49 </html>