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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/media/media-source/mediasource-addsourcebuffer.html

Issue 2226443002: Support multiple media tracks in MSE / ChunkDemuxer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mp4 format is not supported on some trybots, so use webm Created 4 years, 3 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-addsourcebuffer.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/media/media-source/mediasource-addsourcebuffer.html b/third_party/WebKit/LayoutTests/http/tests/media/media-source/mediasource-addsourcebuffer.html
index 2fe975473577e630e711e79848d6ac0d7b5f6045..d9d0eb23639f9a3fc3019d6bbd4f11de5fadbdc9 100644
--- a/third_party/WebKit/LayoutTests/http/tests/media/media-source/mediasource-addsourcebuffer.html
+++ b/third_party/WebKit/LayoutTests/http/tests/media/media-source/mediasource-addsourcebuffer.html
@@ -134,24 +134,18 @@
test.done();
}, "Test addSourceBuffer() with AAC and H.264 in separate SourceBuffers");
- mediasource_test(function(test, mediaElement, mediaSource)
+ mediasource_testafterdataloaded(function(test, mediaElement, mediaSource, segmentInfo, sourceBuffer, mediaData)
{
- var reachedLimit = false;
-
- // The 20 here is an arbitrary upper limit to make sure the test terminates. This test
- // assumes that implementations won't support more than 20 SourceBuffers simultaneously.
- for (var i = 0; i < 20; ++i) {
- try {
- mediaSource.addSourceBuffer(MediaSourceUtil.AUDIO_VIDEO_TYPE);
- } catch(e) {
- assert_equals(e.name, "QuotaExceededError");
- reachedLimit = true;
- break;
- }
- }
- assert_true(reachedLimit, "Reached SourceBuffer limit.");
- test.done();
- }, "Test addSourceBuffer() QuotaExceededError.");
+ sourceBuffer.appendBuffer(mediaData);
+ test.expectEvent(sourceBuffer, "updateend");
+ test.waitForExpectedEvents(function()
+ {
+ assert_throws({name: "QuotaExceededError"},
+ function() { mediaSource.addSourceBuffer(MediaSourceUtil.AUDIO_VIDEO_TYPE); },
+ "addSourceBuffer must throw an exception if the MediaSource has already got some data");
+ test.done();
+ });
+ }, "Test addSourceBuffer() throws QuotaExceededError after data has been appended.");
wolenetz 2016/09/13 21:03:14 nit: change this to be similar to the unit test: o
servolk 2016/09/14 18:15:27 Wait. First, there's only one sourceBuffer here, t
wolenetz 2016/09/14 23:31:21 I'm being a little pedantic here, but tests kind o
wolenetz 2016/09/14 23:34:28 mediasource-util.js includes a helper for this. Us
servolk 2016/09/15 00:18:32 Ah, ok, I see what you mean now. Done. I guess we
</script>
</body>
</html>

Powered by Google App Engine
This is Rietveld 408576698