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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/media/media-source/mediasource-appendwindow.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-appendwindow.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/media/media-source/mediasource-appendwindow.html b/third_party/WebKit/LayoutTests/http/tests/media/media-source/mediasource-appendwindow.html
index 1a9fcd91589d7d1ee26e651bc842b446c1599692..1ab354dd39fd7db2633a59dfe083c06e3c2af608 100644
--- a/third_party/WebKit/LayoutTests/http/tests/media/media-source/mediasource-appendwindow.html
+++ b/third_party/WebKit/LayoutTests/http/tests/media/media-source/mediasource-appendwindow.html
@@ -44,42 +44,42 @@
function() { sourceBuffer.appendWindowStart = Number.NaN; },
'set appendWindowStart throws an exception for Number.NaN.');
- assert_throws('InvalidAccessError',
+ assert_throws({name: 'TypeError'},
function() { sourceBuffer.appendWindowStart = 600.0; },
'set appendWindowStart throws an exception when greater than appendWindowEnd.');
- assert_throws('InvalidAccessError',
+ assert_throws({name: 'TypeError'},
function() { sourceBuffer.appendWindowStart = sourceBuffer.appendWindowEnd; },
'set appendWindowStart throws an exception when equal to appendWindowEnd.');
- assert_throws('InvalidAccessError',
+ assert_throws({name: 'TypeError'},
function() { sourceBuffer.appendWindowEnd = sourceBuffer.appendWindowStart; },
'set appendWindowEnd throws an exception when equal to appendWindowStart.');
- assert_throws('InvalidAccessError',
+ assert_throws({name: 'TypeError'},
function() { sourceBuffer.appendWindowEnd = sourceBuffer.appendWindowStart - 1; },
'set appendWindowEnd throws an exception if less than appendWindowStart.');
- assert_throws('InvalidAccessError',
+ assert_throws({name: 'TypeError'},
function() { sourceBuffer.appendWindowStart = -100.0; },
'set appendWindowStart throws an exception when less than 0.');
- assert_throws('InvalidAccessError',
+ assert_throws({name: 'TypeError'},
function() { sourceBuffer.appendWindowEnd = -100.0; },
'set appendWindowEnd throws an exception when less than 0.');
- assert_throws('InvalidAccessError',
+ assert_throws({name: 'TypeError'},
function() { sourceBuffer.appendWindowEnd = Number.NaN; },
'set appendWindowEnd throws an exception if NaN.');
- assert_throws('InvalidAccessError',
+ assert_throws({name: 'TypeError'},
function() { sourceBuffer.appendWindowEnd = undefined; },
'set appendWindowEnd throws an exception if undefined.');
assert_throws({name: 'TypeError'},
function() { sourceBuffer.appendWindowStart = undefined; },
'set appendWindowStart throws an exception if undefined.');
-
+
test.done();
}, 'Test set wrong values to appendWindowStart and appendWindowEnd.');
@@ -87,27 +87,27 @@
{
var sourceBuffer = mediaSource.addSourceBuffer(MediaSourceUtil.AUDIO_VIDEO_TYPE);
assert_true(sourceBuffer != null, 'New SourceBuffer returned');
-
+
sourceBuffer.appendWindowStart = '';
assert_true(sourceBuffer.appendWindowStart == 0, 'appendWindowStart is 0');
-
+
sourceBuffer.appendWindowStart = '10';
assert_true(sourceBuffer.appendWindowStart == 10, 'appendWindowStart is 10');
-
+
sourceBuffer.appendWindowStart = null;
- assert_true(sourceBuffer.appendWindowStart == 0, 'appendWindowStart is 0');
-
+ assert_true(sourceBuffer.appendWindowStart == 0, 'appendWindowStart is 0');
+
sourceBuffer.appendWindowStart = true;
assert_true(sourceBuffer.appendWindowStart == 1, 'appendWindowStart is 1');
-
+
sourceBuffer.appendWindowStart = false;
assert_true(sourceBuffer.appendWindowStart == 0, 'appendWindowStart is 0');
sourceBuffer.appendWindowEnd = '100';
assert_true(sourceBuffer.appendWindowEnd == 100, 'appendWindowEnd is 100');
-
+
test.done();
-
+
}, 'Test set correct values to appendWindowStart and appendWindowEnd.');
mediasource_testafterdataloaded(function(test, mediaElement, mediaSource, segmentInfo, sourceBuffer, mediaData)

Powered by Google App Engine
This is Rietveld 408576698