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 a65e90962512472434995475ea17f9f17596622c..4306546cbee0e2889b9a7e557b135812cfe933bc 100644 |
--- a/LayoutTests/http/tests/media/media-source/mediasource-remove.html |
+++ b/LayoutTests/http/tests/media/media-source/mediasource-remove.html |
@@ -21,6 +21,20 @@ |
test.done(); |
}, "Test remove with an negative start."); |
+ mediasource_test(function(test, mediaElement, mediaSource) |
+ { |
+ var sourceBuffer = mediaSource.addSourceBuffer(MediaSourceUtil.AUDIO_VIDEO_TYPE); |
+ |
+ [ undefined, NaN, Infinity, -Infinity ].forEach(function(item) |
+ { |
+ assert_throws(new TypeError(), function() |
+ { |
+ sourceBuffer.remove(item, 2); |
+ }, "remove"); |
+ }); |
+ |
+ test.done(); |
+ }, "Test remove with non-finite start."); |
mediasource_test(function(test, mediaElement, mediaSource) |
{ |
@@ -181,7 +195,9 @@ |
removeAppendedDataTests(function(test, sourceBuffer, bufferedRangeEnd, subType) |
{ |
- removeAndCheckBufferedRanges(test, sourceBuffer, 0, Number.POSITIVE_INFINITY, "{ }"); |
+ // Using MAX_VALUE rather than POSITIVE_INFINITY here due to lack |
+ // of 'unrestricted' on end parameter. (See comment in SourceBuffer.idl) |
+ removeAndCheckBufferedRanges(test, sourceBuffer, 0, Number.MAX_VALUE, "{ }"); |
}, "Test removing all appended data."); |
removeAppendedDataTests(function(test, sourceBuffer, bufferedRangeEnd, subType) |
@@ -216,7 +232,9 @@ |
mp4: "{ [0.000, 1.022) }", |
}; |
- removeAndCheckBufferedRanges(test, sourceBuffer, 1, Number.POSITIVE_INFINITY, expectations[subType]); |
+ // Using MAX_VALUE rather than POSITIVE_INFINITY here due to lack |
+ // of 'unrestricted' on end parameter. (See comment in SourceBuffer.idl) |
+ removeAndCheckBufferedRanges(test, sourceBuffer, 1, Number.MAX_VALUE, expectations[subType]); |
}, "Test removing the end of appended data."); |
</script> |
</body> |