Index: LayoutTests/media/media-controller-media-fragment-uri.html |
diff --git a/LayoutTests/media/media-controller-media-fragment-uri.html b/LayoutTests/media/media-controller-media-fragment-uri.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..ebfbb507b91fced91d52fb17d20f5c255fa9093a |
--- /dev/null |
+++ b/LayoutTests/media/media-controller-media-fragment-uri.html |
@@ -0,0 +1,43 @@ |
+<!DOCTYPE html> |
+<html> |
+ <head> |
+ <script src=media-file.js></script> |
+ <script src=video-test.js></script> |
+ <script> |
+ var video2; |
philipj_slow
2014/09/10 12:25:48
Don't need these two vars, you need them to end up
amogh.bihani
2014/09/11 13:35:59
Done.
|
+ var controller; |
+ function onWindowLoad() |
+ { |
+ video = document.getElementById('video1'); |
philipj_slow
2014/09/10 12:25:48
I'd get rid of the ids and just use videos = getEl
amogh.bihani
2014/09/11 13:35:59
Done.
|
+ video2 = document.getElementById('video2'); |
+ run('controller = video.controller'); |
philipj_slow
2014/09/10 12:25:48
why run?
amogh.bihani
2014/09/11 13:35:59
Dont know... it was getting timeout without this :
|
+ |
+ var src = findMediaFile("video", "content/test"); |
+ video.src = src + "#t=2"; |
+ video2.src = src; |
+ testExpected("video.currentTime", 0); |
+ testExpected("video2.currentTime", 0); |
+ |
+ controller.addEventListener('loadedmetadata', function() |
+ { |
+ testExpected("video.currentTime", 2); |
+ testExpected("video2.currentTime", 2); |
+ testExpected("controller.currentTime", 2); |
+ }); |
+ |
+ waitForEvent('seeked', function() |
philipj_slow
2014/09/10 12:25:48
waitForEventAndEnd("seeked")
amogh.bihani
2014/09/11 13:35:59
Done.
|
+ { |
+ endTest(); |
+ }); |
+ } |
+ |
+ window.addEventListener('load', onWindowLoad, false); |
philipj_slow
2014/09/10 12:25:48
Many tests have a runTest function, I think that's
amogh.bihani
2014/09/11 13:35:59
Done.
|
+ </script> |
+ </head> |
+ <body> |
+ <p>Test currentTime of media controller when one of the element has initial start time greater than 0.</p> |
+ <video controls id="video1" mediaGroup="group"></video> |
+ <video controls id="video2" mediaGroup="group"></video> |
+ <br/> |
+ </body> |
+</html> |