• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// META: global=window,worker
2
3// This just tests that the "readable" and "writable" properties pass the brand
4// checks. All other relevant attributes are covered by the IDL tests.
5
6'use strict';
7
8test(() => {
9  const te = new TextEncoderStream();
10  assert_equals(typeof ReadableStream.prototype.getReader.call(te.readable),
11                'object', 'readable property must pass brand check');
12  assert_equals(typeof WritableStream.prototype.getWriter.call(te.writable),
13                'object', 'writable property must pass brand check');
14}, 'TextEncoderStream readable and writable properties must pass brand checks');
15
16test(() => {
17  const td = new TextDecoderStream();
18  assert_equals(typeof ReadableStream.prototype.getReader.call(td.readable),
19                'object', 'readable property must pass brand check');
20  assert_equals(typeof WritableStream.prototype.getWriter.call(td.writable),
21                'object', 'writable property must pass brand check');
22}, 'TextDecoderStream readable and writable properties must pass brand checks');
23