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

Unified Diff: LayoutTests/http/tests/media/media-source/mediasource-remove.html

Issue 319213002: Fix MediaSource.duration setter behavior to match the current spec. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 6 years, 6 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/http/tests/media/media-source/mediasource-remove.html
diff --git a/LayoutTests/http/tests/media/media-source/mediasource-remove.html b/LayoutTests/http/tests/media/media-source/mediasource-remove.html
index 4306546cbee0e2889b9a7e557b135812cfe933bc..f6df6edbd5632130fefab10aa5fac1983c3dfbc1 100644
--- a/LayoutTests/http/tests/media/media-source/mediasource-remove.html
+++ b/LayoutTests/http/tests/media/media-source/mediasource-remove.html
@@ -129,6 +129,34 @@
});
}, "Test aborting a remove operation.");
+ mediasource_testafterdataloaded(function(test, mediaElement, mediaSource, segmentInfo, sourceBuffer, mediaData)
+ {
+ sourceBuffer.appendBuffer(mediaData);
+
+ test.expectEvent(sourceBuffer, "updatestart");
+ test.expectEvent(sourceBuffer, "update");
+ test.expectEvent(sourceBuffer, "updateend");
+
+ test.waitForExpectedEvents(function()
+ {
+ mediaSource.duration = 10;
philipj_slow 2014/06/16 13:26:19 Can you assert_less_than(mediaSource.duration, 10)
acolwell GONE FROM CHROMIUM 2014/06/17 01:24:02 Done.
+
+ assert_false(sourceBuffer.updating, "updating");
philipj_slow 2014/06/16 13:26:18 nit: misindented from here
acolwell GONE FROM CHROMIUM 2014/06/17 01:24:02 Done.
+
+ sourceBuffer.remove(mediaSource.duration, mediaSource.duration + 2);
+
+ assert_true(sourceBuffer.updating, "updating");
+ test.expectEvent(sourceBuffer, "updatestart");
+ test.expectEvent(sourceBuffer, "update");
+ test.expectEvent(sourceBuffer, "updateend");
+ });
+
+ test.waitForExpectedEvents(function()
+ {
+ test.done();
+ });
+
+ }, "Test remove with a start at the duration.");
mediasource_testafterdataloaded(function(test, mediaElement, mediaSource, segmentInfo, sourceBuffer, mediaData)
{

Powered by Google App Engine
This is Rietveld 408576698