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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/media/video-seek-to-middle.html

Issue 2425463002: Improve HTMLMediaElement::currentTime() (Closed)
Patch Set: Merge Created 4 years, 1 month 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: third_party/WebKit/LayoutTests/http/tests/media/video-seek-to-middle.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/media/video-seek-to-middle.html b/third_party/WebKit/LayoutTests/http/tests/media/video-seek-to-middle.html
index e37af9b66a962ee069aaf03f6e87c82e955726d4..759e784ef1ef619b10ce1321cdd7d142801291ac 100644
--- a/third_party/WebKit/LayoutTests/http/tests/media/video-seek-to-middle.html
+++ b/third_party/WebKit/LayoutTests/http/tests/media/video-seek-to-middle.html
@@ -36,7 +36,13 @@ async_test(function(t) {
function testCommonAttributes(seekingExpected) {
assert_equals(video.seeking, seekingExpected);
assert_false(video.ended);
- assert_equals(video.currentTime, video.duration / 2);
+ if (seekingExpected) {
+ assert_equals(video.currentTime, video.duration / 2);
+ } else {
+ // If seek has completed, the currentTime may have advanced slightly
+ // beyond the initial seek point since the video is not paused.
+ assert_greater_than_equal(video.currentTime, video.duration / 2);
+ }
assert_false(video.paused);
}

Powered by Google App Engine
This is Rietveld 408576698