Chromium Code Reviews| Index: LayoutTests/media/media-controller-media-fragment-uri-consecutive-append.html |
| diff --git a/LayoutTests/media/media-controller-media-fragment-uri-consecutive-append.html b/LayoutTests/media/media-controller-media-fragment-uri-consecutive-append.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..377c513a5c6a288050526780458ba28026d9d59b |
| --- /dev/null |
| +++ b/LayoutTests/media/media-controller-media-fragment-uri-consecutive-append.html |
| @@ -0,0 +1,37 @@ |
| +<!DOCTYPE html> |
| +<html> |
| + <head> |
| + <title>Test currentTime for media controller when media fragments are added consicutively.</title> |
|
philipj_slow
2014/09/16 12:27:15
Media fragments aren't being added consecutively i
amogh.bihani
2014/09/16 13:46:01
I wanted to test whether the new media element see
philipj_slow
2014/09/16 19:18:15
Thanks, the updated test is easier to understand.
|
| + </head> |
| + <body> |
| + <video controls></video> |
|
philipj_slow
2014/09/16 12:27:15
The controls attribute is probably not needed here
amogh.bihani
2014/09/16 13:46:01
Done.
|
| + <video controls></video> |
| + <script src=media-file.js></script> |
| + <script src=video-test.js></script> |
| + <script> |
| + videos = document.getElementsByTagName("video"); |
| + video = videos[0]; |
| + video2 = videos[1]; |
| + |
| + var src = findMediaFile("video", "content/test"); |
| + video.src = src + "#t=2"; |
| + video.mediaGroup = "group"; |
| + video2.mediaGroup = "group"; |
| + controller = video.controller; |
| + |
| + setTimeout(function() { |
|
philipj_slow
2014/09/16 12:27:15
In general, never use setTimeout unless there's no
amogh.bihani
2014/09/16 13:46:01
Done.
|
| + video2.src= src; |
| + }, 500); |
| + |
| + video.addEventListener("loadeddata", function() { |
| + testExpected("video.currentTime", 2); |
| + testExpected("video2.currentTime", 0); |
| + }); |
| + video2.addEventListener("loadeddata", function() { |
| + testExpected("video.currentTime", 2); |
| + testExpected("video2.currentTime", 2); |
| + endTest(); |
| + }) |
| + </script> |
| + </body> |
| +</html> |