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

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

Issue 2315113002: MSE: Throw TypeError instead of InvalidAccessError per spec update (Closed)
Patch Set: addSourceBuffer(null) is really addSourceBuffer("null") in at least Blink 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-remove.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/media/media-source/mediasource-remove.html b/third_party/WebKit/LayoutTests/http/tests/media/media-source/mediasource-remove.html
index 46b48656685e45071f47e4e891a3d9805032a45b..e7c78bc47dbf61d3cd2b64e9c4459fec66ae52fe 100644
--- a/third_party/WebKit/LayoutTests/http/tests/media/media-source/mediasource-remove.html
+++ b/third_party/WebKit/LayoutTests/http/tests/media/media-source/mediasource-remove.html
@@ -13,7 +13,9 @@
{
var sourceBuffer = mediaSource.addSourceBuffer(MediaSourceUtil.AUDIO_VIDEO_TYPE);
- assert_throws("InvalidAccessError", function()
+ mediaSource.duration = 10;
chcunningham 2016/09/07 18:36:05 Remind me again, why were these added? Edit: answ
wolenetz 2016/09/07 21:09:26 Acknowledged.
+
+ assert_throws(new TypeError(), function()
{
sourceBuffer.remove(-1, 2);
}, "remove");
@@ -25,6 +27,8 @@
{
var sourceBuffer = mediaSource.addSourceBuffer(MediaSourceUtil.AUDIO_VIDEO_TYPE);
+ mediaSource.duration = 10;
+
[ undefined, NaN, Infinity, -Infinity ].forEach(function(item)
{
assert_throws(new TypeError(), function()
@@ -42,7 +46,7 @@
mediaSource.duration = 10;
- assert_throws("InvalidAccessError", function()
+ assert_throws(new TypeError(), function()
{
sourceBuffer.remove(11, 12);
}, "remove");
@@ -56,7 +60,7 @@
mediaSource.duration = 10;
- assert_throws("InvalidAccessError", function()
+ assert_throws(new TypeError(), function()
{
sourceBuffer.remove(2, 1);
}, "remove");
@@ -69,7 +73,9 @@
{
var sourceBuffer = mediaSource.addSourceBuffer(MediaSourceUtil.AUDIO_VIDEO_TYPE);
- assert_throws("InvalidAccessError", function()
+ mediaSource.duration = 10;
+
+ assert_throws(new TypeError(), function()
{
sourceBuffer.remove(0, Number.NEGATIVE_INFINITY);
}, "remove");
@@ -81,7 +87,9 @@
{
var sourceBuffer = mediaSource.addSourceBuffer(MediaSourceUtil.AUDIO_VIDEO_TYPE);
- assert_throws("InvalidAccessError", function()
+ mediaSource.duration = 10;
+
+ assert_throws(new TypeError(), function()
{
sourceBuffer.remove(0, Number.NaN);
}, "remove");

Powered by Google App Engine
This is Rietveld 408576698