source: trunk/LayoutTests/media/video-duration-known-after-eos.html @ 174190

Revision 126395, 1.1 KB checked in by philn@webkit.org, 2 years ago (diff)

[GTK] media/video-duration-known-after-eos.html and media/media-element-play-after-eos.html are flaky
https://bugs.webkit.org/show_bug.cgi?id=83790

Reviewed by Eric Seidel.

Refactor the tests to wait the loadedmetadata event before
starting playback and attempting any access to the duration
attribute. This is an attempt to eliminate flakyness of the tests.

  • media/media-element-play-after-eos-expected.txt:
  • media/media-element-play-after-eos.html:
  • media/video-duration-known-after-eos.html:
  • platform/gtk/TestExpectations:
Line 
1<!DOCTYPE HTML>
2
3<html>
4    <head>
5        <title>local video</title>
6
7        <script src=media-file.js></script>
8        <script src=video-test.js></script>
9
10        <script>
11            function ended()
12            {
13                testExpected("video.duration", 0, '>');
14                endTest();
15            }
16
17            function playing()
18            {
19                run("video.currentTime = video.duration - 0.2");
20            }
21
22            function loadedmetadata()
23            {
24                video.addEventListener("ended", ended);
25                video.addEventListener("playing", playing);
26
27                run("video.play()");
28            }
29
30            function start()
31            {
32                findMediaElement();
33
34                video.addEventListener("loadedmetadata", loadedmetadata);
35                video.src = findMediaFile("video", "content/test");
36                consoleWrite("");
37            }
38
39        </script>
40    </head>
41    <body onload="start()">
42        <video controls autobuffer></video>
43        <p>Tests that duration is known after playback ended.</p>
44    </body>
45</html>
46
47
Note: See TracBrowser for help on using the repository browser.