Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(739)

Side by Side Diff: LayoutTests/media/video-duration-known-after-eos.html

Issue 17395006: Fix LayoutTests that assume canplay, playing, and canplaythrough will only fire once. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix event-attributes expectations. Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 <!DOCTYPE HTML> 1 <!DOCTYPE HTML>
2 2
3 <html> 3 <html>
4 <head> 4 <head>
5 <title>local video</title> 5 <title>local video</title>
6 6
7 <script src=media-file.js></script> 7 <script src=media-file.js></script>
8 <script src=video-test.js></script> 8 <script src=video-test.js></script>
9 9
10 <script> 10 <script>
11 function ended() 11 function ended()
12 { 12 {
13 testExpected("video.duration", 0, '>'); 13 testExpected("video.duration", 0, '>');
14 endTest(); 14 endTest();
15 } 15 }
16 16
17 function playing() 17 function playing()
18 { 18 {
19 video.removeEventListener("playing", playing);
19 run("video.currentTime = video.duration - 0.2"); 20 run("video.currentTime = video.duration - 0.2");
20 } 21 }
21 22
22 function loadedmetadata() 23 function loadedmetadata()
23 { 24 {
24 video.addEventListener("ended", ended); 25 video.addEventListener("ended", ended);
25 video.addEventListener("playing", playing); 26 video.addEventListener("playing", playing);
26 27
27 run("video.play()"); 28 run("video.play()");
28 } 29 }
29 30
30 function start() 31 function start()
31 { 32 {
32 findMediaElement(); 33 findMediaElement();
33 34
34 video.addEventListener("loadedmetadata", loadedmetadata); 35 video.addEventListener("loadedmetadata", loadedmetadata);
35 video.src = findMediaFile("video", "content/test"); 36 video.src = findMediaFile("video", "content/test");
36 consoleWrite(""); 37 consoleWrite("");
37 } 38 }
38 39
39 </script> 40 </script>
40 </head> 41 </head>
41 <body onload="start()"> 42 <body onload="start()">
42 <video controls autobuffer></video> 43 <video controls autobuffer></video>
43 <p>Tests that duration is known after playback ended.</p> 44 <p>Tests that duration is known after playback ended.</p>
44 </body> 45 </body>
45 </html> 46 </html>
46
47
OLDNEW
« no previous file with comments | « LayoutTests/media/video-currentTime-set.html ('k') | LayoutTests/media/video-frame-size-change.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698