Update web-platform-tests to revision 10168e9a5d44efbc6e7d416d1d454eb9c9f1396c

This commit is contained in:
Josh Matthews 2018-01-31 09:13:41 -05:00
parent c88dc51d03
commit 0e1caebaf4
791 changed files with 23381 additions and 5501 deletions

View file

@ -21,7 +21,7 @@
mediasource_test(function(test, mediaElement, mediaSource)
{
assert_throws(new TypeError(),
assert_throws({name: "TypeError"},
function() { mediaSource.addSourceBuffer(""); },
"addSourceBuffer() threw an exception when passed an empty string.");
test.done();
@ -43,7 +43,6 @@
test.done();
}, "Test addSourceBuffer() with unsupported type");
mediasource_test(function(test, mediaElement, mediaSource)
{
var mimetype = 'video/webm;codecs="vp8,vorbis"';
@ -83,7 +82,7 @@
var sourceBuffer = mediaSource.addSourceBuffer(mimetype);
assert_true(sourceBuffer != null, "New SourceBuffer returned");
assert_equals(mediaSource.sourceBuffers[0], sourceBuffer, "SourceBuffer is in mediaSource.sourceBuffers");
assert_equals(mediaSource.activeSourceBuffers.length, 0, "SourceBuffer is in mediaSource.activeSourceBuffers");
assert_equals(mediaSource.activeSourceBuffers.length, 0, "SourceBuffer is not in mediaSource.activeSourceBuffers");
test.done();
}, "Test addSourceBuffer() video only");
@ -96,7 +95,7 @@
var sourceBuffer = mediaSource.addSourceBuffer(mimetype);
assert_true(sourceBuffer != null, "New SourceBuffer returned");
assert_equals(mediaSource.sourceBuffers[0], sourceBuffer, "SourceBuffer is in mediaSource.sourceBuffers");
assert_equals(mediaSource.activeSourceBuffers.length, 0, "SourceBuffer is in mediaSource.activeSourceBuffers");
assert_equals(mediaSource.activeSourceBuffers.length, 0, "SourceBuffer is not in mediaSource.activeSourceBuffers");
test.done();
}, "Test addSourceBuffer() audio only");
@ -129,26 +128,6 @@
assert_equals(mediaSource.activeSourceBuffers.length, 0, "SourceBufferB is not in mediaSource.activeSourceBuffers");
test.done();
}, "Test addSourceBuffer() with AAC and H.264 in separate SourceBuffers");
mediasource_test(function(test, mediaElement, mediaSource)
{
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.");
</script>
</body>
</html>

View file

@ -5,7 +5,6 @@
<title>MediaSource.isTypeSupported() test cases.</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="mediasource-util.js"></script>
</head>
<body>
<div id="log"></div>
@ -32,6 +31,7 @@
'video/webm;codecs="',
'video/webm;codecs=""',
'video/webm;codecs=","',
'unsupported_mediatype',
'',
null
], false, 'Test invalid MIME format');
@ -45,15 +45,12 @@
test_type_support([
'audio/webm;codecs="vp8"',
'audio/mp4;codecs="avc1.4d001e"',
], false, 'Test invalid mismatch between major type and codec ID');
test_type_support([
'audio/mp4;codecs="vorbis"',
'audio/webm;codecs="mp4a.40.2"',
'video/mp4;codecs="vp8"',
'video/webm;codecs="mp4a.40.2"',
'video/mp4;codecs="vorbis"',
], false, 'Test invalid mismatch between minor type and codec ID');
'video/webm;codecs="mp4a.40.2"',
], false, 'Test invalid mismatch between MIME type and codec ID');
test_type_support([
'audio/mp4;codecs="mp4a"',