Update web-platform-tests to revision 9c2bea6dac36e36ba1f489d10c2be42160d8f34f

This commit is contained in:
WPT Sync Bot 2018-11-27 21:07:27 -05:00
parent 482923cec2
commit 5c371dd958
459 changed files with 10717 additions and 834 deletions

View file

@ -437,3 +437,27 @@ test(() => {
test(() => {
assert_throws(new RangeError(), () => new TransformStream({ writableType: 'bytes' }), 'constructor should throw');
}, 'specifying a defined writableType should throw');
test(() => {
class Subclass extends TransformStream {
extraFunction() {
return true;
}
}
assert_equals(
Object.getPrototypeOf(Subclass.prototype), TransformStream.prototype,
'Subclass.prototype\'s prototype should be TransformStream.prototype');
assert_equals(Object.getPrototypeOf(Subclass), TransformStream,
'Subclass\'s prototype should be TransformStream');
const sub = new Subclass();
assert_true(sub instanceof TransformStream,
'Subclass object should be an instance of TransformStream');
assert_true(sub instanceof Subclass,
'Subclass object should be an instance of Subclass');
const readableGetter = Object.getOwnPropertyDescriptor(
TransformStream.prototype, 'readable').get;
assert_equals(readableGetter.call(sub), sub.readable,
'Subclass object should pass brand check');
assert_true(sub.extraFunction(),
'extraFunction() should be present on Subclass object');
}, 'Subclassing TransformStream should work');