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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/media/media-source/mediasource-config-changes.js

Issue 2102323002: MSE: Experimental support for new abort and duration behavior (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 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: third_party/WebKit/LayoutTests/http/tests/media/media-source/mediasource-config-changes.js
diff --git a/third_party/WebKit/LayoutTests/http/tests/media/media-source/mediasource-config-changes.js b/third_party/WebKit/LayoutTests/http/tests/media/media-source/mediasource-config-changes.js
index 9a42df83d7c8447203a19f0b9460a84cf9b3d764..915db6471bd7d29189303df6a6bc54310d143679 100644
--- a/third_party/WebKit/LayoutTests/http/tests/media/media-source/mediasource-config-changes.js
+++ b/third_party/WebKit/LayoutTests/http/tests/media/media-source/mediasource-config-changes.js
@@ -64,11 +64,11 @@ function mediaSourceConfigChangeTest(directory, idA, idB, description)
test.waitForExpectedEvents(function()
{
// Truncate the presentation to a duration of 2 seconds.
- assert_false(sourceBuffer.updating, "sourceBuffer.updating");
+ // First, explicitly remove the media beyond 2 seconds.
+ assert_false(sourceBuffer.updating, "sourceBuffer.updating before range removal");
+ sourceBuffer.remove(2, mediaSource.duration);
- mediaSource.duration = 2;
-
- assert_true(sourceBuffer.updating, "sourceBuffer.updating");
+ assert_true(sourceBuffer.updating, "sourceBuffer.updating during range removal");
test.expectEvent(sourceBuffer, "updatestart");
test.expectEvent(sourceBuffer, "update");
test.expectEvent(sourceBuffer, "updateend");
@@ -76,6 +76,17 @@ function mediaSourceConfigChangeTest(directory, idA, idB, description)
test.waitForExpectedEvents(function()
{
+ // Complete the truncation of presentation to 2 second
+ // duration.
+ assert_false(sourceBuffer.updating, "sourceBuffer.updating prior to duration reduction");
+ mediaSource.duration = 2;
+ assert_false(sourceBuffer.updating, "sourceBuffer.updating synchronously after duration reduction");
+
+ test.expectEvent(mediaElement, "durationchange");
+ });
+
+ test.waitForExpectedEvents(function()
+ {
mediaSource.endOfStream();
if (expectResizeEvents) {

Powered by Google App Engine
This is Rietveld 408576698