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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/media/media-source/mediasource-sequencemode-crbug-616565.html

Issue 2035003002: MSE: Signal new coded frame group more aggressively (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed chcunningham@'s comments from PS5 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
« no previous file with comments | « media/filters/frame_processor_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/http/tests/media/media-source/mediasource-sequencemode-crbug-616565.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/media/media-source/mediasource-sequencemode-crbug-616565.html b/third_party/WebKit/LayoutTests/http/tests/media/media-source/mediasource-sequencemode-crbug-616565.html
new file mode 100644
index 0000000000000000000000000000000000000000..fac9d0dce9ca903ecd5fb755f22b2e0a14732558
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/media/media-source/mediasource-sequencemode-crbug-616565.html
@@ -0,0 +1,71 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <script src="/w3c/resources/testharness.js"></script>
+ <script src="/w3c/resources/testharnessreport.js"></script>
+ <script src="mediasource-util.js"></script>
+ </head>
+ <body>
+ <script>
+ mediasource_testafterdataloaded(function(test, mediaElement, mediaSource, segmentInfo, sourceBuffer, mediaData)
+ {
+ assert_greater_than(segmentInfo.media.length, 3, "at least 3 media segments for supported type");
+ test.failOnEvent(mediaElement, "error");
+ sourceBuffer.mode = "sequence";
+ assert_equals(sourceBuffer.mode, "sequence", "mode after setting it to 'sequence'");
+
+ // Append all media segments, preceded by a (now redundant) initialization segment.
+ test.expectEvent(sourceBuffer, "updatestart", "media segment append started.");
+ test.expectEvent(sourceBuffer, "update", "media segment append success.");
+ test.expectEvent(sourceBuffer, "updateend", "media segment append ended.");
+ sourceBuffer.appendBuffer(mediaData);
+
+ test.waitForExpectedEvents(function()
+ {
+ // Remove much of what we just appended.
+ test.expectEvent(sourceBuffer, "updatestart", "remove started.");
+ test.expectEvent(sourceBuffer, "update", "remove success.");
+ test.expectEvent(sourceBuffer, "updateend", "remove ended.");
+ sourceBuffer.remove(segmentInfo.media[3].timecode, mediaSource.duration);
+ });
+
+ test.waitForExpectedEvents(function()
+ {
+ // Set the timestampOffset to the beginning of the region we just removed.
+ sourceBuffer.timestampOffset = segmentInfo.media[3].timecode;
+
+ // Remove everything.
+ test.expectEvent(sourceBuffer, "updatestart", "remove started.");
+ test.expectEvent(sourceBuffer, "update", "remove success.");
+ test.expectEvent(sourceBuffer, "updateend", "remove ended.");
+ sourceBuffer.remove(0, mediaSource.duration);
+ });
+
+ test.waitForExpectedEvents(function()
+ {
+ // Set the timestampOffset back to the beginning.
+ sourceBuffer.timestampOffset = 0;
+
+ // Re-append everything.
+ test.expectEvent(sourceBuffer, "updatestart", "media segment append started.");
+ test.expectEvent(sourceBuffer, "update", "media segment append success.");
+ test.expectEvent(sourceBuffer, "updateend", "media segment append ended.");
+ sourceBuffer.appendBuffer(mediaData);
+ });
+
+ test.waitForExpectedEvents(function()
+ {
+ // Use EOS to get a more precisely verifiable buffered range given our segmentInfo.
+ test.expectEvent(mediaSource, "sourceended", "mediaSource endOfStream");
+ mediaSource.endOfStream();
+ });
+
+ test.waitForExpectedEvents(function()
+ {
+ assertBufferedEquals(sourceBuffer, "{ [0.000, " + segmentInfo.duration.toFixed(3) + ") }");
+ test.done();
+ });
+ }, "Test no error for sequence mode remove and timestampOffset scenario in bug 616565");
+ </script>
+ </body>
+</html>
« no previous file with comments | « media/filters/frame_processor_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698