diff options
Diffstat (limited to 'testing/web-platform/tests/html/semantics/embedded-content/media-elements/media_fragment_seek.html')
-rw-r--r-- | testing/web-platform/tests/html/semantics/embedded-content/media-elements/media_fragment_seek.html | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/semantics/embedded-content/media-elements/media_fragment_seek.html b/testing/web-platform/tests/html/semantics/embedded-content/media-elements/media_fragment_seek.html new file mode 100644 index 0000000000..2a0106ce16 --- /dev/null +++ b/testing/web-platform/tests/html/semantics/embedded-content/media-elements/media_fragment_seek.html @@ -0,0 +1,49 @@ +<!doctype html> +<meta charset="utf-8"> +<meta name="timeout" content="long"> +<title>Video should seek to time specified in media fragment syntax</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/common/media.js"></script> +<div id="log"></div> +<video id="video"></video> +<script> +async_test(function () { + let video = document.getElementById("video"); + video.src = getVideoURI('/media/movie_5') + "#t=4,7"; + video.load(); + this.step_timeout(function () { + assert_equals(video.currentTime, 4.0); + + video.src = getVideoURI('/media/movie_5') + "#t=%6Ept:3"; + video.load(); + this.step_timeout(function () { + assert_true(video.src.endsWith("t=%6Ept:3")); + assert_equals(video.currentTime, 3.0); + + video.src = getVideoURI('/media/movie_5') + "#t=00:00:01.00"; + video.load(); + this.step_timeout(function () { + assert_true(video.src.endsWith("t=00:00:01.00")); + assert_equals(video.currentTime, 1.0); + + video.src = getVideoURI('/media/movie_5') + "#u=12&t=3"; + video.load(); + this.step_timeout(function () { + assert_true(video.src.endsWith("#u=12&t=3")); + assert_equals(video.currentTime, 3.0); + + video.src = getVideoURI('/media/movie_5') + "#t=npt%3A3"; + video.load(); + this.step_timeout(function () { + assert_true(video.src.endsWith("t=npt%3A3")); + assert_equals(video.currentTime, 3.0); + this.done(); + }, 1000); + }, 1000); + }, 1000); + }, 1000); + }, 1000); +}); +</script> + |