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

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

Issue 212953004: Have SourceBuffer throw TypeError for non-finite doubles. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 9 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: LayoutTests/http/tests/media/media-source/mediasource-timestamp-offset.html
diff --git a/LayoutTests/http/tests/media/media-source/mediasource-timestamp-offset.html b/LayoutTests/http/tests/media/media-source/mediasource-timestamp-offset.html
index 7a52c62134d68ffaf5b7e3226ffc678c4791a299..7e7a3d383eeab0d6df81a1530ad63aa0e12f9264 100644
--- a/LayoutTests/http/tests/media/media-source/mediasource-timestamp-offset.html
+++ b/LayoutTests/http/tests/media/media-source/mediasource-timestamp-offset.html
@@ -16,8 +16,8 @@
var segmentInfo = MediaSourceUtil.SEGMENT_INFO;
var sourceBuffer = mediaSource.addSourceBuffer(segmentInfo.type);
- if (expected == 'TypeMismatchError') {
- assert_throws('TypeMismatchError',
+ if (expected == 'TypeError') {
+ assert_throws({name: 'TypeError'},
function() { sourceBuffer.timestampOffset = value; },
'setting timestampOffset to ' + description + ' throws an exception.');
} else {
@@ -32,10 +32,10 @@
simpleTimestampOffsetTest(10.5, 10.5, 'a positive number');
simpleTimestampOffsetTest(-10.4, -10.4, 'a negative number');
simpleTimestampOffsetTest(0, 0, 'zero');
- simpleTimestampOffsetTest(Number.POSITIVE_INFINITY, 'TypeMismatchError', 'positive infinity');
- simpleTimestampOffsetTest(Number.NEGATIVE_INFINITY, 'TypeMismatchError', 'negative infinity');
- simpleTimestampOffsetTest(Number.NaN, 'TypeMismatchError', 'NaN');
- simpleTimestampOffsetTest(undefined, 'TypeMismatchError', 'undefined');
+ simpleTimestampOffsetTest(Number.POSITIVE_INFINITY, 'TypeError', 'positive infinity');
+ simpleTimestampOffsetTest(Number.NEGATIVE_INFINITY, 'TypeError', 'negative infinity');
+ simpleTimestampOffsetTest(Number.NaN, 'TypeError', 'NaN');
+ simpleTimestampOffsetTest(undefined, 'TypeError', 'undefined');
simpleTimestampOffsetTest(null, 0, 'null');
simpleTimestampOffsetTest(false, 0, 'false');
simpleTimestampOffsetTest(true, 1, 'true');

Powered by Google App Engine
This is Rietveld 408576698