haikuwebkit/LayoutTests/streams/brand-checks.html

78 lines
2.8 KiB
HTML
Raw Permalink Normal View History

[Streams API] Import the web-platform-tests directly from the spec https://bugs.webkit.org/show_bug.cgi?id=152051 Reviewed by Youenn Fablet. LayoutTests/imported/w3c: These are the web platform tests imported directly (or almost) from the Streams API repository. Tests work out of the box (all but a small flakiness that we are forcing as failure to not disrupt the execution of the rest of tests). To make them work we are importing also the service worker test helpers that is used by the tests. * web-platform-tests/service-workers/service-workers/resources/README.txt: Added. * web-platform-tests/service-workers/service-workers/resources/test-helpers.js: Added. Imported from the web-platform-tests. * web-platform-tests/streams-api/README.txt: Added. * web-platform-tests/streams-api/byte-length-queuing-strategy-expected.txt: Added. * web-platform-tests/streams-api/byte-length-queuing-strategy.html: Added. * web-platform-tests/streams-api/byte-length-queuing-strategy.js: Added. * web-platform-tests/streams-api/count-queuing-strategy-expected.txt: Added. * web-platform-tests/streams-api/count-queuing-strategy.html: Added. * web-platform-tests/streams-api/count-queuing-strategy.js: Added. * web-platform-tests/streams-api/readable-streams/bad-strategies-expected.txt: Added. * web-platform-tests/streams-api/readable-streams/bad-strategies.html: Added. * web-platform-tests/streams-api/readable-streams/bad-strategies.js: Added. * web-platform-tests/streams-api/readable-streams/bad-underlying-sources-expected.txt: Added. * web-platform-tests/streams-api/readable-streams/bad-underlying-sources.html: Added. * web-platform-tests/streams-api/readable-streams/bad-underlying-sources.js: Added. * web-platform-tests/streams-api/readable-streams/brand-checks-expected.txt: Added. * web-platform-tests/streams-api/readable-streams/brand-checks.html: Added. * web-platform-tests/streams-api/readable-streams/brand-checks.js: Added. * web-platform-tests/streams-api/readable-streams/cancel-expected.txt: Added. * web-platform-tests/streams-api/readable-streams/cancel.html: Added. There's a test with a forced failure because it is flaky. * web-platform-tests/streams-api/readable-streams/cancel.js: Added. * web-platform-tests/streams-api/readable-streams/count-queuing-strategy-integration-expected.txt: Added. * web-platform-tests/streams-api/readable-streams/count-queuing-strategy-integration.html: Added. * web-platform-tests/streams-api/readable-streams/count-queuing-strategy-integration.js: Added. * web-platform-tests/streams-api/readable-streams/garbage-collection-expected.txt: Added. * web-platform-tests/streams-api/readable-streams/garbage-collection.html: Added. * web-platform-tests/streams-api/readable-streams/garbage-collection.js: Added. * web-platform-tests/streams-api/readable-streams/general-expected.txt: Added. * web-platform-tests/streams-api/readable-streams/general.html: Added. * web-platform-tests/streams-api/readable-streams/general.js: Added. * web-platform-tests/streams-api/readable-streams/pipe-through-expected.txt: Added. * web-platform-tests/streams-api/readable-streams/pipe-through.html: Added. * web-platform-tests/streams-api/readable-streams/pipe-through.js: Added. * web-platform-tests/streams-api/readable-streams/readable-stream-reader-expected.txt: Added. * web-platform-tests/streams-api/readable-streams/readable-stream-reader.html: Added. * web-platform-tests/streams-api/readable-streams/readable-stream-reader.js: Added. * web-platform-tests/streams-api/readable-streams/tee-expected.txt: Added. * web-platform-tests/streams-api/readable-streams/tee.html: Added. * web-platform-tests/streams-api/readable-streams/tee.js: Added. * web-platform-tests/streams-api/readable-streams/templated-expected.txt: Added. * web-platform-tests/streams-api/readable-streams/templated.html: Added. * web-platform-tests/streams-api/readable-streams/templated.js: Added. * web-platform-tests/streams-api/resources/rs-test-templates.js: Added. * web-platform-tests/streams-api/resources/rs-utils.js: Added. * web-platform-tests/streams-api/resources/test-initializer.js: Added. * web-platform-tests/streams-api/resources/test-utils.js: Added. LayoutTests: Removed the tests that are already imported directly from the spec. * streams/brand-checks-expected.txt: Added. * streams/brand-checks.html: Added. This includes some tests that vanished from the spec. * streams/reference-implementation/bad-strategies-expected.txt: * streams/reference-implementation/bad-strategies.html: * streams/reference-implementation/bad-underlying-sources.html: Removed. * streams/reference-implementation/brand-checks-expected.txt: * streams/reference-implementation/brand-checks.html: * streams/reference-implementation/byte-length-queuing-strategy-expected.txt: * streams/reference-implementation/byte-length-queuing-strategy.html: * streams/reference-implementation/count-queuing-strategy-expected.txt: * streams/reference-implementation/count-queuing-strategy.html: * streams/reference-implementation/readable-stream-cancel.html: Removed. * streams/reference-implementation/readable-stream-reader.html: Removed. * streams/reference-implementation/readable-stream-tee.html: Removed. * streams/reference-implementation/readable-stream-templated-expected.txt: * streams/reference-implementation/readable-stream-templated.html: * streams/reference-implementation/readable-stream.html: Removed. Canonical link: https://commits.webkit.org/170199@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@193824 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-12-09 13:09:20 +00:00
<!DOCTYPE html>
<script src='../resources/testharness.js'></script>
<script src='../resources/testharnessreport.js'></script>
<script src='reference-implementation/resources/streams-utils.js'></script>
<script>
[Streams API] Fix cosmetic things after importing spec tests https://bugs.webkit.org/show_bug.cgi?id=152479 Reviewed by Youenn Fablet. Spec version are mainly updated in this patch as it wasn't done when importing tests from the spec. Some other minor changes were done, as renumbering some tests, removing some orphan expectations and other styling issues. * streams/brand-checks.html: * streams/pipe-to.html: * streams/readable-stream-controller-error.html: * streams/readable-stream-pipeThrough.html: * streams/readable-stream-reader-read.html: * streams/reference-implementation/abstract-ops.html: * streams/reference-implementation/bad-strategies.html: * streams/reference-implementation/bad-underlying-sinks.html: * streams/reference-implementation/bad-underlying-sources-expected.txt: Removed. * streams/reference-implementation/brand-checks.html: * streams/reference-implementation/byte-length-queuing-strategy.html: * streams/reference-implementation/count-queuing-strategy.html: * streams/reference-implementation/pipe-through.html: * streams/reference-implementation/pipe-to-options.html: * streams/reference-implementation/pipe-to.html: * streams/reference-implementation/readable-stream-templated.html: * streams/reference-implementation/transform-stream-errors.html: * streams/reference-implementation/transform-stream.html: * streams/reference-implementation/writable-stream-abort.html: * streams/reference-implementation/writable-stream-expected.txt: * streams/reference-implementation/writable-stream.html: Canonical link: https://commits.webkit.org/170606@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@194366 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-12-22 18:20:49 +00:00
// This is updated till https://github.com/whatwg/streams/commit/4ba861e6f60c248060811830e11271c84b439cc3
[Streams API] Replace ReadableStreamReader by ReadableStreamDefaultReader https://bugs.webkit.org/show_bug.cgi?id=160194 Patch by Romain Bellessort <romain.bellessort@crf.canon.fr> on 2016-07-27 Reviewed by Youenn Fablet. Replaced ReadableStreamReader by ReadableStreamDefaultReader to align with updated Streams API specification. No change in functionality. Source/WebCore: * CMakeLists.txt: * DerivedSources.cpp: * DerivedSources.make: * Modules/fetch/FetchInternals.js: (consumeStream): * Modules/fetch/FetchResponse.js: (body): * Modules/streams/ReadableStream.js: (getReader): * Modules/streams/ReadableStreamDefaultReader.idl: Renamed from Source/WebCore/Modules/streams/ReadableStreamReader.idl. * Modules/streams/ReadableStreamDefaultReader.js: Renamed from Source/WebCore/Modules/streams/ReadableStreamReader.js. (cancel): (read): (releaseLock): (closed): * Modules/streams/ReadableStreamInternals.js: (privateInitializeReadableStreamDefaultReader): (teeReadableStream): (teeReadableStreamPullFunction): (isReadableStreamDefaultReader): (closeReadableStream): (readFromReadableStreamDefaultReader): * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSDOMGlobalObject.cpp: (WebCore::JSDOMGlobalObject::addBuiltinGlobals): (WebCore::JSDOMGlobalObject::finishCreation): * bindings/js/JSReadableStreamPrivateConstructors.cpp: (WebCore::constructJSReadableStreamDefaultReader): (WebCore::JSBuiltinReadableStreamDefaultReaderPrivateConstructor::initializeExecutable): (WebCore::createReadableStreamDefaultReaderPrivateConstructor): * bindings/js/JSReadableStreamPrivateConstructors.h: * bindings/js/WebCoreBuiltinNames.h: * features.json: LayoutTests: * streams/brand-checks.html: * streams/readable-stream-controller-error-expected.txt: * streams/readable-stream-controller-error.html: * streams/readable-stream-default-reader-read-expected.txt: Renamed from LayoutTests/streams/readable-stream-reader-read-expected.txt. * streams/readable-stream-default-reader-read.html: Renamed from LayoutTests/streams/readable-stream-reader-read.html. * streams/readable-stream-error-messages-expected.txt: * streams/readable-stream-error-messages.html: * streams/reference-implementation/readable-stream-reader-expected.txt: * streams/shadowing-Promise-expected.txt: * streams/shadowing-Promise.html: Canonical link: https://commits.webkit.org/178400@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@203772 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-07-27 10:40:17 +00:00
let ReadableStreamDefaultReader = (new ReadableStream()).getReader().constructor;
[Streams API] Import the web-platform-tests directly from the spec https://bugs.webkit.org/show_bug.cgi?id=152051 Reviewed by Youenn Fablet. LayoutTests/imported/w3c: These are the web platform tests imported directly (or almost) from the Streams API repository. Tests work out of the box (all but a small flakiness that we are forcing as failure to not disrupt the execution of the rest of tests). To make them work we are importing also the service worker test helpers that is used by the tests. * web-platform-tests/service-workers/service-workers/resources/README.txt: Added. * web-platform-tests/service-workers/service-workers/resources/test-helpers.js: Added. Imported from the web-platform-tests. * web-platform-tests/streams-api/README.txt: Added. * web-platform-tests/streams-api/byte-length-queuing-strategy-expected.txt: Added. * web-platform-tests/streams-api/byte-length-queuing-strategy.html: Added. * web-platform-tests/streams-api/byte-length-queuing-strategy.js: Added. * web-platform-tests/streams-api/count-queuing-strategy-expected.txt: Added. * web-platform-tests/streams-api/count-queuing-strategy.html: Added. * web-platform-tests/streams-api/count-queuing-strategy.js: Added. * web-platform-tests/streams-api/readable-streams/bad-strategies-expected.txt: Added. * web-platform-tests/streams-api/readable-streams/bad-strategies.html: Added. * web-platform-tests/streams-api/readable-streams/bad-strategies.js: Added. * web-platform-tests/streams-api/readable-streams/bad-underlying-sources-expected.txt: Added. * web-platform-tests/streams-api/readable-streams/bad-underlying-sources.html: Added. * web-platform-tests/streams-api/readable-streams/bad-underlying-sources.js: Added. * web-platform-tests/streams-api/readable-streams/brand-checks-expected.txt: Added. * web-platform-tests/streams-api/readable-streams/brand-checks.html: Added. * web-platform-tests/streams-api/readable-streams/brand-checks.js: Added. * web-platform-tests/streams-api/readable-streams/cancel-expected.txt: Added. * web-platform-tests/streams-api/readable-streams/cancel.html: Added. There's a test with a forced failure because it is flaky. * web-platform-tests/streams-api/readable-streams/cancel.js: Added. * web-platform-tests/streams-api/readable-streams/count-queuing-strategy-integration-expected.txt: Added. * web-platform-tests/streams-api/readable-streams/count-queuing-strategy-integration.html: Added. * web-platform-tests/streams-api/readable-streams/count-queuing-strategy-integration.js: Added. * web-platform-tests/streams-api/readable-streams/garbage-collection-expected.txt: Added. * web-platform-tests/streams-api/readable-streams/garbage-collection.html: Added. * web-platform-tests/streams-api/readable-streams/garbage-collection.js: Added. * web-platform-tests/streams-api/readable-streams/general-expected.txt: Added. * web-platform-tests/streams-api/readable-streams/general.html: Added. * web-platform-tests/streams-api/readable-streams/general.js: Added. * web-platform-tests/streams-api/readable-streams/pipe-through-expected.txt: Added. * web-platform-tests/streams-api/readable-streams/pipe-through.html: Added. * web-platform-tests/streams-api/readable-streams/pipe-through.js: Added. * web-platform-tests/streams-api/readable-streams/readable-stream-reader-expected.txt: Added. * web-platform-tests/streams-api/readable-streams/readable-stream-reader.html: Added. * web-platform-tests/streams-api/readable-streams/readable-stream-reader.js: Added. * web-platform-tests/streams-api/readable-streams/tee-expected.txt: Added. * web-platform-tests/streams-api/readable-streams/tee.html: Added. * web-platform-tests/streams-api/readable-streams/tee.js: Added. * web-platform-tests/streams-api/readable-streams/templated-expected.txt: Added. * web-platform-tests/streams-api/readable-streams/templated.html: Added. * web-platform-tests/streams-api/readable-streams/templated.js: Added. * web-platform-tests/streams-api/resources/rs-test-templates.js: Added. * web-platform-tests/streams-api/resources/rs-utils.js: Added. * web-platform-tests/streams-api/resources/test-initializer.js: Added. * web-platform-tests/streams-api/resources/test-utils.js: Added. LayoutTests: Removed the tests that are already imported directly from the spec. * streams/brand-checks-expected.txt: Added. * streams/brand-checks.html: Added. This includes some tests that vanished from the spec. * streams/reference-implementation/bad-strategies-expected.txt: * streams/reference-implementation/bad-strategies.html: * streams/reference-implementation/bad-underlying-sources.html: Removed. * streams/reference-implementation/brand-checks-expected.txt: * streams/reference-implementation/brand-checks.html: * streams/reference-implementation/byte-length-queuing-strategy-expected.txt: * streams/reference-implementation/byte-length-queuing-strategy.html: * streams/reference-implementation/count-queuing-strategy-expected.txt: * streams/reference-implementation/count-queuing-strategy.html: * streams/reference-implementation/readable-stream-cancel.html: Removed. * streams/reference-implementation/readable-stream-reader.html: Removed. * streams/reference-implementation/readable-stream-tee.html: Removed. * streams/reference-implementation/readable-stream-templated-expected.txt: * streams/reference-implementation/readable-stream-templated.html: * streams/reference-implementation/readable-stream.html: Removed. Canonical link: https://commits.webkit.org/170199@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@193824 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-12-09 13:09:20 +00:00
function fakeWritableStream() {
return {
get closed() { return Promise.resolve(); },
get ready() { return Promise.resolve(); },
get state() { return 'closed' },
abort(reason) { return Promise.resolve(); },
close() { return Promise.resolve(); },
write(chunk) { return Promise.resolve(); }
};
}
function realReadableStream() {
return new ReadableStream();
}
function fakeReadableStream() {
return {
cancel: function(reason) { return Promise.resolve(); },
[Streams API] Replace ReadableStreamReader by ReadableStreamDefaultReader https://bugs.webkit.org/show_bug.cgi?id=160194 Patch by Romain Bellessort <romain.bellessort@crf.canon.fr> on 2016-07-27 Reviewed by Youenn Fablet. Replaced ReadableStreamReader by ReadableStreamDefaultReader to align with updated Streams API specification. No change in functionality. Source/WebCore: * CMakeLists.txt: * DerivedSources.cpp: * DerivedSources.make: * Modules/fetch/FetchInternals.js: (consumeStream): * Modules/fetch/FetchResponse.js: (body): * Modules/streams/ReadableStream.js: (getReader): * Modules/streams/ReadableStreamDefaultReader.idl: Renamed from Source/WebCore/Modules/streams/ReadableStreamReader.idl. * Modules/streams/ReadableStreamDefaultReader.js: Renamed from Source/WebCore/Modules/streams/ReadableStreamReader.js. (cancel): (read): (releaseLock): (closed): * Modules/streams/ReadableStreamInternals.js: (privateInitializeReadableStreamDefaultReader): (teeReadableStream): (teeReadableStreamPullFunction): (isReadableStreamDefaultReader): (closeReadableStream): (readFromReadableStreamDefaultReader): * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSDOMGlobalObject.cpp: (WebCore::JSDOMGlobalObject::addBuiltinGlobals): (WebCore::JSDOMGlobalObject::finishCreation): * bindings/js/JSReadableStreamPrivateConstructors.cpp: (WebCore::constructJSReadableStreamDefaultReader): (WebCore::JSBuiltinReadableStreamDefaultReaderPrivateConstructor::initializeExecutable): (WebCore::createReadableStreamDefaultReaderPrivateConstructor): * bindings/js/JSReadableStreamPrivateConstructors.h: * bindings/js/WebCoreBuiltinNames.h: * features.json: LayoutTests: * streams/brand-checks.html: * streams/readable-stream-controller-error-expected.txt: * streams/readable-stream-controller-error.html: * streams/readable-stream-default-reader-read-expected.txt: Renamed from LayoutTests/streams/readable-stream-reader-read-expected.txt. * streams/readable-stream-default-reader-read.html: Renamed from LayoutTests/streams/readable-stream-reader-read.html. * streams/readable-stream-error-messages-expected.txt: * streams/readable-stream-error-messages.html: * streams/reference-implementation/readable-stream-reader-expected.txt: * streams/shadowing-Promise-expected.txt: * streams/shadowing-Promise.html: Canonical link: https://commits.webkit.org/178400@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@203772 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-07-27 10:40:17 +00:00
getReader: function() { return new ReadableStreamDefaultReader(new ReadableStream()); },
[Streams API] Import the web-platform-tests directly from the spec https://bugs.webkit.org/show_bug.cgi?id=152051 Reviewed by Youenn Fablet. LayoutTests/imported/w3c: These are the web platform tests imported directly (or almost) from the Streams API repository. Tests work out of the box (all but a small flakiness that we are forcing as failure to not disrupt the execution of the rest of tests). To make them work we are importing also the service worker test helpers that is used by the tests. * web-platform-tests/service-workers/service-workers/resources/README.txt: Added. * web-platform-tests/service-workers/service-workers/resources/test-helpers.js: Added. Imported from the web-platform-tests. * web-platform-tests/streams-api/README.txt: Added. * web-platform-tests/streams-api/byte-length-queuing-strategy-expected.txt: Added. * web-platform-tests/streams-api/byte-length-queuing-strategy.html: Added. * web-platform-tests/streams-api/byte-length-queuing-strategy.js: Added. * web-platform-tests/streams-api/count-queuing-strategy-expected.txt: Added. * web-platform-tests/streams-api/count-queuing-strategy.html: Added. * web-platform-tests/streams-api/count-queuing-strategy.js: Added. * web-platform-tests/streams-api/readable-streams/bad-strategies-expected.txt: Added. * web-platform-tests/streams-api/readable-streams/bad-strategies.html: Added. * web-platform-tests/streams-api/readable-streams/bad-strategies.js: Added. * web-platform-tests/streams-api/readable-streams/bad-underlying-sources-expected.txt: Added. * web-platform-tests/streams-api/readable-streams/bad-underlying-sources.html: Added. * web-platform-tests/streams-api/readable-streams/bad-underlying-sources.js: Added. * web-platform-tests/streams-api/readable-streams/brand-checks-expected.txt: Added. * web-platform-tests/streams-api/readable-streams/brand-checks.html: Added. * web-platform-tests/streams-api/readable-streams/brand-checks.js: Added. * web-platform-tests/streams-api/readable-streams/cancel-expected.txt: Added. * web-platform-tests/streams-api/readable-streams/cancel.html: Added. There's a test with a forced failure because it is flaky. * web-platform-tests/streams-api/readable-streams/cancel.js: Added. * web-platform-tests/streams-api/readable-streams/count-queuing-strategy-integration-expected.txt: Added. * web-platform-tests/streams-api/readable-streams/count-queuing-strategy-integration.html: Added. * web-platform-tests/streams-api/readable-streams/count-queuing-strategy-integration.js: Added. * web-platform-tests/streams-api/readable-streams/garbage-collection-expected.txt: Added. * web-platform-tests/streams-api/readable-streams/garbage-collection.html: Added. * web-platform-tests/streams-api/readable-streams/garbage-collection.js: Added. * web-platform-tests/streams-api/readable-streams/general-expected.txt: Added. * web-platform-tests/streams-api/readable-streams/general.html: Added. * web-platform-tests/streams-api/readable-streams/general.js: Added. * web-platform-tests/streams-api/readable-streams/pipe-through-expected.txt: Added. * web-platform-tests/streams-api/readable-streams/pipe-through.html: Added. * web-platform-tests/streams-api/readable-streams/pipe-through.js: Added. * web-platform-tests/streams-api/readable-streams/readable-stream-reader-expected.txt: Added. * web-platform-tests/streams-api/readable-streams/readable-stream-reader.html: Added. * web-platform-tests/streams-api/readable-streams/readable-stream-reader.js: Added. * web-platform-tests/streams-api/readable-streams/tee-expected.txt: Added. * web-platform-tests/streams-api/readable-streams/tee.html: Added. * web-platform-tests/streams-api/readable-streams/tee.js: Added. * web-platform-tests/streams-api/readable-streams/templated-expected.txt: Added. * web-platform-tests/streams-api/readable-streams/templated.html: Added. * web-platform-tests/streams-api/readable-streams/templated.js: Added. * web-platform-tests/streams-api/resources/rs-test-templates.js: Added. * web-platform-tests/streams-api/resources/rs-utils.js: Added. * web-platform-tests/streams-api/resources/test-initializer.js: Added. * web-platform-tests/streams-api/resources/test-utils.js: Added. LayoutTests: Removed the tests that are already imported directly from the spec. * streams/brand-checks-expected.txt: Added. * streams/brand-checks.html: Added. This includes some tests that vanished from the spec. * streams/reference-implementation/bad-strategies-expected.txt: * streams/reference-implementation/bad-strategies.html: * streams/reference-implementation/bad-underlying-sources.html: Removed. * streams/reference-implementation/brand-checks-expected.txt: * streams/reference-implementation/brand-checks.html: * streams/reference-implementation/byte-length-queuing-strategy-expected.txt: * streams/reference-implementation/byte-length-queuing-strategy.html: * streams/reference-implementation/count-queuing-strategy-expected.txt: * streams/reference-implementation/count-queuing-strategy.html: * streams/reference-implementation/readable-stream-cancel.html: Removed. * streams/reference-implementation/readable-stream-reader.html: Removed. * streams/reference-implementation/readable-stream-tee.html: Removed. * streams/reference-implementation/readable-stream-templated-expected.txt: * streams/reference-implementation/readable-stream-templated.html: * streams/reference-implementation/readable-stream.html: Removed. Canonical link: https://commits.webkit.org/170199@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@193824 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-12-09 13:09:20 +00:00
pipeThrough: function(obj, options) { return obj.readable; },
pipeTo: function() { return Promise.resolve(); },
tee: function() { return [realReadableStream(), realReadableStream()]; }
};
}
test(function() {
var pipeToArguments;
var thisValue = {
pipeTo: function() {
pipeToArguments = arguments;
}
};
var input = { readable: {}, writable: {} };
var options = {};
var result = ReadableStream.prototype.pipeThrough.call(thisValue, input, options);
assert_array_equals(pipeToArguments, [input.writable, options], 'correct arguments should be passed to thisValue.pipeTo');
assert_equals(result, input.readable, 'return value should be the passed readable property');
}, 'ReadableStream.prototype.pipeThrough works generically on its this and its arguments');
test(function() {
ReadableStream.prototype.pipeTo.call(fakeReadableStream(), fakeWritableStream()); // Check it does not throw.
}, 'ReadableStream.prototype.pipeTo works generically on its this and its arguments');
test(function() {
var thisValue = null;
var returnValue = { 'returned from': 'byteLength getter' };
var chunk = {
get byteLength() {
return returnValue;
}
};
assert_equals(ByteLengthQueuingStrategy.prototype.size.call(thisValue, chunk), returnValue);
}, 'ByteLengthQueuingStrategy.prototype.size should work generically on its this and its arguments');
test(function() {
var thisValue = null;
var chunk = {
get byteLength() {
throw new TypeError('shouldn\'t be called');
}
};
assert_equals(CountQueuingStrategy.prototype.size.call(thisValue, chunk), 1);
}, 'CountQueuingStrategy.prototype.size should work generically on its this and its arguments');
</script>