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

Unified Diff: LayoutTests/http/tests/media/media-source/mediasource-util.js

Issue 20114005: Layout Test for basic MSE seek scenario. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Remove unused function. Created 7 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/http/tests/media/media-source/mediasource-play-then-seek-back-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/http/tests/media/media-source/mediasource-util.js
diff --git a/LayoutTests/http/tests/media/media-source/mediasource-util.js b/LayoutTests/http/tests/media/media-source/mediasource-util.js
index 456f012f4d99dc613dbdf3ac07f224d518097e76..cf97f9e6cba87db18568c35fcd669f0396995403 100644
--- a/LayoutTests/http/tests/media/media-source/mediasource-util.js
+++ b/LayoutTests/http/tests/media/media-source/mediasource-util.js
@@ -181,11 +181,27 @@
test.eventExpectations_.waitForExpectedEvents(callback);
};
+ test.waitForCurrentTimeChange = function(mediaElement, callback)
+ {
+ var initialTime = mediaElement.currentTime;
+
+ var onTimeUpdate = test.step_func(function()
+ {
+ if (mediaElement.currentTime != initialTime) {
+ mediaElement.removeEventListener('timeupdate', onTimeUpdate);
+ callback();
+ }
+ });
+
+ mediaElement.addEventListener('timeupdate', onTimeUpdate);
+ }
+
var oldTestDone = test.done.bind(test);
test.done = function()
{
- if (test.status == test.PASS)
+ if (test.status == test.PASS) {
assert_false(test.eventExpectations_.expectingEvents(), "No pending event expectations.");
+ }
oldTestDone();
};
};
« no previous file with comments | « LayoutTests/http/tests/media/media-source/mediasource-play-then-seek-back-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698