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

Unified Diff: LayoutTests/media/video-seek-to-current-position.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: 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
Index: LayoutTests/media/video-seek-to-current-position.html
diff --git a/LayoutTests/media/video-seek-to-current-position.html b/LayoutTests/media/video-seek-to-current-position.html
new file mode 100644
index 0000000000000000000000000000000000000000..6c850303984a053999ef7de78dd7e37ac45c2a5f
--- /dev/null
+++ b/LayoutTests/media/video-seek-to-current-position.html
@@ -0,0 +1,56 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>Test that seeking attribute is true immediately after a seek
philipj_slow 2015/08/04 11:16:47 Can you check if this tests anything not covered b
Srirama 2015/08/04 12:03:21 The purpose of this test is to check if the seekin
philipj_slow 2015/08/04 13:04:45 That issue I think affects Blink, that's how I not
Srirama 2015/08/04 15:02:56 Done.
+ to the current position, and goes back to false when the seek completes.</title>
+
+ <script src="media-file.js"></script>
+ <script src="video-test.js"></script>
+ <script>
+ var video;
+ var seekedCount = 0;
+ var seekTime = 1;
+
+ function onload()
+ {
+ video = document.querySelector("video");
+ video.src = findMediaFile("video", "content/test");
+ waitForEventOnce('loadedmetadata', loadedmetadata);
+ waitForEvent('seeking');
+ waitForEvent('timeupdate');
+ waitForEvent('seeked', seeked);
+ }
+
+ function loadedmetadata()
+ {
+ run("video.currentTime = seekTime");
+ testExpected("video.seeking", true);
+ consoleWrite("");
+ }
+
+ function seeked()
+ {
+ ++seekedCount;
+ consoleWrite("");
+
+ testExpected("video.seeking", false);
+ testExpected("video.currentTime", seekTime);
+
+ if (seekedCount == 2) {
+ endTest();
+ return;
+ }
+
+ run("video.currentTime = seekTime");
+ testExpected("video.seeking", true);
+
+ consoleWrite("");
+ }
+ </script>
+ </head>
+ <body onload="onload()">
+ <p>Test that seeking attribute is true immediately after a seek
+ to the current position, and goes back to false when the seek completes.</p>
+ <video></video>
+ </body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698