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

Unified Diff: LayoutTests/media/seek-to-currentTime.html

Issue 1267953003: Re-Relanding 'Always notify the WebMediaPlayer of any seek' patch (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: copy seek-to-currentTime.html from web-platform-tests Created 5 years, 4 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
« no previous file with comments | « LayoutTests/media/media-controller-playbackrate-expected.txt ('k') | Source/core/html/HTMLMediaElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/media/seek-to-currentTime.html
diff --git a/LayoutTests/media/seek-to-currentTime.html b/LayoutTests/media/seek-to-currentTime.html
new file mode 100644
index 0000000000000000000000000000000000000000..d3291788382e1852ae7d9e0767b6cb42858bd27f
--- /dev/null
+++ b/LayoutTests/media/seek-to-currentTime.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<!-- original: https://github.com/w3c/web-platform-tests/blob/master/html/semantics/embedded-content/media-elements/seeking/seek-to-currentTime.html -->
+<title>seek to currentTime</title>
+<script src="../resources/testharness.js"></script>
+<script src="../resources/testharnessreport.js"></script>
+<script src="media-file.js"></script>
+<div id=log></div>
+<script>
+// TODO(srirama.m): Remove this test by importing the above web-platform-tests test
+async_test(function(t) {
+ var v = document.createElement('video');
+ v.src = findMediaFile('video', 'content/test');
+ v.onloadedmetadata = t.step_func(function() {
+ assert_greater_than(v.readyState, v.HAVE_NOTHING, 'readyState');
+ assert_greater_than(v.seekable.length, 0, 'seekable ranges');
+ assert_false(v.seeking, 'seeking before setting currentTime');
+ v.currentTime = v.currentTime;
+ assert_true(v.seeking, 'seeking after setting currentTime');
+ var events = [];
+ v.onseeking = v.ontimeupdate = v.onseeked = t.step_func(function(e) {
+ events.push(e.type);
+ // v.seeking can be true or false in the seeking event, see
+ // https://www.w3.org/Bugs/Public/show_bug.cgi?id=24774
+ if (e.type != 'seeking') {
+ assert_equals(v.seeking, false, 'seeking in ' + e.type + ' event');
+ }
+ if (e.type == 'seeked') {
+ assert_array_equals(events, ['seeking', 'timeupdate', 'seeked'],
+ 'fired events');
+ t.done();
+ }
+ });
+ });
+});
+</script>
« no previous file with comments | « LayoutTests/media/media-controller-playbackrate-expected.txt ('k') | Source/core/html/HTMLMediaElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698