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

Unified Diff: LayoutTests/media/media-controller-media-fragment-uri-initial-playback-position.html

Issue 539103002: Seeking media fragment URI before loadeddata event (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@HAVE_NOTHING
Patch Set: renaming test and addressing comments Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/media/media-controller-media-fragment-uri-initial-playback-position.html
diff --git a/LayoutTests/media/media-controller-media-fragment-uri-initial-playback-position.html b/LayoutTests/media/media-controller-media-fragment-uri-initial-playback-position.html
new file mode 100644
index 0000000000000000000000000000000000000000..7388bc71d45962b5ccfbc5d2e47bca723f0c6f81
--- /dev/null
+++ b/LayoutTests/media/media-controller-media-fragment-uri-initial-playback-position.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>Test currentTime for media controller when media element is added after a media fragment URI.</title>
+ </head>
+ <body>
+ <video></video>
+ <video></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;
+
+ video.addEventListener("loadeddata", function() {
+ testExpected("video.currentTime", 2);
+ testExpected("video2.currentTime", 0);
+ video2.src = src;
+ });
+
+ video2.addEventListener("loadeddata", function() {
+ testExpected("video.currentTime", 2);
+ testExpected("video2.currentTime", 2);
+ endTest();
+ })
+ </script>
+ </body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698