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

Unified Diff: LayoutTests/http/tests/media/media-source/mediasource-remove.html

Issue 266453005: Apply TypeChecking to MediaSource IDLs (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Use MAX_VALUE instead of POS_INF. Created 6 years, 8 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 | « no previous file | LayoutTests/http/tests/media/media-source/mediasource-remove-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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>
« no previous file with comments | « no previous file | LayoutTests/http/tests/media/media-source/mediasource-remove-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698