From 8b46f09d1c3de2c634f0d664122eb6b84213282c Mon Sep 17 00:00:00 2001 From: Till Schneidereit Date: Tue, 31 Jan 2017 14:34:55 +0100 Subject: [PATCH] Bug 1272697 - Part 3: Implement ReadableStream and associated classes in the JS engine. r=shu MozReview-Commit-ID: E4uux96ed2m --- .../mochitest/general/test_interfaces.js | 3 + .../test_serviceworker_interfaces.js | 3 + dom/workers/test/test_worker_interfaces.js | 3 + js/moz.configure | 13 + js/src/builtin/Stream.cpp | 4960 +++++++++++++++++ js/src/builtin/Stream.h | 119 + js/src/builtin/TestingFunctions.cpp | 12 + js/src/js.msg | 27 + js/src/jsfriendapi.h | 6 + js/src/jsnum.cpp | 6 + js/src/jsnum.h | 4 + js/src/jsprototypes.h | 29 +- js/src/moz.build | 1 + js/src/vm/ArrayBufferObject.cpp | 11 + js/src/vm/CommonPropertyNames.h | 7 + js/src/vm/GlobalObject.cpp | 16 +- js/src/vm/SelfHosting.cpp | 5 +- .../setrequestheader-content-type.htm.ini | 3 - .../backgrounds/background-root-002.xht.ini | 2 +- .../css/selectors4/focus-within-009.html.ini | 3 - .../images3/object-fit-cover-004e.html.ini | 3 - .../images3/object-fit-cover-004o.html.ini | 3 - .../meta/cssom-view/elementFromPoint.html.ini | 1 + ...rialize-namespaced-type-selectors.html.ini | 1 + .../api/response/response-consume.html.ini | 6 - .../html/dom/reflection-embedded.html.ini | 1 + .../meta/page-visibility/idlharness.html.ini | 1 + ...rotocol.keep-origin-redirect.http.html.ini | 1 + ...nsecure-protocol.no-redirect.http.html.ini | 1 + ...rotocol.swap-origin-redirect.http.html.ini | 1 + ...rotocol.keep-origin-redirect.http.html.ini | 1 + ...upgrade-protocol.no-redirect.http.html.ini | 1 + ...rotocol.swap-origin-redirect.http.html.ini | 1 + ...rotocol.keep-origin-redirect.http.html.ini | 1 + ...nsecure-protocol.no-redirect.http.html.ini | 1 + ...rotocol.swap-origin-redirect.http.html.ini | 1 + ...rotocol.keep-origin-redirect.http.html.ini | 1 + ...upgrade-protocol.no-redirect.http.html.ini | 1 + ...rotocol.swap-origin-redirect.http.html.ini | 1 + ...rotocol.keep-origin-redirect.http.html.ini | 1 + ...nsecure-protocol.no-redirect.http.html.ini | 1 + ...rotocol.swap-origin-redirect.http.html.ini | 1 + ...rotocol.keep-origin-redirect.http.html.ini | 1 + ...upgrade-protocol.no-redirect.http.html.ini | 1 + ...rotocol.swap-origin-redirect.http.html.ini | 1 + ...rotocol.keep-origin-redirect.http.html.ini | 1 + ...nsecure-protocol.no-redirect.http.html.ini | 1 + ...rotocol.swap-origin-redirect.http.html.ini | 1 + ...rotocol.keep-origin-redirect.http.html.ini | 1 + ...upgrade-protocol.no-redirect.http.html.ini | 1 + ...rotocol.swap-origin-redirect.http.html.ini | 1 + ...generic.keep-origin-redirect.http.html.ini | 1 + .../img-tag/generic.no-redirect.http.html.ini | 1 + ...generic.swap-origin-redirect.http.html.ini | 1 + ...generic.keep-origin-redirect.http.html.ini | 1 + .../img-tag/generic.no-redirect.http.html.ini | 1 + ...generic.swap-origin-redirect.http.html.ini | 1 + ...generic.keep-origin-redirect.http.html.ini | 1 + .../img-tag/generic.no-redirect.http.html.ini | 1 + ...generic.swap-origin-redirect.http.html.ini | 1 + ...generic.keep-origin-redirect.http.html.ini | 1 + .../img-tag/generic.no-redirect.http.html.ini | 1 + ...generic.swap-origin-redirect.http.html.ini | 1 + ...generic.keep-origin-redirect.http.html.ini | 1 + .../img-tag/generic.no-redirect.http.html.ini | 1 + ...generic.swap-origin-redirect.http.html.ini | 1 + ...generic.keep-origin-redirect.http.html.ini | 1 + .../img-tag/generic.no-redirect.http.html.ini | 1 + ...generic.swap-origin-redirect.http.html.ini | 1 + ...generic.keep-origin-redirect.http.html.ini | 1 + .../img-tag/generic.no-redirect.http.html.ini | 1 + ...generic.swap-origin-redirect.http.html.ini | 1 + ...generic.keep-origin-redirect.http.html.ini | 1 + .../img-tag/generic.no-redirect.http.html.ini | 1 + ...generic.swap-origin-redirect.http.html.ini | 1 + ...-origin.keep-origin-redirect.http.html.ini | 1 + .../cross-origin.no-redirect.http.html.ini | 1 + ...-origin.swap-origin-redirect.http.html.ini | 1 + ...-origin.keep-origin-redirect.http.html.ini | 1 + .../cross-origin.no-redirect.http.html.ini | 1 + ...-origin.swap-origin-redirect.http.html.ini | 1 + ...nsecure.keep-origin-redirect.http.html.ini | 1 + ...-origin-insecure.no-redirect.http.html.ini | 1 + ...nsecure.swap-origin-redirect.http.html.ini | 1 + ...wngrade.keep-origin-redirect.http.html.ini | 1 + ...origin-downgrade.no-redirect.http.html.ini | 1 + ...wngrade.swap-origin-redirect.http.html.ini | 1 + ...nsecure.swap-origin-redirect.http.html.ini | 1 + ...upgrade.keep-origin-redirect.http.html.ini | 1 + ...e-origin-upgrade.no-redirect.http.html.ini | 1 + ...upgrade.swap-origin-redirect.http.html.ini | 1 + ...-origin.keep-origin-redirect.http.html.ini | 1 + .../cross-origin.no-redirect.http.html.ini | 1 + ...-origin.swap-origin-redirect.http.html.ini | 1 + ...-origin.keep-origin-redirect.http.html.ini | 1 + .../cross-origin.no-redirect.http.html.ini | 1 + ...-origin.swap-origin-redirect.http.html.ini | 1 + ...nsecure.keep-origin-redirect.http.html.ini | 1 + ...-origin-insecure.no-redirect.http.html.ini | 1 + ...nsecure.swap-origin-redirect.http.html.ini | 1 + ...wngrade.keep-origin-redirect.http.html.ini | 1 + ...origin-downgrade.no-redirect.http.html.ini | 1 + ...wngrade.swap-origin-redirect.http.html.ini | 1 + ...nsecure.swap-origin-redirect.http.html.ini | 1 + ...upgrade.keep-origin-redirect.http.html.ini | 1 + ...e-origin-upgrade.no-redirect.http.html.ini | 1 + ...upgrade.swap-origin-redirect.http.html.ini | 1 + ...generic.keep-origin-redirect.http.html.ini | 1 + .../img-tag/generic.no-redirect.http.html.ini | 1 + ...generic.swap-origin-redirect.http.html.ini | 1 + ...generic.keep-origin-redirect.http.html.ini | 1 + .../img-tag/generic.no-redirect.http.html.ini | 1 + ...generic.swap-origin-redirect.http.html.ini | 1 + ...generic.keep-origin-redirect.http.html.ini | 1 + .../img-tag/generic.no-redirect.http.html.ini | 1 + ...generic.swap-origin-redirect.http.html.ini | 1 + ...generic.keep-origin-redirect.http.html.ini | 1 + .../img-tag/generic.no-redirect.http.html.ini | 1 + ...generic.swap-origin-redirect.http.html.ini | 1 + ...generic.keep-origin-redirect.http.html.ini | 1 + .../img-tag/generic.no-redirect.http.html.ini | 1 + ...generic.swap-origin-redirect.http.html.ini | 1 + ...generic.keep-origin-redirect.http.html.ini | 1 + .../img-tag/generic.no-redirect.http.html.ini | 1 + ...generic.swap-origin-redirect.http.html.ini | 1 + ...generic.keep-origin-redirect.http.html.ini | 1 + .../img-tag/generic.no-redirect.http.html.ini | 1 + ...generic.swap-origin-redirect.http.html.ini | 1 + ...generic.keep-origin-redirect.http.html.ini | 1 + .../img-tag/generic.no-redirect.http.html.ini | 1 + ...generic.swap-origin-redirect.http.html.ini | 1 + ...generic.keep-origin-redirect.http.html.ini | 1 + .../img-tag/generic.no-redirect.http.html.ini | 1 + ...generic.swap-origin-redirect.http.html.ini | 1 + ...generic.keep-origin-redirect.http.html.ini | 1 + .../img-tag/generic.no-redirect.http.html.ini | 1 + ...generic.swap-origin-redirect.http.html.ini | 1 + ...generic.keep-origin-redirect.http.html.ini | 1 + .../img-tag/generic.no-redirect.http.html.ini | 1 + ...generic.swap-origin-redirect.http.html.ini | 1 + ...generic.keep-origin-redirect.http.html.ini | 1 + .../img-tag/generic.no-redirect.http.html.ini | 1 + ...generic.swap-origin-redirect.http.html.ini | 1 + ...generic.keep-origin-redirect.http.html.ini | 1 + .../img-tag/generic.no-redirect.http.html.ini | 1 + ...generic.swap-origin-redirect.http.html.ini | 1 + ...generic.keep-origin-redirect.http.html.ini | 1 + .../img-tag/generic.no-redirect.http.html.ini | 1 + ...generic.swap-origin-redirect.http.html.ini | 1 + ...generic.keep-origin-redirect.http.html.ini | 1 + .../img-tag/generic.no-redirect.http.html.ini | 1 + ...generic.swap-origin-redirect.http.html.ini | 1 + ...generic.keep-origin-redirect.http.html.ini | 1 + .../img-tag/generic.no-redirect.http.html.ini | 1 + ...generic.swap-origin-redirect.http.html.ini | 1 + ...generic.keep-origin-redirect.http.html.ini | 1 + .../img-tag/generic.no-redirect.http.html.ini | 1 + ...generic.swap-origin-redirect.http.html.ini | 1 + ...generic.keep-origin-redirect.http.html.ini | 1 + .../img-tag/generic.no-redirect.http.html.ini | 1 + ...generic.swap-origin-redirect.http.html.ini | 1 + ...generic.keep-origin-redirect.http.html.ini | 1 + .../img-tag/generic.no-redirect.http.html.ini | 1 + ...generic.swap-origin-redirect.http.html.ini | 1 + ...generic.keep-origin-redirect.http.html.ini | 1 + .../img-tag/generic.no-redirect.http.html.ini | 1 + ...generic.swap-origin-redirect.http.html.ini | 1 + ...rotocol.keep-origin-redirect.http.html.ini | 1 + ...nsecure-protocol.no-redirect.http.html.ini | 1 + ...rotocol.swap-origin-redirect.http.html.ini | 1 + ...rotocol.keep-origin-redirect.http.html.ini | 1 + ...upgrade-protocol.no-redirect.http.html.ini | 1 + ...rotocol.swap-origin-redirect.http.html.ini | 1 + ...rotocol.keep-origin-redirect.http.html.ini | 1 + ...nsecure-protocol.no-redirect.http.html.ini | 1 + ...rotocol.swap-origin-redirect.http.html.ini | 1 + ...rotocol.keep-origin-redirect.http.html.ini | 1 + ...upgrade-protocol.no-redirect.http.html.ini | 1 + ...rotocol.swap-origin-redirect.http.html.ini | 1 + ...rotocol.keep-origin-redirect.http.html.ini | 1 + ...nsecure-protocol.no-redirect.http.html.ini | 1 + ...rotocol.swap-origin-redirect.http.html.ini | 1 + ...rotocol.keep-origin-redirect.http.html.ini | 1 + ...upgrade-protocol.no-redirect.http.html.ini | 1 + ...rotocol.swap-origin-redirect.http.html.ini | 1 + ...rotocol.keep-origin-redirect.http.html.ini | 1 + ...nsecure-protocol.no-redirect.http.html.ini | 1 + ...rotocol.swap-origin-redirect.http.html.ini | 1 + ...rotocol.keep-origin-redirect.http.html.ini | 1 + ...upgrade-protocol.no-redirect.http.html.ini | 1 + ...rotocol.swap-origin-redirect.http.html.ini | 1 + .../service-worker/fetch-event.https.html.ini | 1 + testing/web-platform/meta/streams/__dir__.ini | 1 + ...-queuing-strategy.dedicatedworker.html.ini | 23 - .../byte-length-queuing-strategy.html.ini | 23 - ...uing-strategy.serviceworker.https.html.ini | 23 - ...gth-queuing-strategy.sharedworker.html.ini | 23 - ...-queuing-strategy.dedicatedworker.html.ini | 23 - .../streams/count-queuing-strategy.html.ini | 23 - ...uing-strategy.serviceworker.https.html.ini | 23 - ...unt-queuing-strategy.sharedworker.html.ini | 23 - .../general.dedicatedworker.html.ini | 218 - .../readable-byte-streams/general.html.ini | 218 - .../general.serviceworker.https.html.ini | 218 - .../general.sharedworker.html.ini | 218 - .../bad-strategies.dedicatedworker.html.ini | 23 - .../readable-streams/bad-strategies.html.ini | 23 - ...ad-strategies.serviceworker.https.html.ini | 23 - .../bad-strategies.sharedworker.html.ini | 23 - ...nderlying-sources.dedicatedworker.html.ini | 68 - .../bad-underlying-sources.html.ini | 68 - ...lying-sources.serviceworker.https.html.ini | 68 - ...d-underlying-sources.sharedworker.html.ini | 68 - .../brand-checks.dedicatedworker.html.ini | 39 - .../readable-streams/brand-checks.html.ini | 39 - .../brand-checks.serviceworker.https.html.ini | 39 - .../brand-checks.sharedworker.html.ini | 39 - .../cancel.dedicatedworker.html.ini | 32 - .../streams/readable-streams/cancel.html.ini | 32 - .../cancel.serviceworker.https.html.ini | 32 - .../cancel.sharedworker.html.ini | 32 - ...ategy-integration.dedicatedworker.html.ini | 14 - ...ount-queuing-strategy-integration.html.ini | 14 - ...y-integration.serviceworker.https.html.ini | 14 - ...strategy-integration.sharedworker.html.ini | 14 - .../default-reader.dedicatedworker.html.ini | 77 - .../readable-streams/default-reader.html.ini | 77 - ...efault-reader.serviceworker.https.html.ini | 77 - .../default-reader.sharedworker.html.ini | 77 - ...-total-queue-size.dedicatedworker.html.ini | 14 - .../floating-point-total-queue-size.html.ini | 14 - ...al-queue-size.serviceworker.https.html.ini | 14 - ...int-total-queue-size.sharedworker.html.ini | 14 - ...arbage-collection.dedicatedworker.html.ini | 12 - .../garbage-collection.html.ini | 12 - ...ge-collection.serviceworker.https.html.ini | 12 - .../garbage-collection.sharedworker.html.ini | 12 - .../general.dedicatedworker.html.ini | 116 - .../streams/readable-streams/general.html.ini | 116 - .../general.serviceworker.https.html.ini | 116 - .../general.sharedworker.html.ini | 116 - .../pipe-through.dedicatedworker.html.ini | 6 - .../readable-streams/pipe-through.html.ini | 6 - .../pipe-through.serviceworker.https.html.ini | 6 - .../pipe-through.sharedworker.html.ini | 6 - .../tee.dedicatedworker.html.ini | 32 - .../streams/readable-streams/tee.html.ini | 32 - .../tee.serviceworker.https.html.ini | 32 - .../tee.sharedworker.html.ini | 32 - .../templated.dedicatedworker.html.ini | 213 - .../readable-streams/templated.html.ini | 332 -- .../templated.serviceworker.https.html.ini | 213 - .../templated.sharedworker.html.ini | 213 - .../accumulation-per-property.html.ini | 1 + .../addition-per-property.html.ini | 1 + .../interpolation-per-property.html.ini | 1 + ...RTCPeerConnection-addIceCandidate.html.ini | 1 + ...eerConnection-generateCertificate.html.ini | 1 + .../align_middle_position_lt_50.html.ini | 2 +- .../interface-objects/001.worker.js.ini | 9 - .../semantics/interface-objects/003.html.ini | 9 - 261 files changed, 5391 insertions(+), 3808 deletions(-) create mode 100644 js/src/builtin/Stream.cpp create mode 100644 js/src/builtin/Stream.h delete mode 100644 testing/web-platform/meta/css/selectors4/focus-within-009.html.ini delete mode 100644 testing/web-platform/meta/css/vendor-imports/mozilla/mozilla-central-reftests/images3/object-fit-cover-004e.html.ini delete mode 100644 testing/web-platform/meta/css/vendor-imports/mozilla/mozilla-central-reftests/images3/object-fit-cover-004o.html.ini create mode 100644 testing/web-platform/meta/streams/__dir__.ini delete mode 100644 testing/web-platform/meta/streams/byte-length-queuing-strategy.dedicatedworker.html.ini delete mode 100644 testing/web-platform/meta/streams/byte-length-queuing-strategy.html.ini delete mode 100644 testing/web-platform/meta/streams/byte-length-queuing-strategy.serviceworker.https.html.ini delete mode 100644 testing/web-platform/meta/streams/byte-length-queuing-strategy.sharedworker.html.ini delete mode 100644 testing/web-platform/meta/streams/count-queuing-strategy.dedicatedworker.html.ini delete mode 100644 testing/web-platform/meta/streams/count-queuing-strategy.html.ini delete mode 100644 testing/web-platform/meta/streams/count-queuing-strategy.serviceworker.https.html.ini delete mode 100644 testing/web-platform/meta/streams/count-queuing-strategy.sharedworker.html.ini delete mode 100644 testing/web-platform/meta/streams/readable-byte-streams/general.dedicatedworker.html.ini delete mode 100644 testing/web-platform/meta/streams/readable-byte-streams/general.html.ini delete mode 100644 testing/web-platform/meta/streams/readable-byte-streams/general.serviceworker.https.html.ini delete mode 100644 testing/web-platform/meta/streams/readable-byte-streams/general.sharedworker.html.ini delete mode 100644 testing/web-platform/meta/streams/readable-streams/bad-strategies.dedicatedworker.html.ini delete mode 100644 testing/web-platform/meta/streams/readable-streams/bad-strategies.html.ini delete mode 100644 testing/web-platform/meta/streams/readable-streams/bad-strategies.serviceworker.https.html.ini delete mode 100644 testing/web-platform/meta/streams/readable-streams/bad-strategies.sharedworker.html.ini delete mode 100644 testing/web-platform/meta/streams/readable-streams/bad-underlying-sources.dedicatedworker.html.ini delete mode 100644 testing/web-platform/meta/streams/readable-streams/bad-underlying-sources.html.ini delete mode 100644 testing/web-platform/meta/streams/readable-streams/bad-underlying-sources.serviceworker.https.html.ini delete mode 100644 testing/web-platform/meta/streams/readable-streams/bad-underlying-sources.sharedworker.html.ini delete mode 100644 testing/web-platform/meta/streams/readable-streams/cancel.dedicatedworker.html.ini delete mode 100644 testing/web-platform/meta/streams/readable-streams/cancel.html.ini delete mode 100644 testing/web-platform/meta/streams/readable-streams/cancel.serviceworker.https.html.ini delete mode 100644 testing/web-platform/meta/streams/readable-streams/cancel.sharedworker.html.ini delete mode 100644 testing/web-platform/meta/streams/readable-streams/count-queuing-strategy-integration.dedicatedworker.html.ini delete mode 100644 testing/web-platform/meta/streams/readable-streams/count-queuing-strategy-integration.html.ini delete mode 100644 testing/web-platform/meta/streams/readable-streams/count-queuing-strategy-integration.serviceworker.https.html.ini delete mode 100644 testing/web-platform/meta/streams/readable-streams/count-queuing-strategy-integration.sharedworker.html.ini delete mode 100644 testing/web-platform/meta/streams/readable-streams/default-reader.dedicatedworker.html.ini delete mode 100644 testing/web-platform/meta/streams/readable-streams/default-reader.html.ini delete mode 100644 testing/web-platform/meta/streams/readable-streams/default-reader.serviceworker.https.html.ini delete mode 100644 testing/web-platform/meta/streams/readable-streams/default-reader.sharedworker.html.ini delete mode 100644 testing/web-platform/meta/streams/readable-streams/floating-point-total-queue-size.dedicatedworker.html.ini delete mode 100644 testing/web-platform/meta/streams/readable-streams/floating-point-total-queue-size.html.ini delete mode 100644 testing/web-platform/meta/streams/readable-streams/floating-point-total-queue-size.serviceworker.https.html.ini delete mode 100644 testing/web-platform/meta/streams/readable-streams/floating-point-total-queue-size.sharedworker.html.ini delete mode 100644 testing/web-platform/meta/streams/readable-streams/general.dedicatedworker.html.ini delete mode 100644 testing/web-platform/meta/streams/readable-streams/general.html.ini delete mode 100644 testing/web-platform/meta/streams/readable-streams/general.serviceworker.https.html.ini delete mode 100644 testing/web-platform/meta/streams/readable-streams/general.sharedworker.html.ini delete mode 100644 testing/web-platform/meta/streams/readable-streams/tee.dedicatedworker.html.ini delete mode 100644 testing/web-platform/meta/streams/readable-streams/tee.html.ini delete mode 100644 testing/web-platform/meta/streams/readable-streams/tee.serviceworker.https.html.ini delete mode 100644 testing/web-platform/meta/streams/readable-streams/tee.sharedworker.html.ini diff --git a/dom/tests/mochitest/general/test_interfaces.js b/dom/tests/mochitest/general/test_interfaces.js index 1fa2fd0e1261..c530ed15eb7f 100644 --- a/dom/tests/mochitest/general/test_interfaces.js +++ b/dom/tests/mochitest/general/test_interfaces.js @@ -29,6 +29,8 @@ var ecmaGlobals = "ArrayBuffer", "Atomics", "Boolean", + {name: "ByteLengthQueuingStrategy", disabled: !SpecialPowers.Cu.getJSTestingFunctions().streamsAreEnabled()}, + {name: "CountQueuingStrategy", disabled: !SpecialPowers.Cu.getJSTestingFunctions().streamsAreEnabled()}, "DataView", "Date", "Error", @@ -55,6 +57,7 @@ var ecmaGlobals = "Promise", "Proxy", "RangeError", + {name: "ReadableStream", disabled: !SpecialPowers.Cu.getJSTestingFunctions().streamsAreEnabled()}, "ReferenceError", "Reflect", "RegExp", diff --git a/dom/workers/test/serviceworkers/test_serviceworker_interfaces.js b/dom/workers/test/serviceworkers/test_serviceworker_interfaces.js index 7c0e010ef338..a93d885cec85 100644 --- a/dom/workers/test/serviceworkers/test_serviceworker_interfaces.js +++ b/dom/workers/test/serviceworkers/test_serviceworker_interfaces.js @@ -27,6 +27,8 @@ var ecmaGlobals = "ArrayBuffer", "Atomics", "Boolean", + {name: "ByteLengthQueuingStrategy", optional: true}, + {name: "CountQueuingStrategy", optional: true}, "DataView", "Date", "Error", @@ -50,6 +52,7 @@ var ecmaGlobals = "Promise", "Proxy", "RangeError", + {name: "ReadableStream", optional: true}, "ReferenceError", "Reflect", "RegExp", diff --git a/dom/workers/test/test_worker_interfaces.js b/dom/workers/test/test_worker_interfaces.js index 24b639c3a6c1..117fc9180f6e 100644 --- a/dom/workers/test/test_worker_interfaces.js +++ b/dom/workers/test/test_worker_interfaces.js @@ -27,6 +27,8 @@ var ecmaGlobals = "ArrayBuffer", "Atomics", "Boolean", + {name: "ByteLengthQueuingStrategy", optional: true}, + {name: "CountQueuingStrategy", optional: true}, "DataView", "Date", "Error", @@ -50,6 +52,7 @@ var ecmaGlobals = "Promise", "Proxy", "RangeError", + {name: "ReadableStream", optional: true}, "ReferenceError", "Reflect", "RegExp", diff --git a/js/moz.configure b/js/moz.configure index 4a8baf4d3342..29521826ba4a 100644 --- a/js/moz.configure +++ b/js/moz.configure @@ -36,6 +36,19 @@ def js_disable_shell(value): set_config('JS_DISABLE_SHELL', js_disable_shell) +# Enable SpiderMonkey's WHATWG Streams implementation +# =================================================== +js_option('--enable-streams', default=True, + help='Expose WHATWG Streams') + +@depends('--enable-streams') +def enable_streams(value): + if value: + return True + +set_config('ENABLE_STREAMS', enable_streams) +set_define('ENABLE_STREAMS', enable_streams) + # SpiderMonkey as a shared library, and how its symbols are exported # ================================================================== diff --git a/js/src/builtin/Stream.cpp b/js/src/builtin/Stream.cpp new file mode 100644 index 000000000000..f041bad214c0 --- /dev/null +++ b/js/src/builtin/Stream.cpp @@ -0,0 +1,4960 @@ +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- + * vim: set ts=8 sts=4 et sw=4 tw=99: + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#include "builtin/Stream.h" + +#include "jscntxt.h" + +#include "gc/Heap.h" +#include "vm/SelfHosting.h" + +#include "jsobjinlines.h" + +#include "vm/NativeObject-inl.h" + +using namespace js; + +enum StreamSlots { + StreamSlot_Controller, + StreamSlot_Reader, + StreamSlot_State, + StreamSlot_StoredError, + StreamSlotCount +}; + +enum ReaderSlots { + ReaderSlot_Stream, + ReaderSlot_Requests, + ReaderSlot_ClosedPromise, + ReaderSlotCount, +}; + +enum ReaderType { + ReaderType_Default, + ReaderType_BYOB +}; + +// ReadableStreamDefaultController and ReadableByteStreamController are both +// queue containers and must have these slots at identical offsets. +enum QueueContainerSlots { + QueueContainerSlot_Queue, + QueueContainerSlot_TotalSize, + QueueContainerSlotCount +}; + +// These slots are identical between the two types of ReadableStream +// controllers. +enum ControllerSlots { + ControllerSlot_Stream = QueueContainerSlotCount, + ControllerSlot_UnderlyingSource, + ControllerSlot_StrategyHWM, + ControllerSlot_Flags, + ControllerSlotCount +}; + +enum DefaultControllerSlots { + DefaultControllerSlot_StrategySize = ControllerSlotCount, + DefaultControllerSlotCount +}; + +enum ByteControllerSlots { + ByteControllerSlot_BYOBRequest = ControllerSlotCount, + ByteControllerSlot_PendingPullIntos, + ByteControllerSlot_AutoAllocateSize, + ByteControllerSlotCount +}; + +enum ControllerFlags { + ControllerFlag_Started = 1 << 0, + ControllerFlag_Pulling = 1 << 1, + ControllerFlag_PullAgain = 1 << 2, + ControllerFlag_CloseRequested = 1 << 3, + ControllerFlag_TeeBranch = 1 << 4, + ControllerFlag_TeeBranch1 = 1 << 5, + ControllerFlag_TeeBranch2 = 1 << 6 +}; + +enum BYOBRequestSlots { + BYOBRequestSlot_Controller, + BYOBRequestSlot_View, + BYOBRequestSlotCount +}; + +template +MOZ_ALWAYS_INLINE bool +Is(HandleValue v) +{ + return v.isObject() && v.toObject().is(); +} + +#ifdef DEBUG +static bool +IsReadableStreamController(const JSObject* controller) +{ + return controller->is() || + controller->is(); +} +#endif // DEBUG + +static bool +IsReadableStreamReader(const JSObject* reader) +{ + return reader->is() || + reader->is(); +} + +static inline uint32_t +ControllerFlags(const NativeObject* controller) +{ + MOZ_ASSERT(IsReadableStreamController(controller)); + return controller->getFixedSlot(ControllerSlot_Flags).toInt32(); +} + +static inline void +AddControllerFlags(NativeObject* controller, uint32_t flags) +{ + MOZ_ASSERT(IsReadableStreamController(controller)); + controller->setFixedSlot(ControllerSlot_Flags, + Int32Value(ControllerFlags(controller) | flags)); +} + +static inline void +RemoveControllerFlags(NativeObject* controller, uint32_t flags) +{ + MOZ_ASSERT(IsReadableStreamController(controller)); + controller->setFixedSlot(ControllerSlot_Flags, + Int32Value(ControllerFlags(controller) & ~flags)); +} + +static inline uint32_t +StreamState(const ReadableStream* stream) +{ + return stream->getFixedSlot(StreamSlot_State).toInt32(); +} + +static inline void +SetStreamState(ReadableStream* stream, uint32_t state) +{ + MOZ_ASSERT_IF(stream->disturbed(), state & ReadableStream::Disturbed); + MOZ_ASSERT_IF(stream->closed() || stream->errored(), !(state & ReadableStream::Readable)); + stream->setFixedSlot(StreamSlot_State, Int32Value(state)); +} + +inline bool +ReadableStream::readable() const +{ + return StreamState(this) & Readable; +} + +inline bool +ReadableStream::closed() const +{ + return StreamState(this) & Closed; +} + +inline bool +ReadableStream::errored() const +{ + return StreamState(this) & Errored; +} + +inline bool +ReadableStream::disturbed() const +{ + return StreamState(this) & Disturbed; +} + +inline static MOZ_MUST_USE ReadableStream* +StreamFromController(const NativeObject* controller) +{ + MOZ_ASSERT(IsReadableStreamController(controller)); + return &controller->getFixedSlot(ControllerSlot_Stream).toObject().as(); +} + +inline static MOZ_MUST_USE NativeObject* +ControllerFromStream(ReadableStream* stream) +{ + Value controllerVal = stream->getFixedSlot(StreamSlot_Controller); + MOZ_ASSERT(IsReadableStreamController(&controllerVal.toObject())); + return &controllerVal.toObject().as(); +} + +inline static MOZ_MUST_USE ReadableStream* +StreamFromReader(const NativeObject* reader) +{ + MOZ_ASSERT(IsReadableStreamReader(reader)); + return &reader->getFixedSlot(ReaderSlot_Stream).toObject().as(); +} + +inline static MOZ_MUST_USE NativeObject* +ReaderFromStream(NativeObject* stream) +{ + Value readerVal = stream->getFixedSlot(StreamSlot_Reader); + MOZ_ASSERT(IsReadableStreamReader(&readerVal.toObject())); + return &readerVal.toObject().as(); +} + +inline static MOZ_MUST_USE JSFunction* +NewHandler(JSContext *cx, Native handler, HandleObject target) +{ + RootedAtom funName(cx, cx->names().empty); + RootedFunction handlerFun(cx, NewNativeFunction(cx, handler, 0, funName, + gc::AllocKind::FUNCTION_EXTENDED, + GenericObject)); + if (!handlerFun) + return nullptr; + handlerFun->setExtendedSlot(0, ObjectValue(*target)); + return handlerFun; +} + +template +inline static MOZ_MUST_USE T* +TargetFromHandler(JSObject& handler) +{ + return &handler.as().getExtendedSlot(0).toObject().as(); +} + +inline static MOZ_MUST_USE bool +ResetQueue(JSContext* cx, HandleNativeObject container); + +inline static MOZ_MUST_USE bool +InvokeOrNoop(JSContext* cx, HandleValue O, HandlePropertyName P, HandleValue arg, + MutableHandleValue rval); + +static MOZ_MUST_USE JSObject* +PromiseInvokeOrNoop(JSContext* cx, HandleValue O, HandlePropertyName P, HandleValue arg); + +static MOZ_MUST_USE JSObject* +PromiseRejectedWithPendingError(JSContext* cx) { + // Not much we can do about uncatchable exceptions, just bail. + RootedValue exn(cx); + if (!GetAndClearException(cx, &exn)) + return nullptr; + return PromiseObject::unforgeableReject(cx, exn); +} + +static bool +ReportArgTypeError(JSContext* cx, const char* funName, const char* expectedType, + HandleValue arg) +{ + UniqueChars bytes = DecompileValueGenerator(cx, JSDVG_SEARCH_STACK, arg, nullptr); + if (!bytes) + return false; + + return JS_ReportErrorFlagsAndNumberLatin1(cx, JSREPORT_ERROR, GetErrorMessage, + nullptr, JSMSG_NOT_EXPECTED_TYPE, + funName, expectedType, bytes.get()); +} + +static MOZ_MUST_USE bool +RejectWithPendingError(JSContext* cx, Handle promise) { + // Not much we can do about uncatchable exceptions, just bail. + RootedValue exn(cx); + if (!GetAndClearException(cx, &exn)) + return false; + return PromiseObject::reject(cx, promise, exn); +} + +static MOZ_MUST_USE bool +ReturnPromiseRejectedWithPendingError(JSContext* cx, const CallArgs& args) +{ + JSObject* promise = PromiseRejectedWithPendingError(cx); + if (!promise) + return false; + + args.rval().setObject(*promise); + return true; +} + +static MOZ_MUST_USE bool +RejectNonGenericMethod(JSContext* cx, const CallArgs& args, + const char* className, const char* methodName) +{ + ReportValueError3(cx, JSMSG_INCOMPATIBLE_PROTO, JSDVG_SEARCH_STACK, args.thisv(), + nullptr, className, methodName); + + return ReturnPromiseRejectedWithPendingError(cx, args); +} + +inline static MOZ_MUST_USE NativeObject* +SetNewList(JSContext* cx, HandleNativeObject container, uint32_t slot) +{ + NativeObject* list = NewObjectWithNullTaggedProto(cx); + if (!list) + return nullptr; + container->setFixedSlot(slot, ObjectValue(*list)); + return list; +} + +inline static MOZ_MUST_USE bool +AppendToList(JSContext* cx, HandleNativeObject list, HandleValue value) +{ + uint32_t length = list->getDenseInitializedLength(); + + if (!list->ensureElements(cx, length + 1)) + return false; + + list->ensureDenseInitializedLength(cx, length, 1); + list->setDenseElement(length, value); + + return true; +} + +template +inline static MOZ_MUST_USE T* +PeekList(NativeObject* list) +{ + MOZ_ASSERT(list->getDenseInitializedLength() > 0); + return &list->getDenseElement(0).toObject().as(); +} + +template +inline static MOZ_MUST_USE T* +ShiftFromList(JSContext* cx, HandleNativeObject list) +{ + uint32_t length = list->getDenseInitializedLength(); + MOZ_ASSERT(length > 0); + + Rooted entry(cx, &list->getDenseElement(0).toObject().as()); + if (!list->tryShiftDenseElements(1)) { + list->moveDenseElements(0, 1, length - 1); + list->shrinkElements(cx, length - 1); + } + + list->setDenseInitializedLength(length - 1); + + return entry; +} + +class ByteStreamChunk : public NativeObject +{ + private: + enum Slots { + Slot_Buffer = 0, + Slot_ByteOffset, + Slot_ByteLength, + SlotCount + }; + + public: + static const Class class_; + + ArrayBufferObject* buffer() { + return &getFixedSlot(Slot_Buffer).toObject().as(); + } + uint32_t byteOffset() { return getFixedSlot(Slot_ByteOffset).toInt32(); } + void SetByteOffset(uint32_t offset) { + setFixedSlot(Slot_ByteOffset, Int32Value(offset)); + } + uint32_t byteLength() { return getFixedSlot(Slot_ByteLength).toInt32(); } + void SetByteLength(uint32_t length) { + setFixedSlot(Slot_ByteLength, Int32Value(length)); + } + + static ByteStreamChunk* create(JSContext* cx, HandleObject buffer, uint32_t byteOffset, + uint32_t byteLength) + { + Rooted chunk(cx, NewObjectWithClassProto(cx)); + if (!chunk) + return nullptr; + + chunk->setFixedSlot(Slot_Buffer, ObjectValue(*buffer)); + chunk->setFixedSlot(Slot_ByteOffset, Int32Value(byteOffset)); + chunk->setFixedSlot(Slot_ByteLength, Int32Value(byteLength)); + return chunk; + } +}; + +const Class ByteStreamChunk::class_ = { + "ByteStreamChunk", + JSCLASS_HAS_RESERVED_SLOTS(SlotCount) +}; + +class PullIntoDescriptor : public NativeObject +{ + private: + enum Slots { + Slot_buffer, + Slot_ByteOffset, + Slot_ByteLength, + Slot_BytesFilled, + Slot_ElementSize, + Slot_Ctor, + Slot_ReaderType, + SlotCount + }; + public: + static const Class class_; + + ArrayBufferObject* buffer() { + return &getFixedSlot(Slot_buffer).toObject().as(); + } + void setBuffer(ArrayBufferObject* buffer) { setFixedSlot(Slot_buffer, ObjectValue(*buffer)); } + JSObject* ctor() { return getFixedSlot(Slot_Ctor).toObjectOrNull(); } + uint32_t byteOffset() const { return getFixedSlot(Slot_ByteOffset).toInt32(); } + uint32_t byteLength() const { return getFixedSlot(Slot_ByteLength).toInt32(); } + uint32_t bytesFilled() const { return getFixedSlot(Slot_BytesFilled).toInt32(); } + void setBytesFilled(int32_t bytes) { setFixedSlot(Slot_BytesFilled, Int32Value(bytes)); } + uint32_t elementSize() const { return getFixedSlot(Slot_ElementSize).toInt32(); } + uint32_t readerType() const { return getFixedSlot(Slot_ReaderType).toInt32(); } + + static PullIntoDescriptor* create(JSContext* cx, HandleArrayBufferObject buffer, + uint32_t byteOffset, uint32_t byteLength, + uint32_t bytesFilled, uint32_t elementSize, + HandleObject ctor, uint32_t readerType) + { + Rooted descriptor(cx, NewObjectWithClassProto(cx)); + if (!descriptor) + return nullptr; + + descriptor->setFixedSlot(Slot_buffer, ObjectValue(*buffer)); + descriptor->setFixedSlot(Slot_Ctor, ObjectOrNullValue(ctor)); + descriptor->setFixedSlot(Slot_ByteOffset, Int32Value(byteOffset)); + descriptor->setFixedSlot(Slot_ByteLength, Int32Value(byteLength)); + descriptor->setFixedSlot(Slot_BytesFilled, Int32Value(bytesFilled)); + descriptor->setFixedSlot(Slot_ElementSize, Int32Value(elementSize)); + descriptor->setFixedSlot(Slot_ReaderType, Int32Value(readerType)); + return descriptor; + } +}; + +const Class PullIntoDescriptor::class_ = { + "PullIntoDescriptor", + JSCLASS_HAS_RESERVED_SLOTS(SlotCount) +}; + +class QueueEntry : public NativeObject +{ + private: + enum Slots { + Slot_Value = 0, + Slot_Size, + SlotCount + }; + + public: + static const Class class_; + + Value value() { return getFixedSlot(Slot_Value); } + double size() { return getFixedSlot(Slot_Size).toNumber(); } + + static QueueEntry* create(JSContext* cx, HandleValue value, double size) + { + Rooted entry(cx, NewObjectWithClassProto(cx)); + if (!entry) + return nullptr; + + entry->setFixedSlot(Slot_Value, value); + entry->setFixedSlot(Slot_Size, NumberValue(size)); + + return entry; + } +}; + +const Class QueueEntry::class_ = { + "QueueEntry", + JSCLASS_HAS_RESERVED_SLOTS(SlotCount) +}; + +class TeeState : public NativeObject +{ + private: + enum Slots { + Slot_Flags = 0, + Slot_Reason1, + Slot_Reason2, + Slot_Promise, + Slot_Stream, + Slot_Branch1, + Slot_Branch2, + SlotCount + }; + + enum Flags + { + Flag_ClosedOrErrored = 1 << 0, + Flag_Canceled1 = 1 << 1, + Flag_Canceled2 = 1 << 2, + Flag_CloneForBranch2 = 1 << 3, + }; + uint32_t flags() const { return getFixedSlot(Slot_Flags).toInt32(); } + void setFlags(uint32_t flags) { setFixedSlot(Slot_Flags, Int32Value(flags)); } + + public: + static const Class class_; + + bool cloneForBranch2() const { return flags() & Flag_CloneForBranch2; } + + bool closedOrErrored() const { return flags() & Flag_ClosedOrErrored; } + void setClosedOrErrored() { + MOZ_ASSERT(!(flags() & Flag_ClosedOrErrored)); + setFlags(flags() | Flag_ClosedOrErrored); + } + + bool canceled1() const { return flags() & Flag_Canceled1; } + void setCanceled1(HandleValue reason) { + MOZ_ASSERT(!(flags() & Flag_Canceled1)); + setFlags(flags() | Flag_Canceled1); + setFixedSlot(Slot_Reason1, reason); + } + + bool canceled2() const { return flags() & Flag_Canceled2; } + void setCanceled2(HandleValue reason) { + MOZ_ASSERT(!(flags() & Flag_Canceled2)); + setFlags(flags() | Flag_Canceled2); + setFixedSlot(Slot_Reason2, reason); + } + + Value reason1() const { + MOZ_ASSERT(canceled1()); + return getFixedSlot(Slot_Reason1); + } + + Value reason2() const { + MOZ_ASSERT(canceled2()); + return getFixedSlot(Slot_Reason2); + } + + PromiseObject* promise() { + return &getFixedSlot(Slot_Promise).toObject().as(); + } + ReadableStream* stream() { + return &getFixedSlot(Slot_Stream).toObject().as(); + } + ReadableStreamDefaultReader* reader() { + return &ReaderFromStream(stream())->as(); + } + + ReadableStreamDefaultController* branch1() { + ReadableStreamDefaultController* controller = &getFixedSlot(Slot_Branch1).toObject() + .as(); + MOZ_ASSERT(ControllerFlags(controller) & ControllerFlag_TeeBranch); + MOZ_ASSERT(ControllerFlags(controller) & ControllerFlag_TeeBranch1); + return controller; + } + void setBranch1(ReadableStreamDefaultController* controller) { + MOZ_ASSERT(ControllerFlags(controller) & ControllerFlag_TeeBranch); + MOZ_ASSERT(ControllerFlags(controller) & ControllerFlag_TeeBranch1); + setFixedSlot(Slot_Branch1, ObjectValue(*controller)); + } + + ReadableStreamDefaultController* branch2() { + ReadableStreamDefaultController* controller = &getFixedSlot(Slot_Branch2).toObject() + .as(); + MOZ_ASSERT(ControllerFlags(controller) & ControllerFlag_TeeBranch); + MOZ_ASSERT(ControllerFlags(controller) & ControllerFlag_TeeBranch2); + return controller; + } + void setBranch2(ReadableStreamDefaultController* controller) { + MOZ_ASSERT(ControllerFlags(controller) & ControllerFlag_TeeBranch); + MOZ_ASSERT(ControllerFlags(controller) & ControllerFlag_TeeBranch2); + setFixedSlot(Slot_Branch2, ObjectValue(*controller)); + } + + static TeeState* create(JSContext* cx, Handle stream) { + Rooted state(cx, NewObjectWithClassProto(cx)); + if (!state) + return nullptr; + + Rooted promise(cx, PromiseObject::createSkippingExecutor(cx)); + if (!promise) + return nullptr; + + state->setFixedSlot(Slot_Flags, Int32Value(0)); + state->setFixedSlot(Slot_Promise, ObjectValue(*promise)); + state->setFixedSlot(Slot_Stream, ObjectValue(*stream)); + + return state; + } +}; + +const Class TeeState::class_ = { + "TeeState", + JSCLASS_HAS_RESERVED_SLOTS(SlotCount) +}; + +#define CLASS_SPEC(cls, nCtorArgs, nSlots, specFlags) \ +const ClassSpec cls::classSpec_ = { \ + GenericCreateConstructor, \ + GenericCreatePrototype, \ + nullptr, \ + nullptr, \ + cls##_methods, \ + cls##_properties, \ + nullptr, \ + specFlags \ +}; \ +\ +const Class cls::class_ = { \ + #cls, \ + JSCLASS_HAS_RESERVED_SLOTS(nSlots) | \ + JSCLASS_HAS_CACHED_PROTO(JSProto_##cls), \ + JS_NULL_CLASS_OPS, \ + &cls::classSpec_ \ +}; \ +\ +const Class cls::protoClass_ = { \ + "object", \ + JSCLASS_HAS_CACHED_PROTO(JSProto_##cls), \ + JS_NULL_CLASS_OPS, \ + &cls::classSpec_ \ +}; + +// Streams spec, 3.2.3., steps 1-4. +ReadableStream* +ReadableStream::createStream(JSContext* cx) +{ + Rooted stream(cx, NewBuiltinClassInstance(cx)); + if (!stream) + return nullptr; + + // Step 1 (reordered): Set this.[[state]] to "readable". + // Step 2: Set this.[[reader]] and this.[[storedError]] to undefined (implicit). + // Step 3: Set this.[[disturbed]] to false (implicit). + // Step 4: Set this.[[readableStreamController]] to undefined (implicit). + stream->setFixedSlot(StreamSlot_State, Int32Value(Readable)); + + return stream; +} + +static MOZ_MUST_USE ReadableStreamDefaultController* +CreateReadableStreamDefaultController(JSContext* cx, Handle stream, + HandleValue underlyingSource, HandleValue size, + HandleValue highWaterMarkVal); + +// Streams spec, 3.2.3., steps 1-4, 8. +ReadableStream* +ReadableStream::createDefaultStream(JSContext* cx, HandleValue underlyingSource, + HandleValue size, HandleValue highWaterMark) +{ + + Rooted stream(cx, createStream(cx)); + if (!stream) + return nullptr; + + // Step b: Set this.[[readableStreamController]] to + // ? Construct(ReadableStreamDefaultController, + // « this, underlyingSource, size, + // highWaterMark »). + RootedObject controller(cx, CreateReadableStreamDefaultController(cx, stream, + underlyingSource, + size, + highWaterMark)); + if (!controller) + return nullptr; + + stream->setFixedSlot(StreamSlot_Controller, ObjectValue(*controller)); + + return stream; +} + +static MOZ_MUST_USE ReadableByteStreamController* +CreateReadableByteStreamController(JSContext* cx, Handle stream, + HandleValue underlyingByteSource, + HandleValue highWaterMarkVal); + +// Streams spec, 3.2.3., steps 1-4, 7. +ReadableStream* +ReadableStream::createByteStream(JSContext* cx, HandleValue underlyingSource, + HandleValue highWaterMark) +{ + + Rooted stream(cx, createStream(cx)); + if (!stream) + return nullptr; + + // Step b: Set this.[[readableStreamController]] to + // ? Construct(ReadableByteStreamController, « this, underlyingSource, + // highWaterMark »). + RootedObject controller(cx, CreateReadableByteStreamController(cx, stream, + underlyingSource, + highWaterMark)); + if (!controller) + return nullptr; + + stream->setFixedSlot(StreamSlot_Controller, ObjectValue(*controller)); + + return stream; +} + +// Streams spec, 3.2.3. +bool +ReadableStream::constructor(JSContext* cx, unsigned argc, Value* vp) +{ + CallArgs args = CallArgsFromVp(argc, vp); + + RootedValue val(cx, args.get(0)); + RootedValue underlyingSource(cx, args.get(0)); + RootedValue options(cx, args.get(1)); + + // Do argument handling first to keep the right order of error reporting. + if (underlyingSource.isUndefined()) { + RootedObject sourceObj(cx, NewBuiltinClassInstance(cx)); + if (!sourceObj) + return false; + underlyingSource = ObjectValue(*sourceObj); + } + RootedValue size(cx); + RootedValue highWaterMark(cx); + + if (!options.isUndefined()) { + if (!GetProperty(cx, options, cx->names().size, &size)) + return false; + + if (!GetProperty(cx, options, cx->names().highWaterMark, &highWaterMark)) + return false; + } + + if (!ThrowIfNotConstructing(cx, args, "ReadableStream")) + return false; + + // Step 5: Let type be ? GetV(underlyingSource, "type"). + RootedValue typeVal(cx); + if (!GetProperty(cx, underlyingSource, cx->names().type, &typeVal)) + return false; + + // Step 6: Let typeString be ? ToString(type). + RootedString type(cx, ToString(cx, typeVal)); + if (!type) + return false; + + int32_t notByteStream; + if (!CompareStrings(cx, type, cx->names().bytes, ¬ByteStream)) + return false; + + // Step 7 & 8.a (reordered): If highWaterMark is undefined, let + // highWaterMark be 1 (or 0 for byte streams). + if (highWaterMark.isUndefined()) + highWaterMark = Int32Value(notByteStream ? 1 : 0); + + Rooted stream(cx); + + // Step 7: If typeString is "bytes", + if (!notByteStream) { + stream = createByteStream(cx, underlyingSource, highWaterMark); + } else if (typeVal.isUndefined()) { + // Step 8: Otherwise, if type is undefined, + stream = createDefaultStream(cx, underlyingSource, size, highWaterMark); + } else { + // Step 9: Otherwise, throw a RangeError exception. + JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, + JSMSG_READABLESTREAM_UNDERLYINGSOURCE_TYPE_WRONG); + return false; + } + if (!stream) + return false; + + args.rval().setObject(*stream); + return true; +} + +static MOZ_ALWAYS_INLINE bool +IsReadableStreamLocked(ReadableStream* stream); + +// Streams spec, 3.2.4.1. get locked +static MOZ_MUST_USE bool +ReadableStream_locked_impl(JSContext* cx, const CallArgs& args) +{ + Rooted stream(cx, &args.thisv().toObject().as()); + + // Step 2: Return ! IsReadableStreamLocked(this). + args.rval().setBoolean(IsReadableStreamLocked(stream)); + return true; +} + +static bool +ReadableStream_locked(JSContext* cx, unsigned argc, Value* vp) +{ + // Step 1: If ! IsReadableStream(this) is false, throw a TypeError exception. + CallArgs args = CallArgsFromVp(argc, vp); + return CallNonGenericMethod, ReadableStream_locked_impl>(cx, args); +} + +static MOZ_MUST_USE JSObject* +ReadableStreamCancel(JSContext* cx, Handle stream, HandleValue reason); + +// Streams spec, 3.2.4.2. cancel ( reason ) +static MOZ_MUST_USE bool +ReadableStream_cancel(JSContext* cx, unsigned argc, Value* vp) +{ + CallArgs args = CallArgsFromVp(argc, vp); + // Step 1: If ! IsReadableStream(this) is false, return a promise rejected + // with a TypeError exception. + if (!Is(args.thisv())) { + ReportValueError3(cx, JSMSG_INCOMPATIBLE_PROTO, JSDVG_SEARCH_STACK, args.thisv(), + nullptr, "cancel", ""); + return ReturnPromiseRejectedWithPendingError(cx, args); + } + + Rooted stream(cx, &args.thisv().toObject().as()); + + // Step 2: If ! IsReadableStreamLocked(this) is true, return a promise + // rejected with a TypeError exception. + if (IsReadableStreamLocked(stream)) { + JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, + JSMSG_READABLESTREAM_NOT_LOCKED, "cancel"); + return ReturnPromiseRejectedWithPendingError(cx, args); + } + + // Step 3: Return ! ReadableStreamCancel(this, reason). + RootedObject cancelPromise(cx, ReadableStreamCancel(cx, stream, args.get(0))); + if (!cancelPromise) + return false; + args.rval().setObject(*cancelPromise); + return true; +} + +static MOZ_MUST_USE ReadableStreamDefaultReader* +CreateReadableStreamDefaultReader(JSContext* cx, Handle stream); + +static MOZ_MUST_USE ReadableStreamBYOBReader* +CreateReadableStreamBYOBReader(JSContext* cx, Handle stream); + +// Streams spec, 3.2.4.3. getReader() +static MOZ_MUST_USE bool +ReadableStream_getReader_impl(JSContext* cx, const CallArgs& args) +{ + Rooted stream(cx, &args.thisv().toObject().as()); + RootedObject reader(cx); + + // Step 2: If mode is undefined, return + // ? AcquireReadableStreamDefaultReader(this). + RootedValue modeVal(cx); + HandleValue optionsVal = args.get(0); + if (!optionsVal.isUndefined()) { + if (!GetProperty(cx, optionsVal, cx->names().mode, &modeVal)) + return false; + } + + if (modeVal.isUndefined()) { + reader = CreateReadableStreamDefaultReader(cx, stream); + } else { + // Step 3: Set mode to ? ToString(mode) (implicit). + RootedString mode(cx, ToString(cx, modeVal)); + if (!mode) + return false; + + // Step 4: If mode is "byob", return ? AcquireReadableStreamBYOBReader(this). + int32_t notByob; + if (!CompareStrings(cx, mode, cx->names().byob, ¬Byob)) + return false; + if (notByob) { + JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, + JSMSG_READABLESTREAM_INVALID_READER_MODE); + // Step 5: Throw a RangeError exception. + return false; + + } + reader = CreateReadableStreamBYOBReader(cx, stream); + } + + // Reordered second part of steps 2 and 4. + if (!reader) + return false; + args.rval().setObject(*reader); + return true; +} + +static bool +ReadableStream_getReader(JSContext* cx, unsigned argc, Value* vp) +{ + // Step 1: If ! IsReadableStream(this) is false, throw a TypeError exception. + CallArgs args = CallArgsFromVp(argc, vp); + return CallNonGenericMethod, ReadableStream_getReader_impl>(cx, args); +} + +// Streams spec, 3.2.4.4. pipeThrough({ writable, readable }, options) +static MOZ_MUST_USE bool +ReadableStream_pipeThrough(JSContext* cx, unsigned argc, Value* vp) +{ + JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, + JSMSG_READABLESTREAM_METHOD_NOT_IMPLEMENTED, "pipeThrough"); + return false; + // // Step 1: Perform ? Invoke(this, "pipeTo", « writable, options »). + + // // Step 2: Return readable. + // return readable; +} + +// Streams spec, 3.2.4.5. pipeTo(dest, { preventClose, preventAbort, preventCancel } = {}) +// TODO: Unimplemented since spec is not complete yet. +static MOZ_MUST_USE bool +ReadableStream_pipeTo(JSContext* cx, unsigned argc, Value* vp) +{ + JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, + JSMSG_READABLESTREAM_METHOD_NOT_IMPLEMENTED, "pipeTo"); + return false; +} + +static MOZ_MUST_USE bool +ReadableStreamTee(JSContext* cx, Handle stream, bool cloneForBranch2, + MutableHandle branch1, MutableHandle branch2); + +// Streams spec, 3.2.4.6. tee() +static MOZ_MUST_USE bool +ReadableStream_tee_impl(JSContext* cx, const CallArgs& args) +{ + Rooted stream(cx, &args.thisv().toObject().as()); + + // Step 2: Let branches be ? ReadableStreamTee(this, false). + Rooted branch1(cx); + Rooted branch2(cx); + if (!ReadableStreamTee(cx, stream, false, &branch1, &branch2)) + return false; + + // Step 3: Return ! CreateArrayFromList(branches). + RootedNativeObject branches(cx, NewDenseFullyAllocatedArray(cx, 2)); + if (!branches) + return false; + branches->setDenseInitializedLength(2); + branches->initDenseElement(0, ObjectValue(*branch1)); + branches->initDenseElement(1, ObjectValue(*branch2)); + + args.rval().setObject(*branches); + return true; +} + +static bool +ReadableStream_tee(JSContext* cx, unsigned argc, Value* vp) +{ + // Step 1: If ! IsReadableStream(this) is false, throw a TypeError exception + CallArgs args = CallArgsFromVp(argc, vp); + return CallNonGenericMethod, ReadableStream_tee_impl>(cx, args); +} + +static const JSFunctionSpec ReadableStream_methods[] = { + JS_FN("cancel", ReadableStream_cancel, 1, 0), + JS_FN("getReader", ReadableStream_getReader, 0, 0), + JS_FN("pipeThrough", ReadableStream_pipeThrough, 2, 0), + JS_FN("pipeTo", ReadableStream_pipeTo, 1, 0), + JS_FN("tee", ReadableStream_tee, 0, 0), + JS_FS_END +}; + +static const JSPropertySpec ReadableStream_properties[] = { + JS_PSG("locked", ReadableStream_locked, 0), + JS_PS_END +}; + +CLASS_SPEC(ReadableStream, 0, StreamSlotCount, 0); + +// Streams spec, 3.3.1. AcquireReadableStreamBYOBReader ( stream ) +// Always inlined. + +// Streams spec, 3.3.2. AcquireReadableStreamDefaultReader ( stream ) +// Always inlined. + +// Streams spec, 3.3.3. IsReadableStream ( x ) +// Using is instead. + +// Streams spec, 3.3.4. IsReadableStreamDisturbed ( stream ) +static MOZ_ALWAYS_INLINE bool +IsReadableStreamDisturbed(ReadableStream* stream) +{ + // Step 1: Assert: ! IsReadableStream(stream) is true (implicit). + // Step 2: Return stream.[[disturbed]]. + return stream->disturbed(); +} + +// Streams spec, 3.3.5. IsReadableStreamLocked ( stream ) +static MOZ_ALWAYS_INLINE bool +IsReadableStreamLocked(ReadableStream* stream) +{ + // Step 1: Assert: ! IsReadableStream(stream) is true (implicit). + // Step 2: If stream.[[reader]] is undefined, return false. + // Step 3: Return true. + return !stream->getFixedSlot(StreamSlot_Reader).isUndefined(); +} + +static MOZ_MUST_USE bool +ReadableStreamDefaultControllerClose(JSContext* cx, + Handle controller); +static MOZ_MUST_USE bool +ReadableStreamDefaultControllerEnqueue(JSContext* cx, + Handle controller, + HandleValue chunk); + +static bool +TeeReaderReadHandler(JSContext* cx, unsigned argc, Value* vp) +{ + CallArgs args = CallArgsFromVp(argc, vp); + Rooted teeState(cx, TargetFromHandler(args.callee())); + HandleValue resultVal = args.get(0); + + // Step a: Assert: Type(result) is Object. + RootedObject result(cx, &resultVal.toObject()); + + // Step b: Let value be ? Get(result, "value"). + RootedValue value(cx); + if (!GetPropertyPure(cx, result, NameToId(cx->names().value), value.address())) + return false; + + // Step c: Let done be ? Get(result, "done"). + RootedValue doneVal(cx); + if (!GetPropertyPure(cx, result, NameToId(cx->names().done), doneVal.address())) + return false; + + // Step d: Assert: Type(done) is Boolean. + bool done = doneVal.toBoolean(); + + // Step e: If done is true and teeState.[[closedOrErrored]] is false, + if (done && !teeState->closedOrErrored()) { + // Step i: If teeState.[[canceled1]] is false, + if (!teeState->canceled1()) { + // Step 1: Perform ! ReadableStreamDefaultControllerClose(branch1). + Rooted branch1(cx, teeState->branch1()); + if (!ReadableStreamDefaultControllerClose(cx, branch1)) + return false; + } + + // Step ii: If teeState.[[canceled2]] is false, + if (!teeState->canceled2()) { + // Step 1: Perform ! ReadableStreamDefaultControllerClose(branch1). + Rooted branch2(cx, teeState->branch2()); + if (!ReadableStreamDefaultControllerClose(cx, branch2)) + return false; + } + + // Step iii: Set teeState.[[closedOrErrored]] to true. + teeState->setClosedOrErrored(); + } + + // Step f: If teeState.[[closedOrErrored]] is true, return. + if (teeState->closedOrErrored()) + return true; + + // Step g: Let value1 and value2 be value. + RootedValue value1(cx, value); + RootedValue value2(cx, value); + + // Step h: If teeState.[[canceled2]] is false and cloneForBranch2 is + // true, set value2 to + // ? StructuredDeserialize(StructuredSerialize(value2), + // the current Realm Record). + // TODO: add StructuredClone() intrinsic. + MOZ_ASSERT(!teeState->cloneForBranch2(), "tee(cloneForBranch2=true) should not be exposed"); + + // Step i: If teeState.[[canceled1]] is false, perform + // ? ReadableStreamDefaultControllerEnqueue(branch1, value1). + Rooted controller(cx); + if (!teeState->canceled1()) { + controller = teeState->branch1(); + if (!ReadableStreamDefaultControllerEnqueue(cx, controller, value1)) + return false; + } + + // Step j: If teeState.[[canceled2]] is false, + // perform ? ReadableStreamDefaultControllerEnqueue(branch2, value2). + if (!teeState->canceled2()) { + controller = teeState->branch2(); + if (!ReadableStreamDefaultControllerEnqueue(cx, controller, value2)) + return false; + } + + args.rval().setUndefined(); + return true; +} + +static MOZ_MUST_USE JSObject* +ReadableStreamDefaultReaderRead(JSContext* cx, HandleNativeObject reader); + +static MOZ_MUST_USE JSObject* +ReadableStreamTee_Pull(JSContext* cx, Handle teeState, + Handle branchStream) +{ + // Step 1: Let reader be F.[[reader]], branch1 be F.[[branch1]], + // branch2 be F.[[branch2]], teeState be F.[[teeState]], and + // cloneForBranch2 be F.[[cloneForBranch2]]. + + // Step 2: Return the result of transforming + // ! ReadableStreamDefaultReaderRead(reader) by a fulfillment + // handler which takes the argument result and performs the + // following steps: + Rooted reader(cx, teeState->reader()); + RootedObject readPromise(cx, ReadableStreamDefaultReaderRead(cx, reader)); + if (!readPromise) + return nullptr; + + RootedObject onFulfilled(cx, NewHandler(cx, TeeReaderReadHandler, teeState)); + if (!onFulfilled) + return nullptr; + + return JS::CallOriginalPromiseThen(cx, readPromise, onFulfilled, nullptr); +} + +static MOZ_MUST_USE JSObject* +ReadableStreamTee_Cancel(JSContext* cx, Handle teeState, + Handle branch, HandleValue reason) +{ + // Step 1: Let stream be F.[[stream]] and teeState be F.[[teeState]]. + Rooted stream(cx, teeState->stream()); + + bool bothBranchesCanceled = false; + + // Step 2: Set teeState.[[canceled1]] to true. + // Step 3: Set teeState.[[reason1]] to reason. + if (ControllerFlags(branch) & ControllerFlag_TeeBranch1) { + teeState->setCanceled1(reason); + bothBranchesCanceled = teeState->canceled2(); + } else { + MOZ_ASSERT(ControllerFlags(branch) & ControllerFlag_TeeBranch2); + teeState->setCanceled2(reason); + bothBranchesCanceled = teeState->canceled1(); + } + + // Step 4: If teeState.[[canceled1]] is true, + // Step 4: If teeState.[[canceled2]] is true, + if (bothBranchesCanceled) { + // Step a: Let compositeReason be + // ! CreateArrayFromList(« teeState.[[reason1]], teeState.[[reason2]] »). + RootedNativeObject compositeReason(cx, NewDenseFullyAllocatedArray(cx, 2)); + if (!compositeReason) + return nullptr; + + compositeReason->setDenseInitializedLength(2); + compositeReason->initDenseElement(0, teeState->reason1()); + compositeReason->initDenseElement(1, teeState->reason2()); + RootedValue compositeReasonVal(cx, ObjectValue(*compositeReason)); + + Rooted promise(cx, teeState->promise()); + + // Step b: Let cancelResult be ! ReadableStreamCancel(stream, compositeReason). + RootedObject cancelResult(cx, ReadableStreamCancel(cx, stream, compositeReasonVal)); + if (!cancelResult) { + if (!RejectWithPendingError(cx, promise)) + return nullptr; + } else { + // Step c: Resolve teeState.[[promise]] with cancelResult. + RootedValue resultVal(cx, ObjectValue(*cancelResult)); + if (!PromiseObject::resolve(cx, promise, resultVal)) + return nullptr; + } + } + + // Step 5: Return teeState.[[promise]]. + return teeState->promise(); +} + +static MOZ_MUST_USE bool +ReadableStreamControllerError(JSContext* cx, HandleNativeObject controller, HandleValue e); + +// Streams spec, 3.3.6. step 21: +// Upon rejection of reader.[[closedPromise]] with reason r, +static bool +TeeReaderClosedHandler(JSContext* cx, unsigned argc, Value* vp) +{ + CallArgs args = CallArgsFromVp(argc, vp); + Rooted teeState(cx, TargetFromHandler(args.callee())); + HandleValue reason = args.get(0); + + // Step a: If teeState.[[closedOrErrored]] is false, then: + if (!teeState->closedOrErrored()) { + // Step a.i: Perform ! ReadableStreamDefaultControllerError(pull.[[branch1]], r). + Rooted branch1(cx, teeState->branch1()); + if (!ReadableStreamControllerError(cx, branch1, reason)) + return false; + + // Step a.ii: Perform ! ReadableStreamDefaultControllerError(pull.[[branch2]], r). + Rooted branch2(cx, teeState->branch2()); + if (!ReadableStreamControllerError(cx, branch2, reason)) + return false; + + // Step a.iii: Set teeState.[[closedOrErrored]] to true. + teeState->setClosedOrErrored(); + } + + return true; +} + +// Streams spec, 3.3.6. ReadableStreamTee ( stream, cloneForBranch2 ) +static MOZ_MUST_USE bool +ReadableStreamTee(JSContext* cx, Handle stream, bool cloneForBranch2, + MutableHandle branch1Stream, + MutableHandle branch2Stream) +{ + // Step 1: Assert: ! IsReadableStream(stream) is true (implicit). + // Step 2: Assert: Type(cloneForBranch2) is Boolean (implicit). + + // Step 3: Let reader be ? AcquireReadableStreamDefaultReader(stream). + Rooted reader(cx, CreateReadableStreamDefaultReader(cx, stream)); + if (!reader) + return false; + + // Step 4: Let teeState be Record {[[closedOrErrored]]: false, + // [[canceled1]]: false, + // [[canceled2]]: false, + // [[reason1]]: undefined, + // [[reason2]]: undefined, + // [[promise]]: a new promise}. + Rooted teeState(cx, TeeState::create(cx, stream)); + if (!teeState) + return false; + + // Steps 5-10 omitted because our implementation works differently. + + // Step 5: Let pull be a new ReadableStreamTee pull function. + // Step 6: Set pull.[[reader]] to reader, pull.[[teeState]] to teeState, and + // pull.[[cloneForBranch2]] to cloneForBranch2. + // Step 7: Let cancel1 be a new ReadableStreamTee branch 1 cancel function. + // Step 8: Set cancel1.[[stream]] to stream and cancel1.[[teeState]] to + // teeState. + + // Step 9: Let cancel2 be a new ReadableStreamTee branch 2 cancel function. + // Step 10: Set cancel2.[[stream]] to stream and cancel2.[[teeState]] to + // teeState. + + // Step 11: Let underlyingSource1 be ! ObjectCreate(%ObjectPrototype%). + // Step 12: Perform ! CreateDataProperty(underlyingSource1, "pull", pull). + // Step 13: Perform ! CreateDataProperty(underlyingSource1, "cancel", cancel1). + + // Step 14: Let branch1Stream be ! Construct(ReadableStream, underlyingSource1). + RootedValue hwmValue(cx, NumberValue(1)); + RootedValue underlyingSource(cx, ObjectValue(*teeState)); + branch1Stream.set(ReadableStream::createDefaultStream(cx, underlyingSource, + UndefinedHandleValue, + hwmValue)); + if (!branch1Stream) + return false; + + Rooted branch1(cx); + branch1 = &ControllerFromStream(branch1Stream)->as(); + AddControllerFlags(branch1, ControllerFlag_TeeBranch | ControllerFlag_TeeBranch1); + teeState->setBranch1(branch1); + + // Step 15: Let underlyingSource2 be ! ObjectCreate(%ObjectPrototype%). + // Step 16: Perform ! CreateDataProperty(underlyingSource2, "pull", pull). + // Step 17: Perform ! CreateDataProperty(underlyingSource2, "cancel", cancel2). + + // Step 18: Let branch2Stream be ! Construct(ReadableStream, underlyingSource2). + branch2Stream.set(ReadableStream::createDefaultStream(cx, underlyingSource, + UndefinedHandleValue, + hwmValue)); + if (!branch2Stream) + return false; + + Rooted branch2(cx); + branch2 = &ControllerFromStream(branch2Stream)->as(); + AddControllerFlags(branch2, ControllerFlag_TeeBranch | ControllerFlag_TeeBranch2); + teeState->setBranch2(branch2); + + // Step 19: Set pull.[[branch1]] to branch1Stream.[[readableStreamController]]. + // Step 20: Set pull.[[branch2]] to branch2Stream.[[readableStreamController]]. + + // Step 21: Upon rejection of reader.[[closedPromise]] with reason r, + RootedObject closedPromise(cx, &reader->getFixedSlot(ReaderSlot_ClosedPromise).toObject()); + + RootedObject onRejected(cx, NewHandler(cx, TeeReaderClosedHandler, teeState)); + if (!onRejected) + return false; + + if (!JS::AddPromiseReactions(cx, closedPromise, nullptr, onRejected)) + return false; + + // Step 22: Return « branch1, branch2 ». + return true; +} + +// Streams spec, 3.4.1. ReadableStreamAddReadIntoRequest ( stream ) +static MOZ_MUST_USE PromiseObject* +ReadableStreamAddReadIntoRequest(JSContext* cx, Handle stream) +{ + // Step 1: MOZ_ASSERT: ! IsReadableStreamBYOBReader(stream.[[reader]]) is true. + RootedValue val(cx, stream->getFixedSlot(StreamSlot_Reader)); + RootedNativeObject reader(cx, &val.toObject().as()); + + // Step 2: MOZ_ASSERT: stream.[[state]] is "readable" or "closed". + MOZ_ASSERT(stream->readable() || stream->closed()); + + // Step 3: Let promise be a new promise. + Rooted promise(cx, PromiseObject::createSkippingExecutor(cx)); + if (!promise) + return nullptr; + + // Step 4: Let readIntoRequest be Record {[[promise]]: promise}. + // Step 5: Append readIntoRequest as the last element of stream.[[reader]].[[readIntoRequests]]. + val = reader->getFixedSlot(ReaderSlot_Requests); + RootedNativeObject readIntoRequests(cx, &val.toObject().as()); + // Since [[promise]] is the Record's only field, we store it directly. + val = ObjectValue(*promise); + if (!AppendToList(cx, readIntoRequests, val)) + return nullptr; + + // Step 6: Return promise. + return promise; +} + +// Streams spec, 3.4.2. ReadableStreamAddReadRequest ( stream ) +static MOZ_MUST_USE PromiseObject* +ReadableStreamAddReadRequest(JSContext* cx, Handle stream) +{ + MOZ_ASSERT(stream->is()); + + // Step 1: Assert: ! IsReadableStreamDefaultReader(stream.[[reader]]) is true. + RootedNativeObject reader(cx, ReaderFromStream(stream)); + + // Step 2: Assert: stream.[[state]] is "readable". + MOZ_ASSERT(stream->readable()); + + // Step 3: Let promise be a new promise. + Rooted promise(cx, PromiseObject::createSkippingExecutor(cx)); + if (!promise) + return nullptr; + + // Step 4: Let readRequest be Record {[[promise]]: promise}. + // Step 5: Append readRequest as the last element of stream.[[reader]].[[readRequests]]. + RootedValue val(cx, reader->getFixedSlot(ReaderSlot_Requests)); + RootedNativeObject readRequests(cx, &val.toObject().as()); + + // Since [[promise]] is the Record's only field, we store it directly. + val = ObjectValue(*promise); + if (!AppendToList(cx, readRequests, val)) + return nullptr; + + // Step 6: Return promise. + return promise; +} + +static MOZ_MUST_USE bool +ReadableStreamClose(JSContext* cx, Handle stream); + +static MOZ_MUST_USE JSObject* +ReadableStreamControllerCancelSteps(JSContext* cx, + HandleNativeObject controller, HandleValue reason); + +// Used for transforming the result of promise fulfillment/rejection. +static bool +ReturnUndefined(JSContext* cx, unsigned argc, Value* vp) +{ + CallArgs args = CallArgsFromVp(argc, vp); + args.rval().setUndefined(); + return true; +} + +// Streams spec, 3.4.3. ReadableStreamCancel ( stream, reason ) +static MOZ_MUST_USE JSObject* +ReadableStreamCancel(JSContext* cx, Handle stream, HandleValue reason) +{ + // Step 1: Set stream.[[disturbed]] to true. + uint32_t state = StreamState(stream) | ReadableStream::Disturbed; + SetStreamState(stream, state); + + // Step 2: If stream.[[state]] is "closed", return a new promise resolved + // with undefined. + if (stream->closed()) + return PromiseObject::unforgeableResolve(cx, UndefinedHandleValue); + + // Step 3: If stream.[[state]] is "errored", return a new promise rejected + // with stream.[[storedError]]. + if (stream->errored()) { + RootedValue storedError(cx, stream->getFixedSlot(StreamSlot_StoredError)); + return PromiseObject::unforgeableReject(cx, storedError); + } + + // Step 4: Perform ! ReadableStreamClose(stream). + if (!ReadableStreamClose(cx, stream)) + return nullptr; + + // Step 5: Let sourceCancelPromise be + // ! stream.[[readableStreamController]].[[CancelSteps]](reason). + RootedNativeObject controller(cx, ControllerFromStream(stream)); + RootedObject sourceCancelPromise(cx); + sourceCancelPromise = ReadableStreamControllerCancelSteps(cx, controller, reason); + if (!sourceCancelPromise) + return nullptr; + + // Step 6: Return the result of transforming sourceCancelPromise by a + // fulfillment handler that returns undefined. + RootedAtom funName(cx, cx->names().empty); + RootedFunction returnUndefined(cx, + NewNativeFunction(cx, ReturnUndefined, 0, funName)); + if (!returnUndefined) + return nullptr; + return JS::CallOriginalPromiseThen(cx, sourceCancelPromise, returnUndefined, nullptr); +} + +// Streams spec, 3.4.4. ReadableStreamClose ( stream ) +static MOZ_MUST_USE bool +ReadableStreamClose(JSContext* cx, Handle stream) +{ + // Step 1: Assert: stream.[[state]] is "readable". + MOZ_ASSERT(stream->readable()); + + uint32_t state = StreamState(stream); + // Step 2: Set stream.[[state]] to "closed". + SetStreamState(stream, (state & ReadableStream::Disturbed) | ReadableStream::Closed); + + // Step 3: Let reader be stream.[[reader]]. + RootedValue val(cx, stream->getFixedSlot(StreamSlot_Reader)); + + // Step 4: If reader is undefined, return. + if (val.isUndefined()) + return true; + + // Step 5: If ! IsReadableStreamDefaultReader(reader) is true, + RootedNativeObject reader(cx, &val.toObject().as()); + if (reader->is()) { + // Step a: Repeat for each readRequest that is an element of + // reader.[[readRequests]], + val = reader->getFixedSlot(ReaderSlot_Requests); + if (!val.isUndefined()) { + RootedNativeObject readRequests(cx, &val.toObject().as()); + uint32_t len = readRequests->getDenseInitializedLength(); + RootedObject readRequest(cx); + RootedObject resultObj(cx); + RootedValue resultVal(cx); + for (uint32_t i = 0; i < len; i++) { + // Step i: Resolve readRequest.[[promise]] with + // ! CreateIterResultObject(undefined, true). + readRequest = &readRequests->getDenseElement(i).toObject(); + resultObj = CreateIterResultObject(cx, UndefinedHandleValue, true); + if (!resultObj) + return false; + resultVal = ObjectValue(*resultObj); + if (!ResolvePromise(cx, readRequest, resultVal)) + return false; + } + + // Step b: Set reader.[[readRequests]] to an empty List. + reader->setFixedSlot(ReaderSlot_Requests, UndefinedValue()); + } + } + + // Step 6: Resolve reader.[[closedPromise]] with undefined. + // Step 7: Return (implicit). + RootedObject closedPromise(cx, &reader->getFixedSlot(ReaderSlot_ClosedPromise).toObject()); + return ResolvePromise(cx, closedPromise, UndefinedHandleValue); +} + +// Streams spec, 3.4.5. ReadableStreamError ( stream, e ) +static MOZ_MUST_USE bool +ReadableStreamError(JSContext* cx, Handle stream, HandleValue e) +{ + // Step 1: Assert: ! IsReadableStream(stream) is true (implicit). + + // Step 2: Assert: stream.[[state]] is "readable". + MOZ_ASSERT(stream->readable()); + + // Step 3: Set stream.[[state]] to "errored". + uint32_t state = StreamState(stream); + SetStreamState(stream, (state & ReadableStream::Disturbed) | ReadableStream::Errored); + + // Step 4: Set stream.[[storedError]] to e. + stream->setFixedSlot(StreamSlot_StoredError, e); + + // Step 5: Let reader be stream.[[reader]]. + RootedValue val(cx, stream->getFixedSlot(StreamSlot_Reader)); + + // Step 6: If reader is undefined, return. + if (val.isUndefined()) + return true; + RootedNativeObject reader(cx, &val.toObject().as()); + + // Steps 7,8: (Identical in our implementation.) + // Step a: Repeat for each readRequest that is an element of + // reader.[[readRequests]], + val = reader->getFixedSlot(ReaderSlot_Requests); + RootedNativeObject readRequests(cx, &val.toObject().as()); + Rooted readRequest(cx); + uint32_t len = readRequests->getDenseInitializedLength(); + for (uint32_t i = 0; i < len; i++) { + // Step i: Reject readRequest.[[promise]] with e. + val = readRequests->getDenseElement(i); + readRequest = &val.toObject().as(); + if (!PromiseObject::reject(cx, readRequest, e)) + return false; + } + + // Step b: Set reader.[[readRequests]] to a new empty List. + if (!SetNewList(cx, reader, ReaderSlot_Requests)) + return false; + + // Step 9: Reject reader.[[closedPromise]] with e. + val = reader->getFixedSlot(ReaderSlot_ClosedPromise); + Rooted closedPromise(cx, &val.toObject().as()); + return PromiseObject::reject(cx, closedPromise, e); +} + +// Streams spec, 3.4.6. ReadableStreamFulfillReadIntoRequest( stream, chunk, done ) +// Streams spec, 3.4.7. ReadableStreamFulfillReadRequest ( stream, chunk, done ) +// These two spec functions are identical in our implementation. +static MOZ_MUST_USE bool +ReadableStreamFulfillReadOrReadIntoRequest(JSContext* cx, Handle stream, + HandleValue chunk, bool done) +{ + // Step 1: Let reader be stream.[[reader]]. + RootedValue val(cx, stream->getFixedSlot(StreamSlot_Reader)); + RootedNativeObject reader(cx, &val.toObject().as()); + + // Step 2: Let readIntoRequest be the first element of + // reader.[[readIntoRequests]]. + // Step 3: Remove readIntoRequest from reader.[[readIntoRequests]], shifting + // all other elements downward (so that the second becomes the first, + // and so on). + val = reader->getFixedSlot(ReaderSlot_Requests); + RootedNativeObject readIntoRequests(cx, &val.toObject().as()); + Rooted readIntoRequest(cx); + readIntoRequest = ShiftFromList(cx, readIntoRequests); + MOZ_ASSERT(readIntoRequest); + + // Step 4: Resolve readIntoRequest.[[promise]] with + // ! CreateIterResultObject(chunk, done). + RootedObject iterResult(cx, CreateIterResultObject(cx, chunk, done)); + if (!iterResult) + return false; + val = ObjectValue(*iterResult); + return PromiseObject::resolve(cx, readIntoRequest, val); +} + +// Streams spec, 3.4.8. ReadableStreamGetNumReadIntoRequests ( stream ) +// Streams spec, 3.4.9. ReadableStreamGetNumReadRequests ( stream ) +// (Identical implementation.) +static uint32_t +ReadableStreamGetNumReadRequests(NativeObject* stream) +{ + MOZ_ASSERT(stream->is()); + + // Step 1: Return the number of elements in + // stream.[[reader]].[[readRequests]]. + Value readerVal = stream->getFixedSlot(StreamSlot_Reader); + NativeObject* reader = &readerVal.toObject().as(); + MOZ_ASSERT(reader->is() || + reader->is()); + Value readRequests = reader->getFixedSlot(ReaderSlot_Requests); + return readRequests.toObject().as().getDenseInitializedLength(); +} + +// Stream spec 3.4.10. ReadableStreamHasBYOBReader ( stream ) +static MOZ_MUST_USE bool +ReadableStreamHasBYOBReader(ReadableStream* stream) +{ + // Step 1: Let reader be stream.[[reader]]. + // Step 2: If reader is undefined, return false. + // Step 3: If ! IsReadableStreamBYOBReader(reader) is false, return false. + // Step 4: Return true. + Value reader = stream->getFixedSlot(StreamSlot_Reader); + return reader.isObject() && reader.toObject().is(); +} + +// Streap spec 3.4.11. ReadableStreamHasDefaultReader ( stream ) +static MOZ_MUST_USE bool +ReadableStreamHasDefaultReader(ReadableStream* stream) +{ + // Step 1: Let reader be stream.[[reader]]. + // Step 2: If reader is undefined, return false. + // Step 3: If ! ReadableStreamDefaultReader(reader) is false, return false. + // Step 4: Return true. + Value reader = stream->getFixedSlot(StreamSlot_Reader); + return reader.isObject() && reader.toObject().is(); +} + +static MOZ_MUST_USE bool +ReadableStreamReaderGenericInitialize(JSContext* cx, + HandleNativeObject reader, + Handle stream); + +// Stream spec, 3.5.3. new ReadableStreamDefaultReader ( stream ) +// Steps 2-4. +static MOZ_MUST_USE ReadableStreamDefaultReader* +CreateReadableStreamDefaultReader(JSContext* cx, Handle stream) +{ + Rooted reader(cx); + reader = NewBuiltinClassInstance(cx); + if (!reader) + return nullptr; + + // Step 2: If ! IsReadableStreamLocked(stream) is true, throw a TypeError + // exception. + if (IsReadableStreamLocked(stream)) { + JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, + JSMSG_READABLESTREAM_LOCKED); + return nullptr; + } + + // Step 3: Perform ! ReadableStreamReaderGenericInitialize(this, stream). + if (!ReadableStreamReaderGenericInitialize(cx, reader, stream)) + return nullptr; + + // Step 4: Set this.[[readRequests]] to a new empty List. + if (!SetNewList(cx, reader, ReaderSlot_Requests)) + return nullptr; + + return reader; +} + +// Stream spec, 3.5.3. new ReadableStreamDefaultReader ( stream ) +bool +ReadableStreamDefaultReader::constructor(JSContext* cx, unsigned argc, Value* vp) +{ + CallArgs args = CallArgsFromVp(argc, vp); + + if (!ThrowIfNotConstructing(cx, args, "ReadableStreamDefaultReader")) + return false; + + // Step 1: If ! IsReadableStream(stream) is false, throw a TypeError exception. + if (!Is(args.get(0))) { + ReportArgTypeError(cx, "ReadableStreamDefaultReader", "ReadableStream", + args.get(0)); + return false; + } + + Rooted stream(cx, &args.get(0).toObject().as()); + + RootedObject reader(cx, CreateReadableStreamDefaultReader(cx, stream)); + if (!reader) + return false; + + args.rval().setObject(*reader); + return true; +} + +// Streams spec, 3.5.4.1 get closed +static MOZ_MUST_USE bool +ReadableStreamDefaultReader_closed(JSContext* cx, unsigned argc, Value* vp) +{ + CallArgs args = CallArgsFromVp(argc, vp); + + // Step 1: If ! IsReadableStreamDefaultReader(this) is false, return a promise + // rejected with a TypeError exception. + if (!Is(args.thisv())) + return RejectNonGenericMethod(cx, args, "ReadableStreamDefaultReader", "get closed"); + + // Step 2: Return this.[[closedPromise]]. + NativeObject* reader = &args.thisv().toObject().as(); + args.rval().set(reader->getFixedSlot(ReaderSlot_ClosedPromise)); + return true; +} + +static MOZ_MUST_USE JSObject* +ReadableStreamReaderGenericCancel(JSContext* cx, HandleNativeObject reader, HandleValue reason); + +// Streams spec, 3.5.4.2. cancel ( reason ) +static MOZ_MUST_USE bool +ReadableStreamDefaultReader_cancel(JSContext* cx, unsigned argc, Value* vp) +{ + CallArgs args = CallArgsFromVp(argc, vp); + + // Step 1: If ! IsReadableStreamDefaultReader(this) is false, return a promise + // rejected with a TypeError exception. + if (!Is(args.thisv())) + return RejectNonGenericMethod(cx, args, "ReadableStreamDefaultReader", "cancel"); + + // Step 2: If this.[[ownerReadableStream]] is undefined, return a promise + // rejected with a TypeError exception. + RootedNativeObject reader(cx, &args.thisv().toObject().as()); + if (reader->getFixedSlot(ReaderSlot_Stream).isUndefined()) { + JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, + JSMSG_READABLESTREAMREADER_NOT_OWNED, "cancel"); + return ReturnPromiseRejectedWithPendingError(cx, args); + } + + // Step 3: Return ! ReadableStreamReaderGenericCancel(this, reason). + JSObject* cancelPromise = ReadableStreamReaderGenericCancel(cx, reader, args.get(0)); + if (!cancelPromise) + return false; + args.rval().setObject(*cancelPromise); + return true; +} + +// Streams spec, 3.5.4.3 read ( ) +static MOZ_MUST_USE bool +ReadableStreamDefaultReader_read(JSContext* cx, unsigned argc, Value* vp) +{ + CallArgs args = CallArgsFromVp(argc, vp); + + // Step 1: If ! IsReadableStreamDefaultReader(this) is false, return a promise + // rejected with a TypeError exception. + if (!Is(args.thisv())) + return RejectNonGenericMethod(cx, args, "ReadableStreamDefaultReader", "read"); + + // Step 2: If this.[[ownerReadableStream]] is undefined, return a promise + // rejected with a TypeError exception. + RootedNativeObject reader(cx, &args.thisv().toObject().as()); + if (reader->getFixedSlot(ReaderSlot_Stream).isUndefined()) { + JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, + JSMSG_READABLESTREAMREADER_NOT_OWNED, "read"); + return ReturnPromiseRejectedWithPendingError(cx, args); + } + + // Step 3: Return ! ReadableStreamDefaultReaderRead(this). + JSObject* readPromise = ReadableStreamDefaultReaderRead(cx, reader); + if (!readPromise) + return false; + args.rval().setObject(*readPromise); + return true; +} + +static MOZ_MUST_USE bool +ReadableStreamReaderGenericRelease(JSContext* cx, HandleNativeObject reader); + +// Streams spec, 3.5.4.4. releaseLock ( ) +static MOZ_MUST_USE bool +ReadableStreamDefaultReader_releaseLock_impl(JSContext* cx, const CallArgs& args) +{ + Rooted reader(cx); + reader = &args.thisv().toObject().as(); + + // Step 2: If this.[[ownerReadableStream]] is undefined, return. + if (reader->getFixedSlot(ReaderSlot_Stream).isUndefined()) { + args.rval().setUndefined(); + return true; + } + + // Step 3: If this.[[readRequests]] is not empty, throw a TypeError exception. + Value val = reader->getFixedSlot(ReaderSlot_Requests); + if (!val.isUndefined()) { + NativeObject* readRequests = &val.toObject().as(); + uint32_t len = readRequests->getDenseInitializedLength(); + if (len != 0) { + JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, + JSMSG_READABLESTREAMREADER_NOT_EMPTY, + "releaseLock"); + return false; + } + } + + // Step 4: Perform ! ReadableStreamReaderGenericRelease(this). + return ReadableStreamReaderGenericRelease(cx, reader); +} + +static bool +ReadableStreamDefaultReader_releaseLock(JSContext* cx, unsigned argc, Value* vp) +{ + // Step 1: If ! IsReadableStreamDefaultReader(this) is false, + // throw a TypeError exception. + CallArgs args = CallArgsFromVp(argc, vp); + return CallNonGenericMethod, + ReadableStreamDefaultReader_releaseLock_impl>(cx, args); +} + +static const JSFunctionSpec ReadableStreamDefaultReader_methods[] = { + JS_FN("cancel", ReadableStreamDefaultReader_cancel, 1, 0), + JS_FN("read", ReadableStreamDefaultReader_read, 0, 0), + JS_FN("releaseLock", ReadableStreamDefaultReader_releaseLock, 0, 0), + JS_FS_END +}; + +static const JSPropertySpec ReadableStreamDefaultReader_properties[] = { + JS_PSG("closed", ReadableStreamDefaultReader_closed, 0), + JS_PS_END +}; + +CLASS_SPEC(ReadableStreamDefaultReader, 1, ReaderSlotCount, ClassSpec::DontDefineConstructor); + + +// Streams spec, 3.6.3 new ReadableStreamBYOBReader ( stream ) +// Steps 2-5. +static MOZ_MUST_USE ReadableStreamBYOBReader* +CreateReadableStreamBYOBReader(JSContext* cx, Handle stream) +{ + // Step 2: If ! IsReadableByteStreamController(stream.[[readableStreamController]]) + // is false, throw a TypeError exception. + if (!ControllerFromStream(stream)->is()) { + JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, + JSMSG_READABLESTREAM_NOT_BYTE_STREAM_CONTROLLER); + return nullptr; + } + + // Step 3: If ! IsReadableStreamLocked(stream) is true, throw a TypeError + // exception. + if (IsReadableStreamLocked(stream)) { + JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_READABLESTREAM_LOCKED); + return nullptr; + } + + Rooted reader(cx); + reader = NewBuiltinClassInstance(cx); + if (!reader) + return nullptr; + + // Step 4: Perform ! ReadableStreamReaderGenericInitialize(this, stream). + if (!ReadableStreamReaderGenericInitialize(cx, reader, stream)) + return nullptr; + + // Step 5: Set this.[[readIntoRequests]] to a new empty List. + if (!SetNewList(cx, reader, ReaderSlot_Requests)) + return nullptr; + + return reader; +} + +// Streams spec, 3.6.3 new ReadableStreamBYOBReader ( stream ) +bool +ReadableStreamBYOBReader::constructor(JSContext* cx, unsigned argc, Value* vp) +{ + CallArgs args = CallArgsFromVp(argc, vp); + + if (!ThrowIfNotConstructing(cx, args, "ReadableStreamBYOBReader")) + return false; + + // Step 1: If ! IsReadableStream(stream) is false, throw a TypeError exception. + if (!Is(args.get(0))) { + ReportArgTypeError(cx, "ReadableStreamBYOBReader", "ReadableStream", args.get(0)); + return false; + } + + Rooted stream(cx, &args.get(0).toObject().as()); + RootedObject reader(cx, CreateReadableStreamBYOBReader(cx, stream)); + if (!reader) + return false; + + args.rval().setObject(*reader); + return true; +} + +// Streams spec, 3.6.4.1 get closed +static MOZ_MUST_USE bool +ReadableStreamBYOBReader_closed(JSContext* cx, unsigned argc, Value* vp) +{ + CallArgs args = CallArgsFromVp(argc, vp); + + // Step 1: If ! IsReadableStreamBYOBReader(this) is false, return a promise + // rejected with a TypeError exception. + if (!Is(args.thisv())) + return RejectNonGenericMethod(cx, args, "ReadableStreamBYOBReader", "get closed"); + + // Step 2: Return this.[[closedPromise]]. + NativeObject* reader = &args.thisv().toObject().as(); + args.rval().set(reader->getFixedSlot(ReaderSlot_ClosedPromise)); + return true; +} + +// Streams spec, 3.6.4.2. cancel ( reason ) +static MOZ_MUST_USE bool +ReadableStreamBYOBReader_cancel(JSContext* cx, unsigned argc, Value* vp) +{ + CallArgs args = CallArgsFromVp(argc, vp); + + // Step 1: If ! IsReadableStreamBYOBReader(this) is false, return a promise + // rejected with a TypeError exception. + if (!Is(args.thisv())) + return RejectNonGenericMethod(cx, args, "ReadableStreamBYOBReader", "cancel"); + + // Step 2: If this.[[ownerReadableStream]] is undefined, return a promise + // rejected with a TypeError exception. + RootedNativeObject reader(cx, &args.thisv().toObject().as()); + if (reader->getFixedSlot(ReaderSlot_Stream).isUndefined()) { + JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, + JSMSG_READABLESTREAMREADER_NOT_OWNED, "cancel"); + return ReturnPromiseRejectedWithPendingError(cx, args); + } + + // Step 3: Return ! ReadableStreamReaderGenericCancel(this, reason). + JSObject* cancelPromise = ReadableStreamReaderGenericCancel(cx, reader, args.get(0)); + if (!cancelPromise) + return false; + args.rval().setObject(*cancelPromise); + return true; +} + +static MOZ_MUST_USE JSObject* +ReadableStreamBYOBReaderRead(JSContext* cx, HandleNativeObject reader, + Handle view); + +// Streams spec, 3.6.4.3 read ( ) +static MOZ_MUST_USE bool +ReadableStreamBYOBReader_read(JSContext* cx, unsigned argc, Value* vp) +{ + CallArgs args = CallArgsFromVp(argc, vp); + HandleValue viewVal = args.get(0); + + // Step 1: If ! IsReadableStreamBYOBReader(this) is false, return a promise + // rejected with a TypeError exception. + if (!Is(args.thisv())) + return RejectNonGenericMethod(cx, args, "ReadableStreamBYOBReader", "read"); + + // Step 2: If this.[[ownerReadableStream]] is undefined, return a promise + // rejected with a TypeError exception. + RootedNativeObject reader(cx, &args.thisv().toObject().as()); + if (reader->getFixedSlot(ReaderSlot_Stream).isUndefined()) { + JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, + JSMSG_READABLESTREAMREADER_NOT_OWNED, "read"); + return ReturnPromiseRejectedWithPendingError(cx, args); + } + + // Step 3: If Type(view) is not Object, return a promise rejected with a + // TypeError exception. + // Step 4: If view does not have a [[ViewedArrayBuffer]] internal slot, + // return a promise rejected with a TypeError exception. + if (!Is(viewVal)) { + ReportArgTypeError(cx, "ReadableStreamBYOBReader.read", "Typed Array", viewVal); + return ReturnPromiseRejectedWithPendingError(cx, args); + } + + Rooted view(cx, &viewVal.toObject().as()); + + // Step 5: If view.[[ByteLength]] is 0, return a promise rejected with a + // TypeError exception. + // Note: It's ok to use the length in number of elements here because all we + // want to know is whether it's < 0. + if (view->length() == 0) { + JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, + JSMSG_READABLESTREAMBYOBREADER_READ_EMPTY_VIEW); + return ReturnPromiseRejectedWithPendingError(cx, args); + } + + // Step 6: Return ! ReadableStreamBYOBReaderRead(this, view). + JSObject* readPromise = ReadableStreamBYOBReaderRead(cx, reader, view); + if (!readPromise) + return false; + args.rval().setObject(*readPromise); + return true; +} + +static MOZ_MUST_USE bool +ReadableStreamReaderGenericRelease(JSContext* cx, HandleNativeObject reader); + +// Streams spec, 3.6.4.4. releaseLock ( ) +static MOZ_MUST_USE bool +ReadableStreamBYOBReader_releaseLock_impl(JSContext* cx, const CallArgs& args) +{ + Rooted reader(cx); + reader = &args.thisv().toObject().as(); + + // Step 2: If this.[[ownerReadableStream]] is undefined, return. + if (reader->getFixedSlot(ReaderSlot_Stream).isUndefined()) { + args.rval().setUndefined(); + return true; + } + + // Step 3: If this.[[readRequests]] is not empty, throw a TypeError exception. + Value val = reader->getFixedSlot(ReaderSlot_Requests); + if (!val.isUndefined()) { + NativeObject* readRequests = &val.toObject().as(); + uint32_t len = readRequests->getDenseInitializedLength(); + if (len != 0) { + JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, + JSMSG_READABLESTREAMREADER_NOT_EMPTY, "releaseLock"); + return false; + } + } + + // Step 4: Perform ! ReadableStreamReaderGenericRelease(this). + return ReadableStreamReaderGenericRelease(cx, reader); +} + +static bool +ReadableStreamBYOBReader_releaseLock(JSContext* cx, unsigned argc, Value* vp) +{ + // Step 1: If ! IsReadableStreamBYOBReader(this) is false, + // throw a TypeError exception. + CallArgs args = CallArgsFromVp(argc, vp); + return CallNonGenericMethod, + ReadableStreamBYOBReader_releaseLock_impl>(cx, args); +} + +static const JSPropertySpec ReadableStreamBYOBReader_properties[] = { + JS_PSG("closed", ReadableStreamBYOBReader_closed, 0), + JS_PS_END +}; + +static const JSFunctionSpec ReadableStreamBYOBReader_methods[] = { + JS_FN("cancel", ReadableStreamBYOBReader_cancel, 1, 0), + JS_FN("read", ReadableStreamBYOBReader_read, 1, 0), + JS_FN("releaseLock", ReadableStreamBYOBReader_releaseLock, 0, 0), + JS_FS_END +}; + +CLASS_SPEC(ReadableStreamBYOBReader, 1, 3, ClassSpec::DontDefineConstructor); + +inline static MOZ_MUST_USE bool +ReadableStreamControllerCallPullIfNeeded(JSContext* cx, HandleNativeObject controller); + +// Streams spec, 3.7.1. IsReadableStreamDefaultReader ( x ) +// Implemented via intrinsic_isInstanceOfBuiltin() + +// Streams spec, 3.7.2. IsReadableStreamBYOBReader ( x ) +// Implemented via intrinsic_isInstanceOfBuiltin() + +// Streams spec, 3.7.3. ReadableStreamReaderGenericCancel ( reader, reason ) +static MOZ_MUST_USE JSObject* +ReadableStreamReaderGenericCancel(JSContext* cx, HandleNativeObject reader, HandleValue reason) +{ + // Step 1: Let stream be reader.[[ownerReadableStream]]. + Rooted stream(cx, StreamFromReader(reader)); + + // Step 2: Assert: stream is not undefined (implicit). + + // Step 3: Return ! ReadableStreamCancel(stream, reason). + return ReadableStreamCancel(cx, stream, reason); +} + +// Streams spec, 3.7.4. ReadableStreamReaderGenericInitialize ( reader, stream ) +static MOZ_MUST_USE bool +ReadableStreamReaderGenericInitialize(JSContext* cx, HandleNativeObject reader, + Handle stream) +{ + // Step 1: Set reader.[[ownerReadableStream]] to stream. + reader->setFixedSlot(ReaderSlot_Stream, ObjectValue(*stream)); + + // Step 2: Set stream.[[reader]] to reader. + stream->setFixedSlot(StreamSlot_Reader, ObjectValue(*reader)); + + // Step 3: If stream.[[state]] is "readable", + RootedObject promise(cx); + if (stream->readable()) { + // Step a: Set reader.[[closedPromise]] to a new promise. + promise = PromiseObject::createSkippingExecutor(cx); + } else if (stream->closed()) { + // Step 4: Otherwise + // Step a: If stream.[[state]] is "closed", + // Step i: Set reader.[[closedPromise]] to a new promise resolved with + // undefined. + promise = PromiseObject::unforgeableResolve(cx, UndefinedHandleValue); + } else { + // Step b: Otherwise, + // Step i: Assert: stream.[[state]] is "errored". + MOZ_ASSERT(stream->errored()); + + // Step ii: Set reader.[[closedPromise]] to a new promise rejected with + // stream.[[storedError]]. + RootedValue storedError(cx, stream->getFixedSlot(StreamSlot_StoredError)); + promise = PromiseObject::unforgeableReject(cx, storedError); + } + + if (!promise) + return false; + + reader->setFixedSlot(ReaderSlot_ClosedPromise, ObjectValue(*promise)); + return true; +} + +// Streams spec, 3.7.5. ReadableStreamReaderGenericRelease ( reader ) +static MOZ_MUST_USE bool +ReadableStreamReaderGenericRelease(JSContext* cx, HandleNativeObject reader) +{ + // Step 1: Assert: reader.[[ownerReadableStream]] is not undefined. + Rooted stream(cx, StreamFromReader(reader)); + + // Step 2: Assert: reader.[[ownerReadableStream]].[[reader]] is reader. + MOZ_ASSERT(&stream->getFixedSlot(StreamSlot_Reader).toObject() == reader); + + // Create an exception to reject promises with below. We don't have a + // clean way to do this, unfortunately. + JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_READABLESTREAMREADER_RELEASED); + RootedValue exn(cx); + // Not much we can do about uncatchable exceptions, just bail. + if (!GetAndClearException(cx, &exn)) + return false; + + // Step 3: If reader.[[ownerReadableStream]].[[state]] is "readable", reject + // reader.[[closedPromise]] with a TypeError exception. + if (stream->readable()) { + Value val = reader->getFixedSlot(ReaderSlot_ClosedPromise); + Rooted closedPromise(cx, &val.toObject().as()); + if (!PromiseObject::reject(cx, closedPromise, exn)) + return false; + } else { + // Step 4: Otherwise, set reader.[[closedPromise]] to a new promise rejected + // with a TypeError exception. + RootedObject closedPromise(cx, PromiseObject::unforgeableReject(cx, exn)); + if (!closedPromise) + return false; + reader->setFixedSlot(ReaderSlot_ClosedPromise, ObjectValue(*closedPromise)); + } + + // Step 5: Set reader.[[ownerReadableStream]].[[reader]] to undefined. + stream->setFixedSlot(StreamSlot_Reader, UndefinedValue()); + + // Step 6: Set reader.[[ownerReadableStream]] to undefined. + reader->setFixedSlot(ReaderSlot_Stream, UndefinedValue()); + + return true; +} + +static MOZ_MUST_USE JSObject* +ReadableByteStreamControllerPullInto(JSContext* cx, + Handle controller, + HandleNativeObject view); + +// Streams spec, 3.7.6. ReadableStreamBYOBReaderRead ( reader, view ) +static MOZ_MUST_USE JSObject* +ReadableStreamBYOBReaderRead(JSContext* cx, HandleNativeObject reader, + Handle view) +{ + MOZ_ASSERT(reader->is()); + + // Step 1: Let stream be reader.[[ownerReadableStream]]. + // Step 2: Assert: stream is not undefined. + Rooted stream(cx, StreamFromReader(reader)); + + // Step 3: Set stream.[[disturbed]] to true. + SetStreamState(stream, StreamState(stream) | ReadableStream::Disturbed); + + // Step 4: If stream.[[state]] is "errored", return a promise rejected with + // stream.[[storedError]]. + if (stream->errored()) { + RootedValue storedError(cx, stream->getFixedSlot(StreamSlot_StoredError)); + return PromiseObject::unforgeableReject(cx, storedError); + } + + // Step 5: Return ! ReadableByteStreamControllerPullInto(stream.[[readableStreamController]], view). + Rooted controller(cx); + controller = &ControllerFromStream(stream)->as(); + return ReadableByteStreamControllerPullInto(cx, controller, view); +} + +static MOZ_MUST_USE JSObject* +ReadableStreamControllerPullSteps(JSContext* cx, HandleNativeObject controller); + +// Streams spec, 3.7.7. ReadableStreamDefaultReaderRead ( reader ) +static MOZ_MUST_USE JSObject* +ReadableStreamDefaultReaderRead(JSContext* cx, HandleNativeObject reader) +{ + MOZ_ASSERT(reader->is()); + + // Step 1: Let stream be reader.[[ownerReadableStream]]. + // Step 2: Assert: stream is not undefined. + Rooted stream(cx, StreamFromReader(reader)); + + // Step 3: Set stream.[[disturbed]] to true. + SetStreamState(stream, StreamState(stream) | ReadableStream::Disturbed); + + // Step 4: If stream.[[state]] is "closed", return a new promise resolved with + // ! CreateIterResultObject(undefined, true). + if (stream->closed()) { + RootedObject iterResult(cx, CreateIterResultObject(cx, UndefinedHandleValue, true)); + if (!iterResult) + return nullptr; + RootedValue iterResultVal(cx, ObjectValue(*iterResult)); + return PromiseObject::unforgeableResolve(cx, iterResultVal); + } + + // Step 5: If stream.[[state]] is "errored", return a new promise rejected with + // stream.[[storedError]]. + if (stream->errored()) { + RootedValue storedError(cx, stream->getFixedSlot(StreamSlot_StoredError)); + return PromiseObject::unforgeableReject(cx, storedError); + } + + // Step 6: Assert: stream.[[state]] is "readable". + MOZ_ASSERT(stream->readable()); + + // Step 7: Return ! stream.[[readableStreamController]].[[PullSteps]](). + RootedNativeObject controller(cx, ControllerFromStream(stream)); + return ReadableStreamControllerPullSteps(cx, controller); +} + +// Streams spec, 3.8.3, step 11.a. +// and +// Streams spec, 3.10.3, step 16.a. +static bool +ControllerStartHandler(JSContext* cx, unsigned argc, Value* vp) +{ + CallArgs args = CallArgsFromVp(argc, vp); + RootedNativeObject controller(cx, TargetFromHandler(args.callee())); + + // Step i: Set controller.[[started]] to true. + AddControllerFlags(controller, ControllerFlag_Started); + + // Step ii: Assert: controller.[[pulling]] is false. + // Step iii: Assert: controller.[[pullAgain]] is false. + MOZ_ASSERT(!(ControllerFlags(controller) & + (ControllerFlag_Pulling | ControllerFlag_PullAgain))); + + // Step iv: Perform ! ReadableStreamDefaultControllerCallPullIfNeeded(controller). + // or + // Step iv: Perform ! ReadableByteStreamControllerCallPullIfNeeded((controller). + if (!ReadableStreamControllerCallPullIfNeeded(cx, controller)) + return false; + args.rval().setUndefined(); + return true; +} + +static MOZ_MUST_USE bool +ReadableStreamDefaultControllerErrorIfNeeded(JSContext* cx, + Handle controller, + HandleValue e); + +static MOZ_MUST_USE bool +ReadableStreamControllerError(JSContext* cx, HandleNativeObject controller, HandleValue e); + +// Streams spec, 3.8.3, step 11.b. +// and +// Streams spec, 3.10.3, step 16.b. +static bool +ControllerStartFailedHandler(JSContext* cx, unsigned argc, Value* vp) +{ + CallArgs args = CallArgsFromVp(argc, vp); + RootedNativeObject controllerObj(cx, TargetFromHandler(args.callee())); + + // 3.8.3, Step 11.b.i: + // Perform ! ReadableStreamDefaultControllerErrorIfNeeded(controller, r). + if (controllerObj->is()) { + Rooted controller(cx); + controller = &controllerObj->as(); + return ReadableStreamDefaultControllerErrorIfNeeded(cx, controller, args.get(0)); + } + + // 3.10.3, Step 16.b.i: If stream.[[state]] is "readable", perform + // ! ReadableByteStreamControllerError(controller, r). + if (StreamFromController(controllerObj)->readable()) + return ReadableStreamControllerError(cx, controllerObj, args.get(0)); + + args.rval().setUndefined(); + return true; +} + +static MOZ_MUST_USE bool +ValidateAndNormalizeHighWaterMark(JSContext* cx, + HandleValue highWaterMarkVal, + double* highWaterMark); + +static MOZ_MUST_USE bool +ValidateAndNormalizeQueuingStrategy(JSContext* cx, + HandleValue size, + HandleValue highWaterMarkVal, + double* highWaterMark); + +// Streams spec, 3.8.3 new ReadableStreamDefaultController ( stream, underlyingSource, +// size, highWaterMark ) +// Steps 3 - 11. +static MOZ_MUST_USE ReadableStreamDefaultController* +CreateReadableStreamDefaultController(JSContext* cx, Handle stream, + HandleValue underlyingSource, HandleValue size, + HandleValue highWaterMarkVal) +{ + Rooted controller(cx); + controller = NewBuiltinClassInstance(cx); + if (!controller) + return nullptr; + + // Step 3: Set this.[[controlledReadableStream]] to stream. + controller->setFixedSlot(ControllerSlot_Stream, ObjectValue(*stream)); + + // Step 4: Set this.[[underlyingSource]] to underlyingSource. + controller->setFixedSlot(ControllerSlot_UnderlyingSource, underlyingSource); + + // Step 5: Perform ! ResetQueue(this). + if (!ResetQueue(cx, controller)) + return nullptr; + + // Step 6: Set this.[[started]], this.[[closeRequested]], this.[[pullAgain]], + // and this.[[pulling]] to false. + controller->setFixedSlot(ControllerSlot_Flags, Int32Value(0)); + + // Step 7: Let normalizedStrategy be + // ? ValidateAndNormalizeQueuingStrategy(size, highWaterMark). + double highWaterMark; + if (!ValidateAndNormalizeQueuingStrategy(cx, size, highWaterMarkVal, &highWaterMark)) + return nullptr; + + // Step 8: Set this.[[strategySize]] to normalizedStrategy.[[size]] and + // this.[[strategyHWM]] to normalizedStrategy.[[highWaterMark]]. + controller->setFixedSlot(DefaultControllerSlot_StrategySize, size); + controller->setFixedSlot(ControllerSlot_StrategyHWM, NumberValue(highWaterMark)); + + // Step 9: Let controller be this (implicit). + + // Step 10: Let startResult be + // ? InvokeOrNoop(underlyingSource, "start", « this »). + RootedValue startResult(cx); + RootedValue controllerVal(cx, ObjectValue(*controller)); + if (!InvokeOrNoop(cx, underlyingSource, cx->names().start, controllerVal, &startResult)) + return nullptr; + + // Step 11: Let startPromise be a promise resolved with startResult: + RootedObject startPromise(cx, PromiseObject::unforgeableResolve(cx, startResult)); + if (!startPromise) + return nullptr; + + RootedObject onStartFulfilled(cx, NewHandler(cx, ControllerStartHandler, controller)); + if (!onStartFulfilled) + return nullptr; + + RootedObject onStartRejected(cx, NewHandler(cx, ControllerStartFailedHandler, controller)); + if (!onStartRejected) + return nullptr; + + if (!JS::AddPromiseReactions(cx, startPromise, onStartFulfilled, onStartRejected)) + return nullptr; + + return controller; +} + +// Streams spec, 3.8.3. +// new ReadableStreamDefaultController( stream, underlyingSource, size, +// highWaterMark ) +bool +ReadableStreamDefaultController::constructor(JSContext* cx, unsigned argc, Value* vp) +{ + CallArgs args = CallArgsFromVp(argc, vp); + + if (!ThrowIfNotConstructing(cx, args, "ReadableStreamDefaultController")) + return false; + + // Step 1: If ! IsReadableStream(stream) is false, throw a TypeError exception. + HandleValue streamVal = args.get(0); + if (!Is(streamVal)) { + ReportArgTypeError(cx, "ReadableStreamDefaultController", "ReadableStream", + args.get(0)); + return false; + } + + Rooted stream(cx, &streamVal.toObject().as()); + + // Step 2: If stream.[[readableStreamController]] is not undefined, throw a + // TypeError exception. + if (!stream->getFixedSlot(StreamSlot_Controller).isUndefined()) { + JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, + JSMSG_READABLESTREAM_CONTROLLER_SET); + return false; + } + + RootedObject controller(cx, CreateReadableStreamDefaultController(cx, stream, args.get(1), + args.get(2), args.get(3))); + if (!controller) + return false; + + args.rval().setObject(*controller); + return true; +} + +static MOZ_MUST_USE double +ReadableStreamControllerGetDesiredSizeUnchecked(NativeObject* controller); + +// Streams spec, 3.8.4.1. get desiredSize +// and +// Streams spec, 3.10.4.2. get desiredSize +static MOZ_MUST_USE bool +ReadableStreamController_desiredSize_impl(JSContext* cx, const CallArgs& args) +{ + RootedNativeObject controller(cx); + controller = &args.thisv().toObject().as(); + + // Streams spec, 3.9.8. steps 1-4. + // 3.9.8. Step 1: Let stream be controller.[[controlledReadableStream]]. + ReadableStream* stream = StreamFromController(controller); + + // 3.9.8. Step 2: Let state be stream.[[state]]. + // 3.9.8. Step 3: If state is "errored", return null. + if (stream->errored()) { + args.rval().setNull(); + return true; + } + + // 3.9.8. Step 4: If state is "closed", return 0. + if (stream->closed()) { + args.rval().setInt32(0); + return true; + } + + // Step 2: Return ! ReadableStreamDefaultControllerGetDesiredSize(this). + args.rval().setNumber(ReadableStreamControllerGetDesiredSizeUnchecked(controller)); + return true; +} + +static bool +ReadableStreamDefaultController_desiredSize(JSContext* cx, unsigned argc, Value* vp) +{ + // Step 1: If ! IsReadableStreamDefaultController(this) is false, throw a + // TypeError exception. + CallArgs args = CallArgsFromVp(argc, vp); + return CallNonGenericMethod, + ReadableStreamController_desiredSize_impl>(cx, args); +} + +static MOZ_MUST_USE bool +ReadableStreamDefaultControllerClose(JSContext* cx, + Handle controller); + +// Streams spec, 3.8.4.2 close() +static MOZ_MUST_USE bool +ReadableStreamDefaultController_close_impl(JSContext* cx, const CallArgs& args) +{ + Rooted controller(cx); + controller = &args.thisv().toObject().as(); + + // Step 2: If this.[[closeRequested]] is true, throw a TypeError exception. + if (ControllerFlags(controller) & ControllerFlag_CloseRequested) { + JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, + JSMSG_READABLESTREAMCONTROLLER_CLOSED, "close"); + return false; + } + + // Step 3: If this.[[controlledReadableStream]].[[state]] is not "readable", + // throw a TypeError exception. + ReadableStream* stream = StreamFromController(controller); + if (!stream->readable()) { + JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, + JSMSG_READABLESTREAMCONTROLLER_NOT_READABLE, "close"); + return false; + } + + // Step 4: Perform ! ReadableStreamDefaultControllerClose(this). + if (!ReadableStreamDefaultControllerClose(cx, controller)) + return false; + args.rval().setUndefined(); + return true; +} + +static bool +ReadableStreamDefaultController_close(JSContext* cx, unsigned argc, Value* vp) +{ + // Step 1: If ! IsReadableStreamDefaultController(this) is false, throw a + // TypeError exception. + + CallArgs args = CallArgsFromVp(argc, vp); + return CallNonGenericMethod, + ReadableStreamDefaultController_close_impl>(cx, args); +} + +static MOZ_MUST_USE bool +ReadableStreamDefaultControllerEnqueue(JSContext* cx, + Handle controller, + HandleValue chunk); + +// Streams spec, 3.8.4.3. enqueue ( chunk ) +static MOZ_MUST_USE bool +ReadableStreamDefaultController_enqueue_impl(JSContext* cx, const CallArgs& args) +{ + Rooted controller(cx); + controller = &args.thisv().toObject().as(); + + // Step 2: If this.[[closeRequested]] is true, throw a TypeError exception. + if (ControllerFlags(controller) & ControllerFlag_CloseRequested) { + JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, + JSMSG_READABLESTREAMCONTROLLER_CLOSED, "close"); + return false; + } + + // Step 3: If this.[[controlledReadableStream]].[[state]] is not "readable", + // throw a TypeError exception. + ReadableStream* stream = StreamFromController(controller); + if (!stream->readable()) { + JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, + JSMSG_READABLESTREAMCONTROLLER_NOT_READABLE, "close"); + return false; + } + + // Step 4: Return ! ReadableStreamDefaultControllerEnqueue(this, chunk). + if (!ReadableStreamDefaultControllerEnqueue(cx, controller, args.get(0))) + return false; + args.rval().setUndefined(); + return true; +} + +static bool +ReadableStreamDefaultController_enqueue(JSContext* cx, unsigned argc, Value* vp) +{ + // Step 1: If ! IsReadableStreamDefaultController(this) is false, throw a + // TypeError exception. + + CallArgs args = CallArgsFromVp(argc, vp); + return CallNonGenericMethod, + ReadableStreamDefaultController_enqueue_impl>(cx, args); +} + +// Streams spec, 3.8.4.4. error ( e ) +static MOZ_MUST_USE bool +ReadableStreamDefaultController_error_impl(JSContext* cx, const CallArgs& args) +{ + Rooted controller(cx); + controller = &args.thisv().toObject().as(); + + // Step 2: Let stream be this.[[controlledReadableStream]]. + ReadableStream* stream = StreamFromController(controller); + + // Step 3: If stream.[[state]] is not "readable", throw a TypeError exception. + if (!stream->readable()) { + JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, + JSMSG_READABLESTREAMCONTROLLER_NOT_READABLE, "close"); + return false; + } + + // Step 4: Perform ! ReadableStreamDefaultControllerError(this, e). + if (!ReadableStreamControllerError(cx, controller, args.get(0))) + return false; + args.rval().setUndefined(); + return true; +} + +static bool +ReadableStreamDefaultController_error(JSContext* cx, unsigned argc, Value* vp) +{ + // Step 1: If ! IsReadableStreamDefaultController(this) is false, throw a + // TypeError exception. + + CallArgs args = CallArgsFromVp(argc, vp); + return CallNonGenericMethod, + ReadableStreamDefaultController_error_impl>(cx, args); +} + +static const JSPropertySpec ReadableStreamDefaultController_properties[] = { + JS_PSG("desiredSize", ReadableStreamDefaultController_desiredSize, 0), + JS_PS_END +}; + +static const JSFunctionSpec ReadableStreamDefaultController_methods[] = { + JS_FN("close", ReadableStreamDefaultController_close, 0, 0), + JS_FN("enqueue", ReadableStreamDefaultController_enqueue, 1, 0), + JS_FN("error", ReadableStreamDefaultController_error, 1, 0), + JS_FS_END +}; + +CLASS_SPEC(ReadableStreamDefaultController, 4, 7, ClassSpec::DontDefineConstructor); + +/** + * Unified implementation of ReadableStream controllers' [[CancelSteps]] internal + * methods. + * Streams spec, 3.8.5.1. [[CancelSteps]] ( reason ) + * and + * Streams spec, 3.10.5.1. [[CancelSteps]] ( reason ) + */ +static MOZ_MUST_USE JSObject* +ReadableStreamControllerCancelSteps(JSContext* cx, HandleNativeObject controller, + HandleValue reason) +{ + MOZ_ASSERT(IsReadableStreamController(controller)); + + // Step 1 of 3.10.5.1: If this.[[pendingPullIntos]] is not empty, + if (!controller->is()) { + Value val = controller->getFixedSlot(ByteControllerSlot_PendingPullIntos); + RootedNativeObject pendingPullIntos(cx, &val.toObject().as()); + + if (pendingPullIntos->getDenseInitializedLength() != 0) { + // Step a: Let firstDescriptor be the first element of + // this.[[pendingPullIntos]]. + // Step b: Set firstDescriptor.[[bytesFilled]] to 0. + Rooted firstDescriptor(cx); + firstDescriptor = PeekList(pendingPullIntos); + firstDescriptor->setBytesFilled(0); + } + } + + // Step 1 of 3.8.5.1, step 2 of 3.10.5.1: Perform ! ResetQueue(this). + if (!ResetQueue(cx, controller)) + return nullptr; + + // Step 2 of 3.8.5.1, step 3 of 3.10.5.1: + // Return ! PromiseInvokeOrNoop(this.[[underlying(Byte)Source]], + // "cancel", « reason ») + RootedValue underlyingSource(cx); + underlyingSource = controller->getFixedSlot(ControllerSlot_UnderlyingSource); + + if (Is(underlyingSource)) { + Rooted teeState(cx, &underlyingSource.toObject().as()); + Rooted defaultController(cx); + defaultController = &controller->as(); + return ReadableStreamTee_Cancel(cx, teeState, defaultController, reason); + } + + return PromiseInvokeOrNoop(cx, underlyingSource, cx->names().cancel, reason); +} + +inline static MOZ_MUST_USE bool +DequeueValue(JSContext* cx, HandleNativeObject container, MutableHandleValue chunk); + +// Streams spec, 3.8.5.2. ReadableStreamDefaultController [[PullSteps]]() +static JSObject* +ReadableStreamDefaultControllerPullSteps(JSContext* cx, HandleNativeObject controller) +{ + MOZ_ASSERT(controller->is()); + + // Step 1: Let stream be this.[[controlledReadableStream]]. + Rooted stream(cx, StreamFromController(controller)); + + // Step 2: If this.[[queue]] is not empty, + RootedNativeObject queue(cx); + RootedValue val(cx, controller->getFixedSlot(QueueContainerSlot_Queue)); + if (val.isObject()) + queue = &val.toObject().as(); + + if (queue && queue->getDenseInitializedLength() != 0) { + // Step a: Let chunk be ! DequeueValue(this.[[queue]]). + RootedValue chunk(cx); + if (!DequeueValue(cx, controller, &chunk)) + return nullptr; + + // Step b: If this.[[closeRequested]] is true and this.[[queue]] is empty, + // perform ! ReadableStreamClose(stream). + bool closeRequested = ControllerFlags(controller) & ControllerFlag_CloseRequested; + if (closeRequested && queue->getDenseInitializedLength() == 0) { + if (!ReadableStreamClose(cx, stream)) + return nullptr; + } + + // Step c: Otherwise, perform ! ReadableStreamDefaultControllerCallPullIfNeeded(this). + else { + if (!ReadableStreamControllerCallPullIfNeeded(cx, controller)) + return nullptr; + } + + // Step d: Return a promise resolved with ! CreateIterResultObject(chunk, false). + RootedObject iterResultObj(cx, CreateIterResultObject(cx, chunk, false)); + if (!iterResultObj) + return nullptr; + RootedValue iterResult(cx, ObjectValue(*iterResultObj)); + return PromiseObject::unforgeableResolve(cx, iterResult); + } + + // Step 3: Let pendingPromise be ! ReadableStreamAddReadRequest(stream). + Rooted pendingPromise(cx, ReadableStreamAddReadRequest(cx, stream)); + if (!pendingPromise) + return nullptr; + + // Step 4: Perform ! ReadableStreamDefaultControllerCallPullIfNeeded(this). + if (!ReadableStreamControllerCallPullIfNeeded(cx, controller)) + return nullptr; + + // Step 5: Return pendingPromise. + return pendingPromise; +} + +// Streams spec, 3.9.2 and 3.12.3. step 7: +// Upon fulfillment of pullPromise, +static bool +ControllerPullHandler(JSContext* cx, unsigned argc, Value* vp) +{ + CallArgs args = CallArgsFromVp(argc, vp); + RootedNativeObject controller(cx, TargetFromHandler(args.callee())); + uint32_t flags = ControllerFlags(controller); + + // Step a: Set controller.[[pulling]] to false. + // Step b.i: Set controller.[[pullAgain]] to false. + RemoveControllerFlags(controller, ControllerFlag_Pulling | ControllerFlag_PullAgain); + + // Step b: If controller.[[pullAgain]] is true, + if (flags & ControllerFlag_PullAgain) { + // Step ii: Perform ! ReadableByteStreamControllerCallPullIfNeeded(controller). + if (!ReadableStreamControllerCallPullIfNeeded(cx, controller)) + return false; + } + + args.rval().setUndefined(); + return true; +} + +// Streams spec, 3.9.2 and 3.12.3. step 8: +// Upon rejection of pullPromise with reason e, +static bool +ControllerPullFailedHandler(JSContext* cx, unsigned argc, Value* vp) +{ + CallArgs args = CallArgsFromVp(argc, vp); + RootedNativeObject controller(cx, TargetFromHandler(args.callee())); + HandleValue e = args.get(0); + + // Step a: If controller.[[controlledReadableStream]].[[state]] is "readable", + // perform ! ReadableByteStreamControllerError(controller, e). + if (StreamFromController(controller)->readable()) { + if (!ReadableStreamControllerError(cx, controller, e)) + return false; + } + + args.rval().setUndefined(); + return true; +} + +static bool +ReadableStreamControllerShouldCallPull(NativeObject* controller); + +// Streams spec, 3.9.2 ReadableStreamDefaultControllerCallPullIfNeeded ( controller ) +// and +// Streams spec, 3.12.3. ReadableByteStreamControllerCallPullIfNeeded ( controller ) +inline static MOZ_MUST_USE bool +ReadableStreamControllerCallPullIfNeeded(JSContext* cx, HandleNativeObject controller) +{ + // Step 1: Let shouldPull be + // ! ReadableByteStreamControllerShouldCallPull(controller). + bool shouldPull = ReadableStreamControllerShouldCallPull(controller); + + // Step 2: If shouldPull is false, return. + if (!shouldPull) + return true; + + // Step 3: If controller.[[pulling]] is true, + if (ControllerFlags(controller) & ControllerFlag_Pulling) { + // Step a: Set controller.[[pullAgain]] to true. + AddControllerFlags(controller, ControllerFlag_PullAgain); + + // Step b: Return. + return true; + } + + // Step 4: Assert: controller.[[pullAgain]] is false. + MOZ_ASSERT(!(ControllerFlags(controller) & ControllerFlag_PullAgain)); + + // Step 5: Set controller.[[pulling]] to true. + AddControllerFlags(controller, ControllerFlag_Pulling); + + // Step 6: Let pullPromise be + // ! PromiseInvokeOrNoop(controller.[[underlyingByteSource]], "pull", controller). + RootedObject pullPromise(cx); + RootedValue underlyingSource(cx); + underlyingSource = controller->getFixedSlot(ControllerSlot_UnderlyingSource); + RootedValue controllerVal(cx, ObjectValue(*controller)); + + if (Is(underlyingSource)) { + Rooted teeState(cx, &underlyingSource.toObject().as()); + Rooted stream(cx, StreamFromController(controller)); + pullPromise = ReadableStreamTee_Pull(cx, teeState, stream); + } else { + pullPromise = PromiseInvokeOrNoop(cx, underlyingSource, cx->names().pull, controllerVal); + } + if (!pullPromise) + return false; + + RootedObject onPullFulfilled(cx, NewHandler(cx, ControllerPullHandler, controller)); + if (!onPullFulfilled) + return false; + + RootedObject onPullRejected(cx, NewHandler(cx, ControllerPullFailedHandler, controller)); + if (!onPullRejected) + return false; + + return JS::AddPromiseReactions(cx, pullPromise, onPullFulfilled, onPullRejected); + + // Steps 7-8 implemented in functions above. +} + +// Streams spec, 3.9.3. ReadableStreamDefaultControllerShouldCallPull ( controller ) +// and +// Streams spec, 3.12.24. ReadableByteStreamControllerShouldCallPull ( controller ) +static bool +ReadableStreamControllerShouldCallPull(NativeObject* controller) +{ + // Step 1: Let stream be controller.[[controlledReadableStream]]. + ReadableStream* stream = StreamFromController(controller); + + // Step 2: If stream.[[state]] is "closed" or stream.[[state]] is "errored", + // return false. + // or, equivalently + // Step 2: If stream.[[state]] is not "readable", return false. + if (!stream->readable()) + return false; + + // Step 3: If controller.[[closeRequested]] is true, return false. + uint32_t flags = ControllerFlags(controller); + if (flags & ControllerFlag_CloseRequested) + return false; + + // Step 4: If controller.[[started]] is false, return false. + if (!(flags & ControllerFlag_Started)) + return false; + + // Step 5: If ! IsReadableStreamLocked(stream) is true and + // ! ReadableStreamGetNumReadRequests(stream) > 0, return true. + // Steps 5-6 of 3.12.24 are equivalent in our implementation. + if (IsReadableStreamLocked(stream) && ReadableStreamGetNumReadRequests(stream) > 0) + return true; + + // Step 6: Let desiredSize be ReadableStreamDefaultControllerGetDesiredSize(controller). + double desiredSize = ReadableStreamControllerGetDesiredSizeUnchecked(controller); + + // Step 7: If desiredSize > 0, return true. + // Step 8: Return false. + // Steps 7-8 of 3.12.24 are equivalent in our implementation. + return desiredSize > 0; +} + +// Streams spec, 3.9.4. ReadableStreamDefaultControllerClose ( controller ) +static MOZ_MUST_USE bool +ReadableStreamDefaultControllerClose(JSContext* cx, + Handle controller) +{ + // Step 1: Let stream be controller.[[controlledReadableStream]]. + Rooted stream(cx, StreamFromController(controller)); + + // Step 2: Assert: controller.[[closeRequested]] is false. + MOZ_ASSERT(!(ControllerFlags(controller) & ControllerFlag_CloseRequested)); + + // Step 3: Assert: stream.[[state]] is "readable". + MOZ_ASSERT(stream->readable()); + + // Step 4: Set controller.[[closeRequested]] to true. + AddControllerFlags(controller, ControllerFlag_CloseRequested); + + // Step 5: If controller.[[queue]] is empty, perform ! ReadableStreamClose(stream). + RootedNativeObject queue(cx); + queue = &controller->getFixedSlot(QueueContainerSlot_Queue).toObject().as(); + if (queue->getDenseInitializedLength() == 0) + return ReadableStreamClose(cx, stream); + + return true; +} + +static MOZ_MUST_USE bool +ReadableStreamFulfillReadOrReadIntoRequest(JSContext* cx, Handle stream, + HandleValue chunk, bool done); + +static MOZ_MUST_USE bool +EnqueueValueWithSize(JSContext* cx, HandleNativeObject container, HandleValue value, + HandleValue sizeVal); + +// Streams spec, 3.9.5. ReadableStreamDefaultControllerEnqueue ( controller, chunk ) +static MOZ_MUST_USE bool +ReadableStreamDefaultControllerEnqueue(JSContext* cx, + Handle controller, + HandleValue chunk) +{ + // Step 1: Let stream be controller.[[controlledReadableStream]]. + Rooted stream(cx, StreamFromController(controller)); + + // Step 2: Assert: controller.[[closeRequested]] is false. + MOZ_ASSERT(!(ControllerFlags(controller) & ControllerFlag_CloseRequested)); + + // Step 3: Assert: stream.[[state]] is "readable". + MOZ_ASSERT(stream->readable()); + + // Step 4: If ! IsReadableStreamLocked(stream) is true and + // ! ReadableStreamGetNumReadRequests(stream) > 0, perform + // ! ReadableStreamFulfillReadRequest(stream, chunk, false). + if (IsReadableStreamLocked(stream) && ReadableStreamGetNumReadRequests(stream) > 0) { + if (!ReadableStreamFulfillReadOrReadIntoRequest(cx, stream, chunk, false)) + return false; + } else { + // Step 5: Otherwise, + // Step a: Let chunkSize be 1. + RootedValue chunkSize(cx, NumberValue(1)); + bool success = true; + + // Step b: If controller.[[strategySize]] is not undefined, + RootedValue strategySize(cx); + strategySize = controller->getFixedSlot(DefaultControllerSlot_StrategySize); + if (!strategySize.isUndefined()) { + // Step i: Set chunkSize to Call(stream.[[strategySize]], undefined, chunk). + success = Call(cx, strategySize, UndefinedHandleValue, chunk, &chunkSize); + } + + // Step c: Let enqueueResult be + // EnqueueValueWithSize(controller, chunk, chunkSize). + if (success) + success = EnqueueValueWithSize(cx, controller, chunk, chunkSize); + + if (!success) { + // Step b.ii: If chunkSize is an abrupt completion, + // and + // Step d: If enqueueResult is an abrupt completion, + RootedValue exn(cx); + if (!cx->getPendingException(&exn)) + return false; + + // Step b.ii.1: Perform + // ! ReadableStreamDefaultControllerErrorIfNeeded(controller, + // chunkSize.[[Value]]). + if (!ReadableStreamDefaultControllerErrorIfNeeded(cx, controller, exn)) + return false; + + // Step b.ii.2: Return chunkSize. + return false; + } + } + + // Step 6: Perform ! ReadableStreamDefaultControllerCallPullIfNeeded(controller). + if (!ReadableStreamControllerCallPullIfNeeded(cx, controller)) + return false; + + // Step 7: Return. + return true; +} + +static MOZ_MUST_USE bool +ReadableStreamError(JSContext* cx, Handle stream, HandleValue e); + +static MOZ_MUST_USE bool +ReadableByteStreamControllerClearPendingPullIntos(JSContext* cx, HandleNativeObject controller); + +// Streams spec, 3.9.6. ReadableStreamDefaultControllerError ( controller, e ) +// and +// Streams spec, 3.12.10. ReadableByteStreamControllerError ( controller, e ) +static MOZ_MUST_USE bool +ReadableStreamControllerError(JSContext* cx, HandleNativeObject controller, HandleValue e) +{ + MOZ_ASSERT(IsReadableStreamController(controller)); + + // Step 1: Let stream be controller.[[controlledReadableStream]]. + Rooted stream(cx, StreamFromController(controller)); + + // Step 2: Assert: stream.[[state]] is "readable". + MOZ_ASSERT(stream->readable()); + + // Step 3 of 3.12.10: + // Perform ! ReadableByteStreamControllerClearPendingPullIntos(controller). + if (controller->is()) { + Rooted byteStreamController(cx); + byteStreamController = &controller->as(); + if (!ReadableByteStreamControllerClearPendingPullIntos(cx, byteStreamController)) + return false; + } + + // Step 3 (or 4): Perform ! ResetQueue(controller). + if (!ResetQueue(cx, controller)) + return false; + + // Step 4 (or 5): Perform ! ReadableStreamError(stream, e). + return ReadableStreamError(cx, stream, e); +} + +// Streams spec, 3.9.7. ReadableStreamDefaultControllerErrorIfNeeded ( controller, e ) nothrow +static MOZ_MUST_USE bool +ReadableStreamDefaultControllerErrorIfNeeded(JSContext* cx, + Handle controller, + HandleValue e) +{ + // Step 1: If controller.[[controlledReadableStream]].[[state]] is "readable", + // perform ! ReadableStreamDefaultControllerError(controller, e). + Rooted stream(cx, StreamFromController(controller)); + if (stream->readable()) + return ReadableStreamControllerError(cx, controller, e); + return true; +} + +// Streams spec, 3.9.8. ReadableStreamDefaultControllerGetDesiredSize ( controller ) +// and +// Streams spec 3.12.13. ReadableByteStreamControllerGetDesiredSize ( controller ) +static MOZ_MUST_USE double +ReadableStreamControllerGetDesiredSizeUnchecked(NativeObject* controller) +{ + // Steps 1-4 done at callsites, so only assert that they have been done. +#if DEBUG + ReadableStream* stream = StreamFromController(controller); + MOZ_ASSERT(!(stream->errored() || stream->closed())); +#endif // DEBUG + + // Step 5: Return controller.[[strategyHWM]] − controller.[[queueTotalSize]]. + double strategyHWM = controller->getFixedSlot(ControllerSlot_StrategyHWM).toNumber(); + double queueSize = controller->getFixedSlot(QueueContainerSlot_TotalSize).toNumber(); + return strategyHWM - queueSize; +} + +// Streams spec, 3.10.3 new ReadableByteStreamController ( stream, underlyingSource, +// highWaterMark ) +// Steps 3 - 16. +static MOZ_MUST_USE ReadableByteStreamController* +CreateReadableByteStreamController(JSContext* cx, Handle stream, + HandleValue underlyingByteSource, + HandleValue highWaterMarkVal) +{ + Rooted controller(cx); + controller = NewBuiltinClassInstance(cx); + if (!controller) + return nullptr; + + // Step 3: Set this.[[controlledReadableStream]] to stream. + controller->setFixedSlot(ControllerSlot_Stream, ObjectValue(*stream)); + + // Step 4: Set this.[[underlyingByteSource]] to underlyingByteSource. + controller->setFixedSlot(ControllerSlot_UnderlyingSource, underlyingByteSource); + + // Step 5: Set this.[[pullAgain]], and this.[[pulling]] to false. + controller->setFixedSlot(ControllerSlot_Flags, Int32Value(0)); + + // Step 6: Perform ! ReadableByteStreamControllerClearPendingPullIntos(this). + if (!ReadableByteStreamControllerClearPendingPullIntos(cx, controller)) + return nullptr; + + // Step 7: Perform ! ResetQueue(this). + if (!ResetQueue(cx, controller)) + return nullptr; + + // Step 8: Set this.[[started]] and this.[[closeRequested]] to false. + // These should be false by default, unchanged since step 5. + MOZ_ASSERT(ControllerFlags(controller) == 0); + + // Step 9: Set this.[[strategyHWM]] to + // ? ValidateAndNormalizeHighWaterMark(highWaterMark). + double highWaterMark; + if (!ValidateAndNormalizeHighWaterMark(cx, highWaterMarkVal, &highWaterMark)) + return nullptr; + controller->setFixedSlot(ControllerSlot_StrategyHWM, NumberValue(highWaterMark)); + + // Step 10: Let autoAllocateChunkSize be + // ? GetV(underlyingByteSource, "autoAllocateChunkSize"). + RootedValue autoAllocateChunkSize(cx); + if (!GetProperty(cx, underlyingByteSource, cx->names().autoAllocateChunkSize, + &autoAllocateChunkSize)) + { + return nullptr; + } + + // Step 11: If autoAllocateChunkSize is not undefined, + if (!autoAllocateChunkSize.isUndefined()) { + // Step a: If ! IsInteger(autoAllocateChunkSize) is false, or if + // autoAllocateChunkSize ≤ 0, throw a RangeError exception. + if (!IsInteger(autoAllocateChunkSize) || autoAllocateChunkSize.toNumber() <= 0) { + JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, + JSMSG_READABLEBYTESTREAMCONTROLLER_BAD_CHUNKSIZE); + return nullptr; + } + } + + // Step 12: Set this.[[autoAllocateChunkSize]] to autoAllocateChunkSize. + controller->setFixedSlot(ByteControllerSlot_AutoAllocateSize, autoAllocateChunkSize); + + // Step 13: Set this.[[pendingPullIntos]] to a new empty List. + if (!SetNewList(cx, controller, ByteControllerSlot_PendingPullIntos)) + return nullptr; + + // Step 14: Let controller be this (implicit). + + // Step 15: Let startResult be + // ? InvokeOrNoop(underlyingSource, "start", « this »). + RootedValue startResult(cx); + RootedValue controllerVal(cx, ObjectValue(*controller)); + if (!InvokeOrNoop(cx, underlyingByteSource, cx->names().start, controllerVal, &startResult)) + return nullptr; + + // Step 16: Let startPromise be a promise resolved with startResult: + RootedObject startPromise(cx, PromiseObject::unforgeableResolve(cx, startResult)); + if (!startPromise) + return nullptr; + + RootedObject onStartFulfilled(cx, NewHandler(cx, ControllerStartHandler, controller)); + if (!onStartFulfilled) + return nullptr; + + RootedObject onStartRejected(cx, NewHandler(cx, ControllerStartFailedHandler, controller)); + if (!onStartRejected) + return nullptr; + + if (!JS::AddPromiseReactions(cx, startPromise, onStartFulfilled, onStartRejected)) + return nullptr; + + return controller; +} + +// Streams spec, 3.10.3. +// new ReadableByteStreamController ( stream, underlyingByteSource, +// highWaterMark ) +bool +ReadableByteStreamController::constructor(JSContext* cx, unsigned argc, Value* vp) +{ + CallArgs args = CallArgsFromVp(argc, vp); + + if (!ThrowIfNotConstructing(cx, args, "ReadableByteStreamController")) + return false; + + // Step 1: If ! IsReadableStream(stream) is false, throw a TypeError exception. + HandleValue streamVal = args.get(0); + if (!Is(streamVal)) { + ReportArgTypeError(cx, "ReadableStreamDefaultController", "ReadableStream", + args.get(0)); + return false; + } + + Rooted stream(cx, &streamVal.toObject().as()); + + // Step 2: If stream.[[readableStreamController]] is not undefined, throw a + // TypeError exception. + if (!stream->getFixedSlot(StreamSlot_Controller).isUndefined()) { + JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, + JSMSG_READABLESTREAM_CONTROLLER_SET); + return false; + } + + RootedObject controller(cx, CreateReadableByteStreamController(cx, stream, args.get(1), + args.get(2))); + if (!controller) + return false; + + args.rval().setObject(*controller); + return true; +} + +static MOZ_MUST_USE ReadableStreamBYOBRequest* +CreateReadableStreamBYOBRequest(JSContext* cx, Handle controller, + HandleObject view); + +// Streams spec, 3.10.4.1. get byobRequest +static MOZ_MUST_USE bool +ReadableByteStreamController_byobRequest_impl(JSContext* cx, const CallArgs& args) +{ + Rooted controller(cx); + controller = &args.thisv().toObject().as(); + + // Step 2: If this.[[byobRequest]] is undefined and this.[[pendingPullIntos]] + // is not empty, + Value val = controller->getFixedSlot(ByteControllerSlot_BYOBRequest); + RootedValue byobRequest(cx, val); + val = controller->getFixedSlot(ByteControllerSlot_PendingPullIntos); + RootedNativeObject pendingPullIntos(cx, &val.toObject().as()); + + if (byobRequest.isUndefined() && pendingPullIntos->getDenseInitializedLength() != 0) { + // Step a: Let firstDescriptor be the first element of this.[[pendingPullIntos]]. + Rooted firstDescriptor(cx); + firstDescriptor = PeekList(pendingPullIntos); + + // Step b: Let view be ! Construct(%Uint8Array%, + // « firstDescriptor.[[buffer]], + // firstDescriptor.[[byteOffset]] + firstDescriptor.[[bytesFilled]], + // firstDescriptor.[[byteLength]] − firstDescriptor.[[bytesFilled]] »). + RootedArrayBufferObject buffer(cx, firstDescriptor->buffer()); + uint32_t bytesFilled = firstDescriptor->bytesFilled(); + RootedObject view(cx, JS_NewUint8ArrayWithBuffer(cx, buffer, + firstDescriptor->byteOffset() + bytesFilled, + firstDescriptor->byteLength() - bytesFilled)); + if (!view) + return false; + + // Step c: Set this.[[byobRequest]] to + // ! Construct(ReadableStreamBYOBRequest, « this, view »). + RootedObject request(cx, CreateReadableStreamBYOBRequest(cx, controller, view)); + if (!request) + return false; + byobRequest = ObjectValue(*request); + controller->setFixedSlot(ByteControllerSlot_BYOBRequest, byobRequest); + } + + // Step 3: Return this.[[byobRequest]]. + args.rval().set(byobRequest); + return true; +} + +static bool +ReadableByteStreamController_byobRequest(JSContext* cx, unsigned argc, Value* vp) +{ + // Step 1: If IsReadableByteStreamController(this) is false, throw a TypeError + // exception. + CallArgs args = CallArgsFromVp(argc, vp); + return CallNonGenericMethod, + ReadableByteStreamController_byobRequest_impl>(cx, args); +} + +// Streams spec, 3.10.4.2. get desiredSize +// Combined with 3.8.4.1 above. + +static bool +ReadableByteStreamController_desiredSize(JSContext* cx, unsigned argc, Value* vp) +{ + // Step 1: If ! IsReadableByteStreamController(this) is false, throw a + // TypeError exception. + CallArgs args = CallArgsFromVp(argc, vp); + return CallNonGenericMethod, + ReadableStreamController_desiredSize_impl>(cx, args); +} + +static MOZ_MUST_USE bool +ReadableByteStreamControllerClose(JSContext* cx, Handle controller); + +// Streams spec, 3.10.4.3. close() +static MOZ_MUST_USE bool +ReadableByteStreamController_close_impl(JSContext* cx, const CallArgs& args) +{ + Rooted controller(cx); + controller = &args.thisv().toObject().as(); + + // Step 2: If this.[[closeRequested]] is true, throw a TypeError exception. + if (ControllerFlags(controller) & ControllerFlag_CloseRequested) { + JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, + JSMSG_READABLESTREAMCONTROLLER_CLOSED, "close"); + return false; + } + + // Step 3: If this.[[controlledReadableStream]].[[state]] is not "readable", + // throw a TypeError exception. + if (!StreamFromController(controller)->readable()) { + JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, + JSMSG_READABLESTREAMCONTROLLER_NOT_READABLE, "close"); + return false; + } + + // Step 4: Perform ? ReadableByteStreamControllerClose(this). + if (!ReadableByteStreamControllerClose(cx, controller)) + return false; + args.rval().setUndefined(); + return true; +} + +static bool +ReadableByteStreamController_close(JSContext* cx, unsigned argc, Value* vp) +{ + // Step 1: If ! IsReadableByteStreamController(this) is false, throw a + // TypeError exception. + CallArgs args = CallArgsFromVp(argc, vp); + return CallNonGenericMethod, + ReadableByteStreamController_close_impl>(cx, args); +} + +static MOZ_MUST_USE bool +ReadableByteStreamControllerEnqueue(JSContext* cx, + Handle controller, + HandleObject chunk); + +// Streams spec, 3.10.4.4. enqueue ( chunk ) +static MOZ_MUST_USE bool +ReadableByteStreamController_enqueue_impl(JSContext* cx, const CallArgs& args) +{ + Rooted controller(cx); + controller = &args.thisv().toObject().as(); + HandleValue chunkVal = args.get(0); + + // Step 2: If this.[[closeRequested]] is true, throw a TypeError exception. + if (ControllerFlags(controller) & ControllerFlag_CloseRequested) { + JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, + JSMSG_READABLESTREAMCONTROLLER_CLOSED, "enqueue"); + return false; + } + + // Step 3: If this.[[controlledReadableStream]].[[state]] is not "readable", + // throw a TypeError exception. + if (!StreamFromController(controller)->readable()) { + JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, + JSMSG_READABLESTREAMCONTROLLER_NOT_READABLE, "enqueue"); + return false; + } + + // Step 4: If Type(chunk) is not Object, throw a TypeError exception. + // Step 5: If chunk does not have a [[ViewedArrayBuffer]] internal slot, + // throw a TypeError exception. + if (!chunkVal.isObject() || !JS_IsArrayBufferViewObject(&chunkVal.toObject())) { + JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, + JSMSG_READABLEBYTESTREAMCONTROLLER_BAD_CHUNK); + return false; + } + RootedObject chunk(cx, &chunkVal.toObject()); + + // Step 6: Return ! ReadableByteStreamControllerEnqueue(this, chunk). + if (!ReadableByteStreamControllerEnqueue(cx, controller, chunk)) + return false; + args.rval().setUndefined(); + return true; +} + +static bool +ReadableByteStreamController_enqueue(JSContext* cx, unsigned argc, Value* vp) +{ + // Step 1: If ! IsReadableByteStreamController(this) is false, throw a + // TypeError exception. + CallArgs args = CallArgsFromVp(argc, vp); + return CallNonGenericMethod, + ReadableByteStreamController_enqueue_impl>(cx, args); +} + +// Streams spec, 3.10.4.5. error ( e ) +static MOZ_MUST_USE bool +ReadableByteStreamController_error_impl(JSContext* cx, const CallArgs& args) +{ + Rooted controller(cx); + controller = &args.thisv().toObject().as(); + HandleValue e = args.get(0); + + // Step 2: Let stream be this.[[controlledReadableStream]]. + // Step 3: If stream.[[state]] is not "readable", throw a TypeError exception. + if (!StreamFromController(controller)->readable()) { + JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, + JSMSG_READABLESTREAMCONTROLLER_NOT_READABLE, "error"); + return false; + } + + // Step 4: Perform ! ReadableByteStreamControllerError(this, e). + if (!ReadableStreamControllerError(cx, controller, e)) + return false; + args.rval().setUndefined(); + return true; +} + +static bool +ReadableByteStreamController_error(JSContext* cx, unsigned argc, Value* vp) +{ + // Step 1: If ! IsReadableByteStreamController(this) is false, throw a + // TypeError exception. + CallArgs args = CallArgsFromVp(argc, vp); + return CallNonGenericMethod, + ReadableByteStreamController_error_impl>(cx, args); +} + +static const JSPropertySpec ReadableByteStreamController_properties[] = { + JS_PSG("byobRequest", ReadableByteStreamController_byobRequest, 0), + JS_PSG("desiredSize", ReadableByteStreamController_desiredSize, 0), + JS_PS_END +}; + +static const JSFunctionSpec ReadableByteStreamController_methods[] = { + JS_FN("close", ReadableByteStreamController_close, 0, 0), + JS_FN("enqueue", ReadableByteStreamController_enqueue, 1, 0), + JS_FN("error", ReadableByteStreamController_error, 1, 0), + JS_FS_END +}; + +CLASS_SPEC(ReadableByteStreamController, 3, 9, ClassSpec::DontDefineConstructor); + +// Streams spec, 3.10.5.1. [[PullSteps]] () +// Unified with 3.8.5.1 above. + +static MOZ_MUST_USE bool +ReadableByteStreamControllerHandleQueueDrain(JSContext* cx, HandleNativeObject controller); + +// Streams spec, 3.10.5.2. [[PullSteps]] () +static JSObject* +ReadableByteStreamControllerPullSteps(JSContext* cx, HandleNativeObject controller) +{ + // Step 1: Let stream be this.[[controlledReadableStream]]. + Rooted stream(cx, StreamFromController(controller)); + + // Step 2: MOZ_ASSERT: ! ReadableStreamHasDefaultReader(stream) is true. + MOZ_ASSERT(ReadableStreamHasDefaultReader(stream)); + + RootedValue val(cx); + // Step 3: If this.[[queueTotalSize]] > 0, + double queueTotalSize = controller->getFixedSlot(QueueContainerSlot_TotalSize).toNumber(); + if (queueTotalSize > 0) { + // Step 3.a: MOZ_ASSERT: ! ReadableStreamGetNumReadRequests(_stream_) is 0. + MOZ_ASSERT(ReadableStreamGetNumReadRequests(stream) == 0); + + // Step 3.b: Let entry be the first element of this.[[queue]]. + // Step 3.c: Remove entry from this.[[queue]], shifting all other elements + // downward (so that the second becomes the first, and so on). + val = controller->getFixedSlot(QueueContainerSlot_Queue); + RootedNativeObject queue(cx, &val.toObject().as()); + Rooted entry(cx, ShiftFromList(cx, queue)); + MOZ_ASSERT(entry); + + // Step 3.d: Set this.[[queueTotalSize]] to this.[[queueTotalSize]] − entry.[[byteLength]]. + uint32_t byteLength = entry->byteLength(); + queueTotalSize = queueTotalSize - byteLength; + controller->setFixedSlot(QueueContainerSlot_TotalSize, NumberValue(queueTotalSize)); + + // Step 3.e: Perform ! ReadableByteStreamControllerHandleQueueDrain(this). + if (!ReadableByteStreamControllerHandleQueueDrain(cx, controller)) + return nullptr; + + // Step 3.f: Let view be ! Construct(%Uint8Array%, « entry.[[buffer]], + // entry.[[byteOffset]], entry.[[byteLength]] »). + RootedObject buffer(cx, entry->buffer()); + + uint32_t byteOffset = entry->byteOffset(); + RootedObject view(cx, JS_NewUint8ArrayWithBuffer(cx, buffer, byteOffset, byteLength)); + if (!view) + return nullptr; + + // Step 3.g: Return a promise resolved with ! CreateIterResultObject(view, false). + val.setObject(*view); + RootedObject iterResult(cx, CreateIterResultObject(cx, val, false)); + if (!iterResult) + return nullptr; + val.setObject(*iterResult); + + return PromiseObject::unforgeableResolve(cx, val); + } + + // Step 4: Let autoAllocateChunkSize be this.[[autoAllocateChunkSize]]. + val = controller->getFixedSlot(ByteControllerSlot_AutoAllocateSize); + + // Step 5: If autoAllocateChunkSize is not undefined, + if (!val.isUndefined()) { + double autoAllocateChunkSize = val.toNumber(); + + // Step 5.a: Let buffer be Construct(%ArrayBuffer%, « autoAllocateChunkSize »). + RootedObject bufferObj(cx, JS_NewArrayBuffer(cx, autoAllocateChunkSize)); + + // Step 5.b: If buffer is an abrupt completion, + // return a promise rejected with buffer.[[Value]]. + if (!bufferObj) + return PromiseRejectedWithPendingError(cx); + + RootedArrayBufferObject buffer(cx, &bufferObj->as()); + + // Step 5.c: Let pullIntoDescriptor be Record {[[buffer]]: buffer.[[Value]], + // [[byteOffset]]: 0, + // [[byteLength]]: autoAllocateChunkSize, + // [[bytesFilled]]: 0, [[elementSize]]: 1, + // [[ctor]]: %Uint8Array%, + // [[readerType]]: `"default"`}. + RootedObject pullIntoDescriptor(cx); + pullIntoDescriptor = PullIntoDescriptor::create(cx, buffer, 0, + autoAllocateChunkSize, 0, 1, + nullptr, + ReaderType_Default); + if (!pullIntoDescriptor) + return PromiseRejectedWithPendingError(cx); + + // Step 5.d: Append pullIntoDescriptor as the last element of this.[[pendingPullIntos]]. + val = controller->getFixedSlot(ByteControllerSlot_PendingPullIntos); + RootedNativeObject pendingPullIntos(cx, &val.toObject().as()); + val = ObjectValue(*pullIntoDescriptor); + if (!AppendToList(cx, pendingPullIntos, val)) + return nullptr; + } + + // Step 6: Let promise be ! ReadableStreamAddReadRequest(stream). + Rooted promise(cx, ReadableStreamAddReadRequest(cx, stream)); + if (!promise) + return nullptr; + + // Step 7: Perform ! ReadableByteStreamControllerCallPullIfNeeded(this). + if (!ReadableStreamControllerCallPullIfNeeded(cx, controller)) + return nullptr; + + // Step 8: Return promise. + return promise; +} + +/** + * Unified implementation of ReadableStream controllers' [[PullSteps]] internal + * methods. + * Streams spec, 3.8.5.2. [[PullSteps]] () + * and + * Streams spec, 3.10.5.2. [[PullSteps]] () + */ +static MOZ_MUST_USE JSObject* +ReadableStreamControllerPullSteps(JSContext* cx, HandleNativeObject controller) +{ + MOZ_ASSERT(IsReadableStreamController(controller)); + + if (controller->is()) + return ReadableStreamDefaultControllerPullSteps(cx, controller); + + return ReadableByteStreamControllerPullSteps(cx, controller); +} + + +static MOZ_MUST_USE ReadableStreamBYOBRequest* +CreateReadableStreamBYOBRequest(JSContext* cx, Handle controller, + HandleObject view) +{ + MOZ_ASSERT(controller); + MOZ_ASSERT(JS_IsArrayBufferViewObject(view)); + + Rooted request(cx); + request = NewBuiltinClassInstance(cx); + if (!request) + return nullptr; + + // Step 1: Set this.[[associatedReadableByteStreamController]] to controller. + request->setFixedSlot(BYOBRequestSlot_Controller, ObjectValue(*controller)); + + // Step 2: Set this.[[view]] to view. + request->setFixedSlot(BYOBRequestSlot_View, ObjectValue(*view)); + + return request; +} + +// Streams spec, 3.11.3. new ReadableStreamBYOBRequest ( controller, view ) +bool +ReadableStreamBYOBRequest::constructor(JSContext* cx, unsigned argc, Value* vp) +{ + CallArgs args = CallArgsFromVp(argc, vp); + HandleValue controllerVal = args.get(0); + HandleValue viewVal = args.get(1); + + if (!ThrowIfNotConstructing(cx, args, "ReadableStreamBYOBRequest")) + return false; + + // TODO: open PR against spec to add these checks. + // They're expected to have happened in code using requests. + if (!Is(controllerVal)) { + ReportArgTypeError(cx, "ReadableStreamBYOBRequest", + "ReadableByteStreamController", args.get(0)); + return false; + } + + Rooted controller(cx); + controller = &controllerVal.toObject().as(); + + if (!viewVal.isObject() || !JS_IsArrayBufferViewObject(&viewVal.toObject())) { + ReportArgTypeError(cx, "ReadableStreamBYOBRequest", "ArrayBuffer view", + args.get(1)); + return false; + } + + RootedArrayBufferObject view(cx, &viewVal.toObject().as()); + + RootedObject request(cx, CreateReadableStreamBYOBRequest(cx, controller, view)); + if (!request) + return false; + + args.rval().setObject(*request); + return true; +} + +// Streams spec, 3.11.4.1 get view +static MOZ_MUST_USE bool +ReadableStreamBYOBRequest_view_impl(JSContext* cx, const CallArgs& args) +{ + // Step 2: Return this.[[view]]. + NativeObject* request = &args.thisv().toObject().as(); + args.rval().set(request->getFixedSlot(BYOBRequestSlot_View)); + return true; +} + +static bool +ReadableStreamBYOBRequest_view(JSContext* cx, unsigned argc, Value* vp) +{ + // Step 1: If ! IsReadableStreamBYOBRequest(this) is false, throw a TypeError + // exception. + CallArgs args = CallArgsFromVp(argc, vp); + return CallNonGenericMethod, + ReadableStreamBYOBRequest_view_impl>(cx, args); +} + +static MOZ_MUST_USE bool +ReadableByteStreamControllerRespond(JSContext* cx, + Handle controller, + HandleValue bytesWrittenVal); + +// Streams spec, 3.11.4.2. respond ( bytesWritten ) +static MOZ_MUST_USE bool +ReadableStreamBYOBRequest_respond_impl(JSContext* cx, const CallArgs& args) +{ + Rooted request(cx); + request = &args.thisv().toObject().as(); + HandleValue bytesWritten = args.get(0); + + // Step 2: If this.[[associatedReadableByteStreamController]] is undefined, + // throw a TypeError exception. + RootedValue controllerVal(cx, request->getFixedSlot(BYOBRequestSlot_Controller)); + if (controllerVal.isUndefined()) { + JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, + JSMSG_READABLESTREAMBYOBREQUEST_NO_CONTROLLER, "respond"); + return false; + } + + // Step 3: Return ? + // ReadableByteStreamControllerRespond(this.[[associatedReadableByteStreamController]], + // bytesWritten). + Rooted controller(cx); + controller = &controllerVal.toObject().as(); + + if (!ReadableByteStreamControllerRespond(cx, controller, bytesWritten)) + return false; + + args.rval().setUndefined(); + return true; +} + +static bool +ReadableStreamBYOBRequest_respond(JSContext* cx, unsigned argc, Value* vp) +{ + // Step 1: If ! IsReadableStreamBYOBRequest(this) is false, throw a TypeError + // exception. + CallArgs args = CallArgsFromVp(argc, vp); + return CallNonGenericMethod, + ReadableStreamBYOBRequest_respond_impl>(cx, args); +} + +static MOZ_MUST_USE bool +ReadableByteStreamControllerRespondWithNewView(JSContext* cx, + Handle controller, + HandleObject view); + +// Streams spec, 3.11.4.3. respondWithNewView ( view ) +static MOZ_MUST_USE bool +ReadableStreamBYOBRequest_respondWithNewView_impl(JSContext* cx, const CallArgs& args) +{ + Rooted request(cx); + request = &args.thisv().toObject().as(); + HandleValue viewVal = args.get(0); + + // Step 2: If this.[[associatedReadableByteStreamController]] is undefined, + // throw a TypeError exception. + RootedValue controllerVal(cx, request->getFixedSlot(BYOBRequestSlot_Controller)); + if (controllerVal.isUndefined()) { + JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, + JSMSG_READABLESTREAMBYOBREQUEST_NO_CONTROLLER, "respondWithNewView"); + return false; + } + + // Step 3: If Type(chunk) is not Object, throw a TypeError exception. + // Step 4: If view does not have a [[ViewedArrayBuffer]] internal slot, throw + // a TypeError exception. + if (!viewVal.isObject() || !JS_IsArrayBufferViewObject(&viewVal.toObject())) { + JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, + JSMSG_READABLEBYTESTREAMCONTROLLER_BAD_CHUNK); + return false; + } + + // Step 5: Return ? + // ReadableByteStreamControllerRespondWithNewView(this.[[associatedReadableByteStreamController]], + // view). + Rooted controller(cx); + controller = &controllerVal.toObject().as(); + RootedObject view(cx, &viewVal.toObject()); + + if (!ReadableByteStreamControllerRespondWithNewView(cx, controller, view)) + return false; + + args.rval().setUndefined(); + return true; +} + +static bool +ReadableStreamBYOBRequest_respondWithNewView(JSContext* cx, unsigned argc, Value* vp) +{ + // Step 1: If ! IsReadableStreamBYOBRequest(this) is false, throw a TypeError + // exception. + CallArgs args = CallArgsFromVp(argc, vp); + return CallNonGenericMethod, + ReadableStreamBYOBRequest_respondWithNewView_impl>(cx, args); +} + +static const JSPropertySpec ReadableStreamBYOBRequest_properties[] = { + JS_PSG("view", ReadableStreamBYOBRequest_view, 0), + JS_PS_END +}; + +static const JSFunctionSpec ReadableStreamBYOBRequest_methods[] = { + JS_FN("respond", ReadableStreamBYOBRequest_respond, 1, 0), + JS_FN("respondWithNewView", ReadableStreamBYOBRequest_respondWithNewView, 1, 0), + JS_FS_END +}; + +CLASS_SPEC(ReadableStreamBYOBRequest, 3, 2, ClassSpec::DontDefineConstructor); + +// Streams spec, 3.12.1. IsReadableStreamBYOBRequest ( x ) +// Implemented via is() + +// Streams spec, 3.12.2. IsReadableByteStreamController ( x ) +// Implemented via is() + +// Streams spec, 3.12.3. ReadableByteStreamControllerCallPullIfNeeded ( controller ) +// Unified with 3.9.2 above. + +static void +ReadableByteStreamControllerInvalidateBYOBRequest(NativeObject* controller); + +// Streams spec, 3.12.4. ReadableByteStreamControllerClearPendingPullIntos ( controller ) +static MOZ_MUST_USE bool +ReadableByteStreamControllerClearPendingPullIntos(JSContext* cx, HandleNativeObject controller) +{ + MOZ_ASSERT(controller->is()); + + // Step 1: Perform ! ReadableByteStreamControllerInvalidateBYOBRequest(controller). + ReadableByteStreamControllerInvalidateBYOBRequest(controller); + + // Step 2: Set controller.[[pendingPullIntos]] to a new empty List. + return SetNewList(cx, controller, ByteControllerSlot_PendingPullIntos); +} + +// Streams spec, 3.12.5. ReadableByteStreamControllerClose ( controller ) +static MOZ_MUST_USE bool +ReadableByteStreamControllerClose(JSContext* cx, Handle controller) +{ + // Step 1: Let stream be controller.[[controlledReadableStream]]. + Rooted stream(cx, StreamFromController(controller)); + + // Step 2: Assert: controller.[[closeRequested]] is false. + MOZ_ASSERT(!(ControllerFlags(controller) & ControllerFlag_CloseRequested)); + + // Step 3: Assert: stream.[[state]] is "readable". + MOZ_ASSERT(stream->readable()); + + // Step 4: If controller.[[queueTotalSize]] > 0, + double queueTotalSize = controller->getFixedSlot(QueueContainerSlot_TotalSize).toNumber(); + if (queueTotalSize > 0) { + // Step a: Set controller.[[closeRequested]] to true. + AddControllerFlags(controller, ControllerFlag_CloseRequested); + + // Step b: Return + return true; + } + + // Step 5: If controller.[[pendingPullIntos]] is not empty, + RootedValue val(cx, controller->getFixedSlot(ByteControllerSlot_PendingPullIntos)); + RootedNativeObject pendingPullIntos(cx, &val.toObject().as()); + if (pendingPullIntos->getDenseInitializedLength() != 0) { + // Step a: Let firstPendingPullInto be the first element of + // controller.[[pendingPullIntos]]. + Rooted firstPendingPullInto(cx); + firstPendingPullInto = PeekList(pendingPullIntos); + + // Step b: If firstPendingPullInto.[[bytesFilled]] > 0, + if (firstPendingPullInto->bytesFilled() > 0) { + // Step i: Let e be a new TypeError exception. { + JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, + JSMSG_READABLEBYTESTREAMCONTROLLER_CLOSE_PENDING_PULL); + RootedValue e(cx); + // Not much we can do about uncatchable exceptions, just bail. + if (!cx->getPendingException(&e)) + return false; + // Step ii: Perform ! ReadableByteStreamControllerError(controller, e). + if (!ReadableStreamControllerError(cx, controller, e)) + return false; + + // Step iii: Throw e. + return false; + } + } + + // Step 6: Perform ! ReadableStreamClose(stream). + return ReadableStreamClose(cx, stream); +} + +static MOZ_MUST_USE JSObject* +ReadableByteStreamControllerConvertPullIntoDescriptor(JSContext* cx, + Handle pullIntoDescriptor); + +// Streams spec, 3.12.6. ReadableByteStreamControllerCommitPullIntoDescriptor ( stream, pullIntoDescriptor ) +static MOZ_MUST_USE bool +ReadableByteStreamControllerCommitPullIntoDescriptor(JSContext* cx, Handle stream, + Handle pullIntoDescriptor) +{ + // Step 1: MOZ_ASSERT: stream.[[state]] is not "errored". + MOZ_ASSERT(!stream->errored()); + + // Step 2: Let done be false. + bool done = false; + + // Step 3: If stream.[[state]] is "closed", + if (stream->closed()) { + // Step a: MOZ_ASSERT: pullIntoDescriptor.[[bytesFilled]] is 0. + MOZ_ASSERT(pullIntoDescriptor->bytesFilled() == 0); + + // Step b: Set done to true. + done = true; + } + + // Step 4: Let filledView be + // ! ReadableByteStreamControllerConvertPullIntoDescriptor(pullIntoDescriptor). + RootedObject filledView(cx); + filledView = ReadableByteStreamControllerConvertPullIntoDescriptor(cx, pullIntoDescriptor); + if (!filledView) + return false; + + // Step 5: If pullIntoDescriptor.[[readerType]] is "default", + uint32_t readerType = pullIntoDescriptor->readerType(); + RootedValue filledViewVal(cx, ObjectValue(*filledView)); + if (readerType == ReaderType_Default) { + // Step a: Perform ! ReadableStreamFulfillReadRequest(stream, filledView, done). + if (!ReadableStreamFulfillReadOrReadIntoRequest(cx, stream, filledViewVal, done)) + return false; + } else { + // Step 6: Otherwise, + // Step a: MOZ_ASSERT: pullIntoDescriptor.[[readerType]] is "byob". + MOZ_ASSERT(readerType == ReaderType_BYOB); + + // Step b: Perform ! ReadableStreamFulfillReadIntoRequest(stream, filledView, done). + if (!ReadableStreamFulfillReadOrReadIntoRequest(cx, stream, filledViewVal, done)) + return false; + } + + return true; +} + +// Streams spec, 3.12.7. ReadableByteStreamControllerConvertPullIntoDescriptor ( pullIntoDescriptor ) +static MOZ_MUST_USE JSObject* +ReadableByteStreamControllerConvertPullIntoDescriptor(JSContext* cx, + Handle pullIntoDescriptor) +{ + // Step 1: Let bytesFilled be pullIntoDescriptor.[[bytesFilled]]. + uint32_t bytesFilled = pullIntoDescriptor->bytesFilled(); + + // Step 2: Let elementSize be pullIntoDescriptor.[[elementSize]]. + uint32_t elementSize = pullIntoDescriptor->elementSize(); + + // Step 3: Assert: bytesFilled <= pullIntoDescriptor.[[byteLength]]. + MOZ_ASSERT(bytesFilled <= pullIntoDescriptor->byteLength()); + + // Step 4: Assert: bytesFilled mod elementSize is 0. + MOZ_ASSERT(bytesFilled % elementSize == 0); + + // Step 5: Return ! Construct(pullIntoDescriptor.[[ctor]], + // pullIntoDescriptor.[[buffer]], + // pullIntoDescriptor.[[byteOffset]], + // bytesFilled / elementSize). + RootedObject ctor(cx, pullIntoDescriptor->ctor()); + if (!ctor) { + if (!GetBuiltinConstructor(cx, JSProto_Uint8Array, &ctor)) + return nullptr; + } + RootedObject buffer(cx, pullIntoDescriptor->buffer()); + uint32_t byteOffset = pullIntoDescriptor->byteOffset(); + FixedConstructArgs<3> args(cx); + args[0].setObject(*buffer); + args[1].setInt32(byteOffset); + args[2].setInt32(bytesFilled / elementSize); + return JS_New(cx, ctor, args); +} + +static MOZ_MUST_USE bool +ReadableByteStreamControllerEnqueueChunkToQueue(JSContext* cx, + Handle controller, + HandleObject buffer, uint32_t byteOffset, + uint32_t byteLength); + +static MOZ_MUST_USE ArrayBufferObject* +TransferArrayBuffer(JSContext* cx, HandleObject buffer); + +static MOZ_MUST_USE bool +ReadableByteStreamControllerProcessPullIntoDescriptorsUsingQueue(JSContext* cx, + Handle controller); + +// Streams spec, 3.12.8. ReadableByteStreamControllerEnqueue ( controller, chunk ) +static MOZ_MUST_USE bool +ReadableByteStreamControllerEnqueue(JSContext* cx, + Handle controller, + HandleObject chunk) +{ + // Step 1: Let stream be controller.[[controlledReadableStream]]. + Rooted stream(cx, StreamFromController(controller)); + + // Step 2: Assert: controller.[[closeRequested]] is false. + MOZ_ASSERT(!(ControllerFlags(controller) & ControllerFlag_CloseRequested)); + + // Step 3: Assert: stream.[[state]] is "readable". + MOZ_ASSERT(stream->readable()); + + // Step 4: Let buffer be chunk.[[ViewedArrayBuffer]]. + bool dummy; + RootedObject buffer(cx, JS_GetArrayBufferViewBuffer(cx, chunk, &dummy)); + if (!buffer) + return false; + + // Step 5: Let byteOffset be chunk.[[ByteOffset]]. + uint32_t byteOffset = JS_GetArrayBufferViewByteOffset(chunk); + + // Step 6: Let byteLength be chunk.[[ByteLength]]. + uint32_t byteLength = JS_GetArrayBufferViewByteLength(chunk); + + // Step 7: Let transferredBuffer be ! TransferArrayBuffer(buffer). + RootedArrayBufferObject transferredBuffer(cx, TransferArrayBuffer(cx, buffer)); + if (!transferredBuffer) + return false; + + // Step 8: If ! ReadableStreamHasDefaultReader(stream) is true + if (ReadableStreamHasDefaultReader(stream)) { + // Step a: If ! ReadableStreamGetNumReadRequests(stream) is 0, + if (ReadableStreamGetNumReadRequests(stream) == 0) { + // Step i: Perform + // ! ReadableByteStreamControllerEnqueueChunkToQueue(controller, + // transferredBuffer, + // byteOffset, + // byteLength). + if (!ReadableByteStreamControllerEnqueueChunkToQueue(cx, controller, transferredBuffer, + byteOffset, byteLength)) + { + return false; + } + } else { + // Step b: Otherwise, + // Step i: Assert: controller.[[queue]] is empty. +#if DEBUG + RootedValue val(cx, controller->getFixedSlot(QueueContainerSlot_Queue)); + RootedNativeObject queue(cx, &val.toObject().as()); + MOZ_ASSERT(queue->getDenseInitializedLength() == 0); +#endif // DEBUG + + // Step ii: Let transferredView be + // ! Construct(%Uint8Array%, transferredBuffer, byteOffset, byteLength). + RootedObject transferredView(cx, JS_NewUint8ArrayWithBuffer(cx, transferredBuffer, + byteOffset, byteLength)); + if (!transferredView) + return false; + + // Step iii: Perform ! ReadableStreamFulfillReadRequest(stream, transferredView, false). + RootedValue chunk(cx, ObjectValue(*transferredView)); + if (!ReadableStreamFulfillReadOrReadIntoRequest(cx, stream, chunk, false)) + return false; + } + } else if (ReadableStreamHasBYOBReader(stream)) { + // Step 9: Otherwise, + // Step a: If ! ReadableStreamHasBYOBReader(stream) is true, + // Step i: Perform + // ! ReadableByteStreamControllerEnqueueChunkToQueue(controller, + // transferredBuffer, + // byteOffset, + // byteLength). + if (!ReadableByteStreamControllerEnqueueChunkToQueue(cx, controller, transferredBuffer, + byteOffset, byteLength)) + { + return false; + } + + // Step ii: Perform ! ReadableByteStreamControllerProcessPullIntoDescriptorsUsingQueue(controller). + if (!ReadableByteStreamControllerProcessPullIntoDescriptorsUsingQueue(cx, controller)) + return false; + } else { + // Step b: Otherwise, + // Step i: Assert: ! IsReadableStreamLocked(stream) is false. + MOZ_ASSERT(!IsReadableStreamLocked(stream)); + + // Step ii: Perform + // ! ReadableByteStreamControllerEnqueueChunkToQueue(controller, + // transferredBuffer, + // byteOffset, + // byteLength). + if (!ReadableByteStreamControllerEnqueueChunkToQueue(cx, controller, transferredBuffer, + byteOffset, byteLength)) + { + return false; + } + } + + return true; +} + +// Streams spec, 3.12.9. +// ReadableByteStreamControllerEnqueueChunkToQueue ( controller, buffer, +// byteOffset, byteLength ) +static MOZ_MUST_USE bool +ReadableByteStreamControllerEnqueueChunkToQueue(JSContext* cx, + Handle controller, + HandleObject buffer, uint32_t byteOffset, + uint32_t byteLength) +{ + MOZ_ASSERT(controller->is(), "must operate on ReadableByteStreamController"); + + // Step 1: Append Record {[[buffer]]: buffer, + // [[byteOffset]]: byteOffset, + // [[byteLength]]: byteLength} + // as the last element of controller.[[queue]]. + RootedValue val(cx, controller->getFixedSlot(QueueContainerSlot_Queue)); + RootedNativeObject queue(cx, &val.toObject().as()); + + Rooted chunk(cx); + chunk = ByteStreamChunk::create(cx, buffer, byteOffset, byteLength); + if (!chunk) + return false; + + RootedValue chunkVal(cx, ObjectValue(*chunk)); + if (!AppendToList(cx, queue, chunkVal)) + return false; + + // Step 2: Add byteLength to controller.[[queueTotalSize]]. + double queueTotalSize = controller->getFixedSlot(QueueContainerSlot_TotalSize).toNumber(); + controller->setFixedSlot(QueueContainerSlot_TotalSize, + NumberValue(queueTotalSize + byteLength)); + + return true; +} + +// Streams spec, 3.12.10. ReadableByteStreamControllerError ( controller, e ) +// Unified with 3.9.6 above. + +// Streams spec, 3.12.11. ReadableByteStreamControllerFillHeadPullIntoDescriptor ( controler, size, pullIntoDescriptor ) +static void +ReadableByteStreamControllerFillHeadPullIntoDescriptor(ReadableByteStreamController* controller, uint32_t size, + Handle pullIntoDescriptor) +{ + // Step 1: Assert: either controller.[[pendingPullIntos]] is empty, or the + // first element of controller.[[pendingPullIntos]] is pullIntoDescriptor. +#if DEBUG + Value val = controller->getFixedSlot(ByteControllerSlot_PendingPullIntos); + NativeObject* pendingPullIntos = &val.toObject().as(); + MOZ_ASSERT(pendingPullIntos->getDenseInitializedLength() == 0 || + &pendingPullIntos->getDenseElement(0).toObject() == pullIntoDescriptor); +#endif // DEBUG + + // Step 2: Perform ! ReadableByteStreamControllerInvalidateBYOBRequest(controller). + ReadableByteStreamControllerInvalidateBYOBRequest(controller); + + // Step 3: Set pullIntoDescriptor.[[bytesFilled]] to pullIntoDescriptor.[[bytesFilled]] + size. + pullIntoDescriptor->setBytesFilled(pullIntoDescriptor->bytesFilled() + size); +} + +// Streams spec, 3.12.12. ReadableByteStreamControllerFillPullIntoDescriptorFromQueue ( controller, pullIntoDescriptor ) +static MOZ_MUST_USE bool +ReadableByteStreamControllerFillPullIntoDescriptorFromQueue(JSContext* cx, + Handle controller, + Handle pullIntoDescriptor, + bool* ready) +{ + *ready = false; + + // Step 1: Let elementSize be pullIntoDescriptor.[[elementSize]]. + uint32_t elementSize = pullIntoDescriptor->elementSize(); + + // Step 2: Let currentAlignedBytes be pullIntoDescriptor.[[bytesFilled]] − + // (pullIntoDescriptor.[[bytesFilled]] mod elementSize). + uint32_t bytesFilled = pullIntoDescriptor->bytesFilled(); + uint32_t currentAlignedBytes = bytesFilled - (bytesFilled % elementSize); + + // Step 3: Let maxBytesToCopy be min(controller.[[queueTotalSize]], + // pullIntoDescriptor.[[byteLength]] − pullIntoDescriptor.[[bytesFilled]]). + uint32_t byteLength = pullIntoDescriptor->byteLength(); + + // The queue size could be negative or overflow uint32_t. We cannot + // validly have a maxBytesToCopy value that'd overflow uint32_t, though, + // so just clamp to that. + Value sizeVal = controller->getFixedSlot(QueueContainerSlot_TotalSize); + uint32_t queueTotalSize = JS::ToUint32(sizeVal.toNumber()); + uint32_t maxBytesToCopy = std::min(queueTotalSize, byteLength - bytesFilled); + + // Step 4: Let maxBytesFilled be pullIntoDescriptor.[[bytesFilled]] + maxBytesToCopy. + uint32_t maxBytesFilled = bytesFilled + maxBytesToCopy; + + // Step 5: Let maxAlignedBytes be maxBytesFilled − (maxBytesFilled mod elementSize). + uint32_t maxAlignedBytes = maxBytesFilled - (maxBytesFilled % elementSize); + + // Step 6: Let totalBytesToCopyRemaining be maxBytesToCopy. + uint32_t totalBytesToCopyRemaining = maxBytesToCopy; + + // Step 7: Let ready be false (implicit). + + // Step 8: If maxAlignedBytes > currentAlignedBytes, + if (maxAlignedBytes > currentAlignedBytes) { + // Step a: Set totalBytesToCopyRemaining to maxAlignedBytes − + // pullIntoDescriptor.[[bytesFilled]]. + totalBytesToCopyRemaining = maxAlignedBytes - bytesFilled; + + // Step b: Let ready be true. + *ready = true; + } + + // Step 9: Let queue be controller.[[queue]]. + RootedValue val(cx, controller->getFixedSlot(QueueContainerSlot_Queue)); + RootedNativeObject queue(cx, &val.toObject().as()); + + // Step 10: Repeat the following steps while totalBytesToCopyRemaining > 0, + Rooted headOfQueue(cx); + while (totalBytesToCopyRemaining > 0) { + MOZ_ASSERT(queue->getDenseInitializedLength() != 0); + + // Step a: Let headOfQueue be the first element of queue. + headOfQueue = PeekList(queue); + + // Step b: Let bytesToCopy be min(totalBytesToCopyRemaining, + // headOfQueue.[[byteLength]]). + uint32_t byteLength = headOfQueue->byteLength(); + uint32_t bytesToCopy = std::min(totalBytesToCopyRemaining, byteLength); + + // Step c: Let destStart be pullIntoDescriptor.[[byteOffset]] + + // pullIntoDescriptor.[[bytesFilled]]. + uint32_t destStart = pullIntoDescriptor->byteOffset() + bytesFilled; + + // Step d: Perform ! CopyDataBlockBytes(pullIntoDescriptor.[[buffer]].[[ArrayBufferData]], + // destStart, + // headOfQueue.[[buffer]].[[ArrayBufferData]], + // headOfQueue.[[byteOffset]], + // bytesToCopy). + RootedArrayBufferObject sourceBuffer(cx, headOfQueue->buffer()); + uint32_t sourceOffset = headOfQueue->byteOffset(); + RootedArrayBufferObject targetBuffer(cx, pullIntoDescriptor->buffer()); + ArrayBufferObject::copyData(targetBuffer, destStart, sourceBuffer, sourceOffset, + bytesToCopy); + + // Step e: If headOfQueue.[[byteLength]] is bytesToCopy, + if (byteLength == bytesToCopy) { + // Step i: Remove the first element of queue, shifting all other elements + // downward (so that the second becomes the first, and so on). + headOfQueue = ShiftFromList(cx, queue); + MOZ_ASSERT(headOfQueue); + } else { + // Step f: Otherwise, + // Step i: Set headOfQueue.[[byteOffset]] to headOfQueue.[[byteOffset]] + + // bytesToCopy. + headOfQueue->SetByteOffset(sourceOffset + bytesToCopy); + + // Step ii: Set headOfQueue.[[byteLength]] to headOfQueue.[[byteLength]] − + // bytesToCopy. + headOfQueue->SetByteLength(byteLength - bytesToCopy); + } + + // Step g: Set controller.[[queueTotalSize]] to + // controller.[[queueTotalSize]] − bytesToCopy. + queueTotalSize = controller->getFixedSlot(QueueContainerSlot_TotalSize).toNumber(); + queueTotalSize -= bytesToCopy; + controller->setFixedSlot(QueueContainerSlot_TotalSize, NumberValue(queueTotalSize)); + + // Step h: Perform ! ReadableByteStreamControllerFillHeadPullIntoDescriptor(controller, + // bytesToCopy, + // pullIntoDescriptor). + ReadableByteStreamControllerFillHeadPullIntoDescriptor(controller, bytesToCopy, + pullIntoDescriptor); + bytesFilled += bytesToCopy; + MOZ_ASSERT(bytesFilled == pullIntoDescriptor->bytesFilled()); + + // Step i: Set totalBytesToCopyRemaining to totalBytesToCopyRemaining − bytesToCopy. + totalBytesToCopyRemaining -= bytesToCopy; + } + + // Step 11: If ready is false, + if (!*ready) { + // Step a: Assert: controller.[[queueTotalSize]] is 0. + MOZ_ASSERT(controller->getFixedSlot(QueueContainerSlot_TotalSize).toNumber() == 0); + + // Step b: Assert: pullIntoDescriptor.[[bytesFilled]] > 0. + MOZ_ASSERT(bytesFilled > 0, "should have filled some bytes"); + + // Step c: Assert: pullIntoDescriptor.[[bytesFilled]] < + // pullIntoDescriptor.[[elementSize]]. + MOZ_ASSERT(bytesFilled < elementSize); + } + + // Step 12: Return ready. + return true; +} + +// Streams spec 3.12.13. ReadableByteStreamControllerGetDesiredSize ( controller ) +// Unified with 3.9.8 above. + +// Streams spec, 3.12.14. ReadableByteStreamControllerHandleQueueDrain ( controller ) +static MOZ_MUST_USE bool +ReadableByteStreamControllerHandleQueueDrain(JSContext* cx, HandleNativeObject controller) +{ + MOZ_ASSERT(controller->is()); + + // Step 1: Assert: controller.[[controlledReadableStream]].[[state]] is "readable". + Rooted stream(cx, StreamFromController(controller)); + MOZ_ASSERT(stream->readable()); + + // Step 2: If controller.[[queueTotalSize]] is 0 and + // controller.[[closeRequested]] is true, + double totalSize = controller->getFixedSlot(QueueContainerSlot_TotalSize).toNumber(); + bool closeRequested = ControllerFlags(controller) & ControllerFlag_CloseRequested; + if (totalSize == 0 && closeRequested) { + // Step a: Perform ! ReadableStreamClose(controller.[[controlledReadableStream]]). + return ReadableStreamClose(cx, stream); + } + + // Step 3: Otherwise, + // Step a: Perform ! ReadableByteStreamControllerCallPullIfNeeded(controller). + return ReadableStreamControllerCallPullIfNeeded(cx, controller); +} + +// Streams spec 3.12.15. ReadableByteStreamControllerInvalidateBYOBRequest ( controller ) +static void +ReadableByteStreamControllerInvalidateBYOBRequest(NativeObject* controller) +{ + MOZ_ASSERT(controller->is()); + + // Step 1: If controller.[[byobRequest]] is undefined, return. + Value byobRequestVal = controller->getFixedSlot(ByteControllerSlot_BYOBRequest); + if (byobRequestVal.isUndefined()) + return; + + NativeObject* byobRequest = &byobRequestVal.toObject().as(); + // Step 2: Set controller.[[byobRequest]].[[associatedReadableByteStreamController]] + // to undefined. + byobRequest->setFixedSlot(BYOBRequestSlot_Controller, UndefinedValue()); + + // Step 3: Set controller.[[byobRequest]].[[view]] to undefined. + byobRequest->setFixedSlot(BYOBRequestSlot_View, UndefinedValue()); + + // Step 4: Set controller.[[byobRequest]] to undefined. + controller->setFixedSlot(ByteControllerSlot_BYOBRequest, UndefinedValue()); +} + +static MOZ_MUST_USE PullIntoDescriptor* +ReadableByteStreamControllerShiftPendingPullInto(JSContext* cx, HandleNativeObject controller); + +// Streams spec 3.12.16. ReadableByteStreamControllerProcessPullIntoDescriptorsUsingQueue ( controller ) +static MOZ_MUST_USE bool +ReadableByteStreamControllerProcessPullIntoDescriptorsUsingQueue(JSContext* cx, + Handle controller) +{ + Rooted stream(cx, StreamFromController(controller)); + + // Step 1: Assert: controller.[[closeRequested]] is false. + MOZ_ASSERT(!(ControllerFlags(controller) & ControllerFlag_CloseRequested)); + + // Step 2: Repeat the following steps while controller.[[pendingPullIntos]] + // is not empty, + RootedValue val(cx, controller->getFixedSlot(ByteControllerSlot_PendingPullIntos)); + RootedNativeObject pendingPullIntos(cx, &val.toObject().as()); + Rooted pullIntoDescriptor(cx); + while (pendingPullIntos->getDenseInitializedLength() != 0) { + // Step a: If controller.[[queueTotalSize]] is 0, return. + double queueTotalSize = controller->getFixedSlot(QueueContainerSlot_TotalSize).toNumber(); + if (queueTotalSize == 0) + return true; + + // Step b: Let pullIntoDescriptor be the first element of + // controller.[[pendingPullIntos]]. + pullIntoDescriptor = PeekList(pendingPullIntos); + + // Step c: If ! ReadableByteStreamControllerFillPullIntoDescriptorFromQueue(controller, pullIntoDescriptor) + // is true, + bool ready; + if (!ReadableByteStreamControllerFillPullIntoDescriptorFromQueue(cx, controller, + pullIntoDescriptor, + &ready)) + { + return false; + } + if (ready) { + // Step i: Perform ! ReadableByteStreamControllerShiftPendingPullInto(controller). + if (!ReadableByteStreamControllerShiftPendingPullInto(cx, controller)) + return false; + + // Step ii: Perform ! ReadableByteStreamControllerCommitPullIntoDescriptor(controller.[[controlledReadableStream]], + // pullIntoDescriptor). + if (!ReadableByteStreamControllerCommitPullIntoDescriptor(cx, stream, + pullIntoDescriptor)) + { + return false; + } + } + } + + return true; +} + +// Streams spec, 3.12.17. ReadableByteStreamControllerPullInto ( controller, view ) +static MOZ_MUST_USE JSObject* +ReadableByteStreamControllerPullInto(JSContext* cx, + Handle controller, + HandleNativeObject view) +{ + MOZ_ASSERT(controller->is()); + MOZ_ASSERT(JS_IsArrayBufferViewObject(view)); + + // Step 1: Let stream be controller.[[controlledReadableStream]]. + Rooted stream(cx, StreamFromController(controller)); + + // Step 2: Let elementSize be 1. + uint32_t elementSize = 1; + + RootedObject ctor(cx); + // Step 4: If view has a [[TypedArrayName]] internal slot (i.e., it is not a + // DataView), + if (view->is()) { + JSProtoKey protoKey = StandardProtoKeyOrNull(view); + MOZ_ASSERT(protoKey); + + if (!GetBuiltinConstructor(cx, protoKey, &ctor)) + return nullptr; + elementSize = 1 << TypedArrayShift(view->as().type()); + } else { + // Step 3: Let ctor be %DataView% (reordered). + if (!GetBuiltinConstructor(cx, JSProto_DataView, &ctor)) + return nullptr; + } + + // Step 5: Let pullIntoDescriptor be Record {[[buffer]]: view.[[ViewedArrayBuffer]], + // [[byteOffset]]: view.[[ByteOffset]], + // [[byteLength]]: view.[[ByteLength]], + // [[bytesFilled]]: 0, + // [[elementSize]]: elementSize, + // [[ctor]]: ctor, + // [[readerType]]: "byob"}. + bool dummy; + RootedArrayBufferObject buffer(cx, &JS_GetArrayBufferViewBuffer(cx, view, &dummy) + ->as()); + if (!buffer) + return nullptr; + + uint32_t byteOffset = JS_GetArrayBufferViewByteOffset(view); + uint32_t byteLength = JS_GetArrayBufferViewByteLength(view); + Rooted pullIntoDescriptor(cx); + pullIntoDescriptor = PullIntoDescriptor::create(cx, buffer, byteOffset, byteLength, 0, + elementSize, ctor, + ReaderType_BYOB); + if (!pullIntoDescriptor) + return nullptr; + + // Step 6: If controller.[[pendingPullIntos]] is not empty, + RootedValue val(cx, controller->getFixedSlot(ByteControllerSlot_PendingPullIntos)); + RootedNativeObject pendingPullIntos(cx, &val.toObject().as()); + if (pendingPullIntos->getDenseInitializedLength() != 0) { + // Step a: Set pullIntoDescriptor.[[buffer]] to + // ! TransferArrayBuffer(pullIntoDescriptor.[[buffer]]). + RootedArrayBufferObject transferredBuffer(cx, TransferArrayBuffer(cx, buffer)); + if (!transferredBuffer) + return nullptr; + pullIntoDescriptor->setBuffer(transferredBuffer); + + // Step b: Append pullIntoDescriptor as the last element of + // controller.[[pendingPullIntos]]. + val = ObjectValue(*pullIntoDescriptor); + if (!AppendToList(cx, pendingPullIntos, val)) + return nullptr; + + // Step c: Return ! ReadableStreamAddReadIntoRequest(stream). + return ReadableStreamAddReadIntoRequest(cx, stream); + } + + // Step 7: If stream.[[state]] is "closed", + if (stream->closed()) { + // Step a: Let emptyView be ! Construct(ctor, pullIntoDescriptor.[[buffer]], + // pullIntoDescriptor.[[byteOffset]], 0). + FixedConstructArgs<3> args(cx); + args[0].setObject(*buffer); + args[1].setInt32(byteOffset); + args[2].setInt32(0); + RootedObject emptyView(cx, JS_New(cx, ctor, args)); + if (!emptyView) + return nullptr; + + // Step b: Return a promise resolved with + // ! CreateIterResultObject(emptyView, true). + RootedValue val(cx, ObjectValue(*emptyView)); + RootedObject iterResult(cx, CreateIterResultObject(cx, val, true)); + if (!iterResult) + return nullptr; + val = ObjectValue(*iterResult); + return PromiseObject::unforgeableResolve(cx, val); + } + + // Step 8: If controller.[[queueTotalSize]] > 0, + double queueTotalSize = controller->getFixedSlot(QueueContainerSlot_TotalSize).toNumber(); + if (queueTotalSize > 0) { + // Step a: If ! ReadableByteStreamControllerFillPullIntoDescriptorFromQueue(controller, + // pullIntoDescriptor) + // is true, + bool ready; + if (!ReadableByteStreamControllerFillPullIntoDescriptorFromQueue(cx, controller, + pullIntoDescriptor, &ready)) + { + return nullptr; + } + + if (ready) { + // Step i: Let filledView be + // ! ReadableByteStreamControllerConvertPullIntoDescriptor(pullIntoDescriptor). + RootedObject filledView(cx); + filledView = ReadableByteStreamControllerConvertPullIntoDescriptor(cx, + pullIntoDescriptor); + if (!filledView) + return nullptr; + + // Step ii: Perform ! ReadableByteStreamControllerHandleQueueDrain(controller). + if (!ReadableByteStreamControllerHandleQueueDrain(cx, controller)) + return nullptr; + + // Step iii: Return a promise resolved with + // ! CreateIterResultObject(filledView, false). + val = ObjectValue(*filledView); + RootedObject iterResult(cx, CreateIterResultObject(cx, val, false)); + if (!iterResult) + return nullptr; + val = ObjectValue(*iterResult); + return PromiseObject::unforgeableResolve(cx, val); + } + + // Step b: If controller.[[closeRequested]] is true, + if (ControllerFlags(controller) & ControllerFlag_CloseRequested) { + // Step i: Let e be a TypeError exception. + JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, + JSMSG_READABLESTREAMCONTROLLER_CLOSED, "read"); + + // Not much we can do about uncatchable exceptions, just bail. + RootedValue e(cx); + if (!GetAndClearException(cx, &e)) + return nullptr; + + // Step ii: Perform ! ReadableByteStreamControllerError(controller, e). + if (!ReadableStreamControllerError(cx, controller, e)) + return nullptr; + + // Step iii: Return a promise rejected with e. + return PromiseObject::unforgeableReject(cx, e); + } + } + + // Step 9: Set pullIntoDescriptor.[[buffer]] to + // ! TransferArrayBuffer(pullIntoDescriptor.[[buffer]]). + RootedArrayBufferObject transferredBuffer(cx, TransferArrayBuffer(cx, buffer)); + if (!transferredBuffer) + return nullptr; + pullIntoDescriptor->setBuffer(transferredBuffer); + + // Step 10: Append pullIntoDescriptor as the last element of + // controller.[[pendingPullIntos]]. + val = ObjectValue(*pullIntoDescriptor); + if (!AppendToList(cx, pendingPullIntos, val)) + return nullptr; + + // Step 11: Let promise be ! ReadableStreamAddReadIntoRequest(stream). + Rooted promise(cx, ReadableStreamAddReadIntoRequest(cx, stream)); + if (!promise) + return nullptr; + + // Step 12: Perform ! ReadableByteStreamControllerCallPullIfNeeded(controller). + if (!ReadableStreamControllerCallPullIfNeeded(cx, controller)) + return nullptr; + + // Step 13: Return promise. + return promise; +} + +static MOZ_MUST_USE bool +ReadableByteStreamControllerRespondInternal(JSContext* cx, + Handle controller, + double bytesWritten); + +// Streams spec 3.12.18. ReadableByteStreamControllerRespond( controller, bytesWritten ) +static MOZ_MUST_USE bool +ReadableByteStreamControllerRespond(JSContext* cx, + Handle controller, + HandleValue bytesWrittenVal) +{ + MOZ_ASSERT(controller->is()); + + // Step 1: Let bytesWritten be ? ToNumber(bytesWritten). + double bytesWritten; + if (!ToNumber(cx, bytesWrittenVal, &bytesWritten)) + return false; + + // Step 2: If ! IsFiniteNonNegativeNumber(bytesWritten) is false, + if (bytesWritten < 0 || mozilla::IsNaN(bytesWritten) || mozilla::IsInfinite(bytesWritten)) { + JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, + JSMSG_NUMBER_MUST_BE_FINITE_NON_NEGATIVE, "bytesWritten"); + return false; + } + + // Step 3: Assert: controller.[[pendingPullIntos]] is not empty. +#if DEBUG + Value val = controller->getFixedSlot(ByteControllerSlot_PendingPullIntos); + RootedNativeObject pendingPullIntos(cx, &val.toObject().as()); + MOZ_ASSERT(pendingPullIntos->getDenseInitializedLength() != 0); +#endif // DEBUG + + // Step 4: Perform ? ReadableByteStreamControllerRespondInternal(controller, bytesWritten). + return ReadableByteStreamControllerRespondInternal(cx, controller, bytesWritten); +} + +// Streams spec 3.12.19. ReadableByteStreamControllerRespondInClosedState( controller, firstDescriptor ) +static MOZ_MUST_USE bool +ReadableByteStreamControllerRespondInClosedState(JSContext* cx, + Handle controller, + Handle firstDescriptor) +{ + // Step 1: Set firstDescriptor.[[buffer]] to + // ! TransferArrayBuffer(firstDescriptor.[[buffer]]). + RootedArrayBufferObject buffer(cx, firstDescriptor->buffer()); + RootedArrayBufferObject transferredBuffer(cx, TransferArrayBuffer(cx, buffer)); + if (!transferredBuffer) + return false; + firstDescriptor->setBuffer(transferredBuffer); + + // Step 2: Assert: firstDescriptor.[[bytesFilled]] is 0. + MOZ_ASSERT(firstDescriptor->bytesFilled() == 0); + + // Step 3: Let stream be controller.[[controlledReadableStream]]. + Rooted stream(cx, StreamFromController(controller)); + + // Step 4: If ReadableStreamHasBYOBReader(stream) is true, + if (ReadableStreamHasBYOBReader(stream)) { + // Step a: Repeat the following steps while + // ! ReadableStreamGetNumReadIntoRequests(stream) > 0, + Rooted descriptor(cx); + while (ReadableStreamGetNumReadRequests(stream) > 0) { + // Step i: Let pullIntoDescriptor be + // ! ReadableByteStreamControllerShiftPendingPullInto(controller). + descriptor = ReadableByteStreamControllerShiftPendingPullInto(cx, controller); + if (!descriptor) + return false; + + // Step ii: Perform ! + // ReadableByteStreamControllerCommitPullIntoDescriptor(stream, + // pullIntoDescriptor). + if (!ReadableByteStreamControllerCommitPullIntoDescriptor(cx, stream, descriptor)) + return false; + } + } + + return true; +} + +// Streams spec 3.12.20. +// ReadableByteStreamControllerRespondInReadableState( controller, bytesWritten, pullIntoDescriptor ) +static MOZ_MUST_USE bool +ReadableByteStreamControllerRespondInReadableState(JSContext* cx, + Handle controller, + uint32_t bytesWritten, + Handle pullIntoDescriptor) +{ + // Step 1: If pullIntoDescriptor.[[bytesFilled]] + bytesWritten > pullIntoDescriptor.[[byteLength]], + // throw a RangeError exception. + uint32_t bytesFilled = pullIntoDescriptor->bytesFilled(); + uint32_t byteLength = pullIntoDescriptor->byteLength(); + if (bytesFilled + bytesWritten > byteLength) { + JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, + JSMSG_READABLEBYTESTREAMCONTROLLER_INVALID_BYTESWRITTEN); + return false; + } + + // Step 2: Perform ! ReadableByteStreamControllerFillHeadPullIntoDescriptor(controller, + // bytesWritten, + // pullIntoDescriptor). + ReadableByteStreamControllerFillHeadPullIntoDescriptor(controller, bytesWritten, + pullIntoDescriptor); + bytesFilled += bytesWritten; + + // Step 3: If pullIntoDescriptor.[[bytesFilled]] < + // pullIntoDescriptor.[[elementSize]], return. + uint32_t elementSize = pullIntoDescriptor->elementSize(); + if (bytesFilled < elementSize) + return true; + + // Step 4: Perform ! ReadableByteStreamControllerShiftPendingPullInto(controller). + if (!ReadableByteStreamControllerShiftPendingPullInto(cx, controller)) + return false; + + // Step 5: Let remainderSize be pullIntoDescriptor.[[bytesFilled]] mod + // pullIntoDescriptor.[[elementSize]]. + uint32_t remainderSize = bytesFilled % elementSize; + + // Step 6: If remainderSize > 0, + RootedArrayBufferObject buffer(cx, pullIntoDescriptor->buffer()); + if (remainderSize > 0) { + // Step a: Let end be pullIntoDescriptor.[[byteOffset]] + + // pullIntoDescriptor.[[bytesFilled]]. + uint32_t end = pullIntoDescriptor->byteOffset() + bytesFilled; + + // Step b: Let remainder be ? CloneArrayBuffer(pullIntoDescriptor.[[buffer]], + // end − remainderSize, + // remainderSize, %ArrayBuffer%). + // TODO: this really, really should just use a slot to store the remainder. + RootedObject remainderObj(cx, JS_NewArrayBuffer(cx, remainderSize)); + if (!remainderObj) + return false; + RootedArrayBufferObject remainder(cx, &remainderObj->as()); + ArrayBufferObject::copyData(remainder, 0, buffer, end - remainderSize, remainderSize); + + // Step c: Perform ! ReadableByteStreamControllerEnqueueChunkToQueue(controller, + // remainder, 0, + // remainder.[[ByteLength]]). + // Note: `remainderSize` is equivalent to remainder.[[ByteLength]]. + if (!ReadableByteStreamControllerEnqueueChunkToQueue(cx, controller, remainder, 0, + remainderSize)) + { + return false; + } + } + + // Step 7: Set pullIntoDescriptor.[[buffer]] to + // ! TransferArrayBuffer(pullIntoDescriptor.[[buffer]]). + RootedArrayBufferObject transferredBuffer(cx, TransferArrayBuffer(cx, buffer)); + if (!transferredBuffer) + return false; + pullIntoDescriptor->setBuffer(transferredBuffer); + + // Step 8: Set pullIntoDescriptor.[[bytesFilled]] to pullIntoDescriptor.[[bytesFilled]] − + // remainderSize. + pullIntoDescriptor->setBytesFilled(bytesFilled - remainderSize); + + // Step 9: Perform ! ReadableByteStreamControllerCommitPullIntoDescriptor(controller.[[controlledReadableStream]], + // pullIntoDescriptor). + Rooted stream(cx, StreamFromController(controller)); + if (!ReadableByteStreamControllerCommitPullIntoDescriptor(cx, stream, pullIntoDescriptor)) + return false; + + // Step 10: Perform ! ReadableByteStreamControllerProcessPullIntoDescriptorsUsingQueue(controller). + return ReadableByteStreamControllerProcessPullIntoDescriptorsUsingQueue(cx, controller); +} + +// Streams spec, 3.12.21. ReadableByteStreamControllerRespondInternal ( controller, bytesWritten ) +static MOZ_MUST_USE bool +ReadableByteStreamControllerRespondInternal(JSContext* cx, + Handle controller, + double bytesWritten) +{ + // Step 1: Let firstDescriptor be the first element of controller.[[pendingPullIntos]]. + RootedValue val(cx, controller->getFixedSlot(ByteControllerSlot_PendingPullIntos)); + RootedNativeObject pendingPullIntos(cx, &val.toObject().as()); + Rooted firstDescriptor(cx); + firstDescriptor = PeekList(pendingPullIntos); + + // Step 2: Let stream be controller.[[controlledReadableStream]]. + Rooted stream(cx, StreamFromController(controller)); + + // Step 3: If stream.[[state]] is "closed", + if (stream->closed()) { + // Step a: If bytesWritten is not 0, throw a TypeError exception. + if (bytesWritten != 0) { + JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, + JSMSG_READABLESTREAMBYOBREQUEST_RESPOND_CLOSED); + return false; + } + + // Step b: Perform + // ! ReadableByteStreamControllerRespondInClosedState(controller, firstDescriptor). + return ReadableByteStreamControllerRespondInClosedState(cx, controller, firstDescriptor); + } + + // Step 4: Otherwise, + // Step a: Assert: stream.[[state]] is "readable". + MOZ_ASSERT(stream->readable()); + + // Step b: Perform ? ReadableByteStreamControllerRespondInReadableState(controller, + // bytesWritten, + // firstDescriptor). + return ReadableByteStreamControllerRespondInReadableState(cx, controller, bytesWritten, + firstDescriptor); +} + +// Streams spec, 3.12.22. ReadableByteStreamControllerRespondWithNewView ( controller, view ) +static MOZ_MUST_USE bool +ReadableByteStreamControllerRespondWithNewView(JSContext* cx, + Handle controller, + HandleObject view) +{ + // Step 1: Assert: controller.[[pendingPullIntos]] is not empty. + RootedValue val(cx, controller->getFixedSlot(ByteControllerSlot_PendingPullIntos)); + RootedNativeObject pendingPullIntos(cx, &val.toObject().as()); + MOZ_ASSERT(pendingPullIntos->getDenseInitializedLength() != 0); + + // Step 2: Let firstDescriptor be the first element of controller.[[pendingPullIntos]]. + Rooted firstDescriptor(cx); + firstDescriptor = PeekList(pendingPullIntos); + + // Step 3: If firstDescriptor.[[byteOffset]] + firstDescriptor.[[bytesFilled]] + // is not view.[[ByteOffset]], throw a RangeError exception. + uint32_t byteOffset = uint32_t(JS_GetArrayBufferViewByteOffset(view)); + if (firstDescriptor->byteOffset() + firstDescriptor->bytesFilled() != byteOffset) { + JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, + JSMSG_READABLEBYTESTREAMCONTROLLER_INVALID_VIEW_OFFSET); + return false; + } + + // Step 4: If firstDescriptor.[[byteLength]] is not view.[[ByteLength]], + // throw a RangeError exception. + uint32_t byteLength = JS_GetArrayBufferViewByteLength(view); + if (firstDescriptor->byteLength() != byteLength) { + JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, + JSMSG_READABLEBYTESTREAMCONTROLLER_INVALID_VIEW_SIZE); + return false; + } + + // Step 5: Set firstDescriptor.[[buffer]] to view.[[ViewedArrayBuffer]]. + bool dummy; + RootedArrayBufferObject buffer(cx, + &AsArrayBuffer(JS_GetArrayBufferViewBuffer(cx, view, &dummy))); + if (!buffer) + return false; + firstDescriptor->setBuffer(buffer); + + // Step 6: Perform ? ReadableByteStreamControllerRespondInternal(controller, + // view.[[ByteLength]]). + return ReadableByteStreamControllerRespondInternal(cx, controller, byteLength); +} + +// Streams spec, 3.12.23. ReadableByteStreamControllerShiftPendingPullInto ( controller ) +static MOZ_MUST_USE PullIntoDescriptor* +ReadableByteStreamControllerShiftPendingPullInto(JSContext* cx, HandleNativeObject controller) +{ + MOZ_ASSERT(controller->is()); + + // Step 1: Let descriptor be the first element of controller.[[pendingPullIntos]]. + // Step 2: Remove descriptor from controller.[[pendingPullIntos]], shifting + // all other elements downward (so that the second becomes the first, + // and so on). + RootedValue val(cx, controller->getFixedSlot(ByteControllerSlot_PendingPullIntos)); + RootedNativeObject pendingPullIntos(cx, &val.toObject().as()); + Rooted descriptor(cx); + descriptor = ShiftFromList(cx, pendingPullIntos); + MOZ_ASSERT(descriptor); + + // Step 3: Perform ! ReadableByteStreamControllerInvalidateBYOBRequest(controller). + ReadableByteStreamControllerInvalidateBYOBRequest(controller); + + // Step 4: Return descriptor. + return descriptor; +} + +// Streams spec, 3.12.24. ReadableByteStreamControllerShouldCallPull ( controller ) +// Unified with 3.9.3 above. + +// Streams spec, 6.1.2. new ByteLengthQueuingStrategy({ highWaterMark }) +bool +js::ByteLengthQueuingStrategy::constructor(JSContext* cx, unsigned argc, Value* vp) +{ + CallArgs args = CallArgsFromVp(argc, vp); + + RootedObject strategy(cx, NewBuiltinClassInstance(cx)); + if (!strategy) + return false; + + RootedObject argObj(cx, ToObject(cx, args.get(0))); + if (!argObj) + return false; + + RootedValue highWaterMark(cx); + if (!GetProperty(cx, argObj, argObj, cx->names().highWaterMark, &highWaterMark)) + return false; + + if (!SetProperty(cx, strategy, cx->names().highWaterMark, highWaterMark)) + return false; + + args.rval().setObject(*strategy); + return true; +} + +// Streams spec 6.1.3.1. size ( chunk ) +bool +ByteLengthQueuingStrategy_size(JSContext* cx, unsigned argc, Value* vp) +{ + CallArgs args = CallArgsFromVp(argc, vp); + + // Step 1: Return ? GetV(chunk, "byteLength"). + return GetProperty(cx, args.get(0), cx->names().byteLength, args.rval()); +} + +static const JSPropertySpec ByteLengthQueuingStrategy_properties[] = { + JS_PS_END +}; + +static const JSFunctionSpec ByteLengthQueuingStrategy_methods[] = { + JS_FN("size", ByteLengthQueuingStrategy_size, 1, 0), + JS_FS_END +}; + +CLASS_SPEC(ByteLengthQueuingStrategy, 1, 0, 0); + +// Streams spec, 6.2.2. new CountQueuingStrategy({ highWaterMark }) +bool +js::CountQueuingStrategy::constructor(JSContext* cx, unsigned argc, Value* vp) +{ + CallArgs args = CallArgsFromVp(argc, vp); + + Rooted strategy(cx, NewBuiltinClassInstance(cx)); + if (!strategy) + return false; + + RootedObject argObj(cx, ToObject(cx, args.get(0))); + if (!argObj) + return false; + + RootedValue highWaterMark(cx); + if (!GetProperty(cx, argObj, argObj, cx->names().highWaterMark, &highWaterMark)) + return false; + + if (!SetProperty(cx, strategy, cx->names().highWaterMark, highWaterMark)) + return false; + + args.rval().setObject(*strategy); + return true; +} + +// Streams spec 6.2.3.1. size ( chunk ) +bool +CountQueuingStrategy_size(JSContext* cx, unsigned argc, Value* vp) +{ + CallArgs args = CallArgsFromVp(argc, vp); + + // Step 1: Return 1. + args.rval().setInt32(1); + return true; +} + +static const JSPropertySpec CountQueuingStrategy_properties[] = { + JS_PS_END +}; + +static const JSFunctionSpec CountQueuingStrategy_methods[] = { + JS_FN("size", CountQueuingStrategy_size, 0, 0), + JS_FS_END +}; + +CLASS_SPEC(CountQueuingStrategy, 1, 0, 0); + +#undef CLASS_SPEC + +// Streams spec, 6.3.1. DequeueValue ( container ) nothrow +inline static MOZ_MUST_USE bool +DequeueValue(JSContext* cx, HandleNativeObject container, MutableHandleValue chunk) +{ + // Step 1: Assert: container has [[queue]] and [[queueTotalSize]] internal + // slots. + MOZ_ASSERT(IsReadableStreamController(container)); + + // Step 2: Assert: queue is not empty. + RootedValue val(cx, container->getFixedSlot(QueueContainerSlot_Queue)); + RootedNativeObject queue(cx, &val.toObject().as()); + MOZ_ASSERT(queue->getDenseInitializedLength() > 0); + + // Step 3. Let pair be the first element of queue. + // Step 4. Remove pair from queue, shifting all other elements downward + // (so that the second becomes the first, and so on). + Rooted pair(cx, ShiftFromList(cx, queue)); + MOZ_ASSERT(pair); + + // Step 5: Set container.[[queueTotalSize]] to + // container.[[queueTotalSize]] − pair.[[size]]. + // Step 6: If container.[[queueTotalSize]] < 0, set + // container.[[queueTotalSize]] to 0. + // (This can occur due to rounding errors.) + double totalSize = container->getFixedSlot(QueueContainerSlot_TotalSize).toNumber(); + + totalSize -= pair->size(); + if (totalSize < 0) + totalSize = 0; + container->setFixedSlot(QueueContainerSlot_TotalSize, NumberValue(totalSize)); + + // Step 7: Return pair.[[value]]. + chunk.set(pair->value()); + return true; +} + +// Streams spec, 6.3.2. EnqueueValueWithSize ( container, value, size ) throws +static MOZ_MUST_USE bool +EnqueueValueWithSize(JSContext* cx, HandleNativeObject container, HandleValue value, + HandleValue sizeVal) +{ + // Step 1: Assert: container has [[queue]] and [[queueTotalSize]] internal + // slots. + MOZ_ASSERT(IsReadableStreamController(container)); + + // Step 2: Let size be ? ToNumber(size). + double size; + if (!ToNumber(cx, sizeVal, &size)) + return false; + + // Step 3: If ! IsFiniteNonNegativeNumber(size) is false, throw a RangeError + // exception. + if (size < 0 || mozilla::IsNaN(size) || mozilla::IsInfinite(size)) { + JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, + JSMSG_NUMBER_MUST_BE_FINITE_NON_NEGATIVE, "size"); + return false; + } + + // Step 4: Append Record {[[value]]: value, [[size]]: size} as the last element + // of container.[[queue]]. + RootedValue val(cx, container->getFixedSlot(QueueContainerSlot_Queue)); + RootedNativeObject queue(cx, &val.toObject().as()); + + QueueEntry* entry = QueueEntry::create(cx, value, size); + if (!entry) + return false; + val = ObjectValue(*entry); + if (!AppendToList(cx, queue, val)) + return false; + + // Step 5: Set container.[[queueTotalSize]] to + // container.[[queueTotalSize]] + size. + double totalSize = container->getFixedSlot(QueueContainerSlot_TotalSize).toNumber(); + container->setFixedSlot(QueueContainerSlot_TotalSize, NumberValue(totalSize + size)); + + return true; +} + +// Streams spec, 6.3.3. PeekQueueValue ( container ) nothrow +// Used by WritableStream. +// static MOZ_MUST_USE Value +// PeekQueueValue(NativeObject* container) +// { +// // Step 1: Assert: container has [[queue]] and [[queueTotalSize]] internal +// // slots. +// MOZ_ASSERT(IsReadableStreamController(container)); + +// // Step 2: Assert: queue is not empty. +// Value val = container->getFixedSlot(QueueContainerSlot_Queue); +// NativeObject* queue = &val.toObject().as(); +// MOZ_ASSERT(queue->getDenseInitializedLength() > 0); + +// // Step 3: Let pair be the first element of container.[[queue]]. +// QueueEntry* pair = PeekList(queue); + +// // Step 4: Return pair.[[value]]. +// return pair->value(); +// } + +/** + * Streams spec, 6.3.4. ResetQueue ( container ) nothrow + */ +inline static MOZ_MUST_USE bool +ResetQueue(JSContext* cx, HandleNativeObject container) +{ + // Step 1: Assert: container has [[queue]] and [[queueTotalSize]] internal + // slots. + MOZ_ASSERT(IsReadableStreamController(container)); + + // Step 2: Set container.[[queue]] to a new empty List. + if (!SetNewList(cx, container, QueueContainerSlot_Queue)) + return false; + + // Step 3: Set container.[[queueTotalSize]] to 0. + container->setFixedSlot(QueueContainerSlot_TotalSize, NumberValue(0)); + + return true; +} + + +/** + * Streams spec, 6.4.1. InvokeOrNoop ( O, P, args ) + */ +inline static MOZ_MUST_USE bool +InvokeOrNoop(JSContext* cx, HandleValue O, HandlePropertyName P, HandleValue arg, + MutableHandleValue rval) +{ + // Step 1: Assert: P is a valid property key (omitted). + // Step 2: If args was not passed, let args be a new empty List (omitted). + // Step 3: Let method be ? GetV(O, P). + RootedValue method(cx); + if (!GetProperty(cx, O, P, &method)) + return false; + + // Step 4: If method is undefined, return. + if (method.isUndefined()) + return true; + + // Step 5: Return ? Call(method, O, args). + return Call(cx, method, O, arg, rval); +} + +/** + * Streams spec, 6.4.3. PromiseInvokeOrNoop ( O, P, args ) + * Specialized to one arg, because that's what all stream related callers use. + */ +static MOZ_MUST_USE JSObject* +PromiseInvokeOrNoop(JSContext* cx, HandleValue O, HandlePropertyName P, HandleValue arg) +{ + // Step 1: Assert: O is not undefined. + MOZ_ASSERT(!O.isUndefined()); + + // Step 2: Assert: ! IsPropertyKey(P) is true (implicit). + // Step 3: Assert: args is a List (omitted). + + // Step 4: Let returnValue be InvokeOrNoop(O, P, args). + // Step 5: If returnValue is an abrupt completion, return a promise + // rejected with returnValue.[[Value]]. + RootedValue returnValue(cx); + if (!InvokeOrNoop(cx, O, P, arg, &returnValue)) + return PromiseRejectedWithPendingError(cx); + + // Step 6: Otherwise, return a promise resolved with returnValue.[[Value]]. + return PromiseObject::unforgeableResolve(cx, returnValue); +} + +/** + * Streams spec, 6.4.4 TransferArrayBuffer ( O ) + */ +static MOZ_MUST_USE ArrayBufferObject* +TransferArrayBuffer(JSContext* cx, HandleObject buffer) +{ + // Step 1 (implicit). + + // Step 2. + MOZ_ASSERT(buffer->is()); + + // Step 3. + MOZ_ASSERT(!JS_IsDetachedArrayBufferObject(buffer)); + + // Step 5 (reordered). + uint32_t size = buffer->as().byteLength(); + + // Steps 4, 6. + void* contents = JS_StealArrayBufferContents(cx, buffer); + if (!contents) + return nullptr; + MOZ_ASSERT(JS_IsDetachedArrayBufferObject(buffer)); + + // Step 7. + RootedObject transferredBuffer(cx, JS_NewArrayBufferWithContents(cx, size, contents)); + if (!transferredBuffer) + return nullptr; + return &transferredBuffer->as(); +} + +// Streams spec, 6.4.5. ValidateAndNormalizeHighWaterMark ( highWaterMark ) +static MOZ_MUST_USE bool +ValidateAndNormalizeHighWaterMark(JSContext* cx, HandleValue highWaterMarkVal, double* highWaterMark) +{ + // Step 1: Set highWaterMark to ? ToNumber(highWaterMark). + if (!ToNumber(cx, highWaterMarkVal, highWaterMark)) + return false; + + // Step 2: If highWaterMark is NaN, throw a TypeError exception. + // Step 3: If highWaterMark < 0, throw a RangeError exception. + if (mozilla::IsNaN(*highWaterMark) || *highWaterMark < 0) { + JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_STREAM_INVALID_HIGHWATERMARK); + return false; + } + + // Step 4: Return highWaterMark. + return true; +} + +// Streams spec, 6.4.6. ValidateAndNormalizeQueuingStrategy ( size, highWaterMark ) +static MOZ_MUST_USE bool +ValidateAndNormalizeQueuingStrategy(JSContext* cx, HandleValue size, + HandleValue highWaterMarkVal, double* highWaterMark) +{ + // Step 1: If size is not undefined and ! IsCallable(size) is false, throw a + // TypeError exception. + if (!size.isUndefined() && !IsCallable(size)) { + JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_NOT_FUNCTION, + "ReadableStream argument options.size"); + return false; + } + + // Step 2: Let highWaterMark be ? ValidateAndNormalizeHighWaterMark(highWaterMark). + if (!ValidateAndNormalizeHighWaterMark(cx, highWaterMarkVal, highWaterMark)) + return false; + + // Step 3: Return Record {[[size]]: size, [[highWaterMark]]: highWaterMark}. + return true; +} diff --git a/js/src/builtin/Stream.h b/js/src/builtin/Stream.h new file mode 100644 index 000000000000..c8b6025d8f46 --- /dev/null +++ b/js/src/builtin/Stream.h @@ -0,0 +1,119 @@ +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- + * vim: set ts=8 sts=4 et sw=4 tw=99: + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#ifndef builtin_Stream_h +#define builtin_Stream_h + +#include "vm/NativeObject.h" + +namespace js { + +class AutoSetNewObjectMetadata; + +class ReadableStream : public NativeObject +{ + public: + static ReadableStream* createDefaultStream(JSContext* cx, HandleValue underlyingSource, + HandleValue size, HandleValue highWaterMark); + static ReadableStream* createByteStream(JSContext* cx, HandleValue underlyingSource, + HandleValue highWaterMark); + + inline bool readable() const; + inline bool closed() const; + inline bool errored() const; + inline bool disturbed() const; + + enum State { + Readable = 1 << 0, + Closed = 1 << 1, + Errored = 1 << 2, + Disturbed = 1 << 3 + }; + + private: + static ReadableStream* createStream(JSContext* cx); + + public: + static bool constructor(JSContext* cx, unsigned argc, Value* vp); + static const ClassSpec classSpec_; + static const Class class_; + static const ClassSpec protoClassSpec_; + static const Class protoClass_; +}; + +class ReadableStreamDefaultReader : public NativeObject +{ + public: + static bool constructor(JSContext* cx, unsigned argc, Value* vp); + static const ClassSpec classSpec_; + static const Class class_; + static const ClassSpec protoClassSpec_; + static const Class protoClass_; +}; + +class ReadableStreamBYOBReader : public NativeObject +{ + public: + static bool constructor(JSContext* cx, unsigned argc, Value* vp); + static const ClassSpec classSpec_; + static const Class class_; + static const ClassSpec protoClassSpec_; + static const Class protoClass_; +}; + +class ReadableStreamDefaultController : public NativeObject +{ + public: + static bool constructor(JSContext* cx, unsigned argc, Value* vp); + static const ClassSpec classSpec_; + static const Class class_; + static const ClassSpec protoClassSpec_; + static const Class protoClass_; +}; + +class ReadableByteStreamController : public NativeObject +{ + public: + static bool constructor(JSContext* cx, unsigned argc, Value* vp); + static const ClassSpec classSpec_; + static const Class class_; + static const ClassSpec protoClassSpec_; + static const Class protoClass_; +}; + +class ReadableStreamBYOBRequest : public NativeObject +{ + public: + static bool constructor(JSContext* cx, unsigned argc, Value* vp); + static const ClassSpec classSpec_; + static const Class class_; + static const ClassSpec protoClassSpec_; + static const Class protoClass_; +}; + +class ByteLengthQueuingStrategy : public NativeObject +{ + public: + static bool constructor(JSContext* cx, unsigned argc, Value* vp); + static const ClassSpec classSpec_; + static const Class class_; + static const ClassSpec protoClassSpec_; + static const Class protoClass_; +}; + +class CountQueuingStrategy : public NativeObject +{ + public: + static bool constructor(JSContext* cx, unsigned argc, Value* vp); + static const ClassSpec classSpec_; + static const Class class_; + static const ClassSpec protoClassSpec_; + static const Class protoClass_; +}; + +} // namespace js + +#endif /* builtin_Stream_h */ diff --git a/js/src/builtin/TestingFunctions.cpp b/js/src/builtin/TestingFunctions.cpp index 0b209a4bc3d1..06e9df80630f 100644 --- a/js/src/builtin/TestingFunctions.cpp +++ b/js/src/builtin/TestingFunctions.cpp @@ -1713,6 +1713,14 @@ RejectPromise(JSContext* cx, unsigned argc, Value* vp) return result; } +static bool +StreamsAreEnabled(JSContext* cx, unsigned argc, Value* vp) +{ + CallArgs args = CallArgsFromVp(argc, vp); + args.rval().setBoolean(cx->compartment()->creationOptions().getStreamsEnabled()); + return true; +} + static unsigned finalizeCount = 0; static void @@ -4523,6 +4531,10 @@ JS_FN_HELP("rejectPromise", RejectPromise, 2, 0, "rejectPromise(promise, reason)", " Reject a Promise by calling the JSAPI function JS::RejectPromise."), +JS_FN_HELP("streamsAreEnabled", StreamsAreEnabled, 0, 0, +"streamsAreEnabled()", +" Returns a boolean indicating whether WHATWG Streams are enabled for the current compartment."), + JS_FN_HELP("makeFinalizeObserver", MakeFinalizeObserver, 0, 0, "makeFinalizeObserver()", " Get a special object whose finalization increases the counter returned\n" diff --git a/js/src/js.msg b/js/src/js.msg index 76b4a0973e21..6317c4e4c69a 100644 --- a/js/src/js.msg +++ b/js/src/js.msg @@ -603,3 +603,30 @@ MSG_DEF(JSMSG_FOR_AWAIT_NOT_OF, 0, JSEXN_SYNTAXERR, "'for await' loop sho MSG_DEF(JSMSG_NOT_AN_ASYNC_GENERATOR, 0, JSEXN_TYPEERR, "Not an async generator") MSG_DEF(JSMSG_NOT_AN_ASYNC_ITERATOR, 0, JSEXN_TYPEERR, "Not an async from sync iterator") MSG_DEF(JSMSG_GET_ASYNC_ITER_RETURNED_PRIMITIVE, 0, JSEXN_TYPEERR, "[Symbol.asyncIterator]() returned a non-object value") + +// ReadableStream +MSG_DEF(JSMSG_READABLESTREAM_UNDERLYINGSOURCE_TYPE_WRONG,0, JSEXN_RANGEERR,"'underlyingSource.type' must be \"bytes\" or undefined.") +MSG_DEF(JSMSG_READABLESTREAM_INVALID_READER_MODE, 0, JSEXN_RANGEERR,"'mode' must be \"byob\" or undefined.") +MSG_DEF(JSMSG_NUMBER_MUST_BE_FINITE_NON_NEGATIVE, 1, JSEXN_RANGEERR, "'{0}' must be a finite, non-negative number.") +MSG_DEF(JSMSG_READABLEBYTESTREAMCONTROLLER_INVALID_BYTESWRITTEN, 0, JSEXN_RANGEERR, "'bytesWritten' exceeds remaining length.") +MSG_DEF(JSMSG_READABLEBYTESTREAMCONTROLLER_INVALID_VIEW_SIZE, 0, JSEXN_RANGEERR, "view size does not match requested data.") +MSG_DEF(JSMSG_READABLEBYTESTREAMCONTROLLER_INVALID_VIEW_OFFSET, 0, JSEXN_RANGEERR, "view offset does not match requested position.") +MSG_DEF(JSMSG_READABLESTREAM_NOT_LOCKED, 1, JSEXN_TYPEERR, "The ReadableStream method '{0}' may only be called on a locked stream.") +MSG_DEF(JSMSG_READABLESTREAM_LOCKED, 0, JSEXN_TYPEERR, "A Reader may only be created for an unlocked ReadableStream.") +MSG_DEF(JSMSG_READABLESTREAM_NOT_BYTE_STREAM_CONTROLLER, 0, JSEXN_TYPEERR, "ReadableStream.getReader('byob') requires a ReadableByteStreamController.") +MSG_DEF(JSMSG_READABLESTREAM_CONTROLLER_SET, 0, JSEXN_TYPEERR, "The ReadableStream already has a controller defined.") +MSG_DEF(JSMSG_READABLESTREAMREADER_NOT_OWNED, 1, JSEXN_TYPEERR, "The ReadableStream reader method '{0}' may only be called on a reader owned by a stream.") +MSG_DEF(JSMSG_READABLESTREAMREADER_NOT_EMPTY, 1, JSEXN_TYPEERR, "The ReadableStream reader method '{0}' may not be called on a reader with read requests.") +MSG_DEF(JSMSG_READABLESTREAMBYOBREADER_READ_EMPTY_VIEW, 0, JSEXN_TYPEERR, "ReadableStreamBYOBReader.read() was passed an empty TypedArrayBuffer view.") +MSG_DEF(JSMSG_READABLESTREAMREADER_RELEASED, 0, JSEXN_TYPEERR, "The ReadableStream reader was released.") +MSG_DEF(JSMSG_READABLESTREAMCONTROLLER_CLOSED, 1, JSEXN_TYPEERR, "The ReadableStream controller method '{0}' called on a stream already closing.") +MSG_DEF(JSMSG_READABLESTREAMCONTROLLER_NOT_READABLE, 1, JSEXN_TYPEERR, "The ReadableStream controller method '{0}' may only be called on a stream in the 'readable' state.") +MSG_DEF(JSMSG_READABLEBYTESTREAMCONTROLLER_BAD_CHUNKSIZE,0, JSEXN_RANGEERR, "ReadableByteStreamController requires a positive integer or undefined for 'autoAllocateChunkSize'.") +MSG_DEF(JSMSG_READABLEBYTESTREAMCONTROLLER_BAD_CHUNK, 0, JSEXN_TYPEERR, "ReadableByteStreamController passed a bad chunk.") +MSG_DEF(JSMSG_READABLEBYTESTREAMCONTROLLER_CLOSE_PENDING_PULL, 0, JSEXN_TYPEERR, "The ReadableByteStreamController cannot be closed while the buffer is being filled.") +MSG_DEF(JSMSG_READABLESTREAMBYOBREQUEST_NO_CONTROLLER, 1, JSEXN_TYPEERR, "ReadableStreamBYOBRequest method '{0}' called on a request with no controller.") +MSG_DEF(JSMSG_READABLESTREAMBYOBREQUEST_RESPOND_CLOSED, 0, JSEXN_TYPEERR, "ReadableStreamBYOBRequest method 'respond' called with non-zero number of bytes with a closed controller.") +MSG_DEF(JSMSG_READABLESTREAM_METHOD_NOT_IMPLEMENTED, 1, JSEXN_TYPEERR, "ReadableStream method {0} not yet implemented") + +// Other Stream-related +MSG_DEF(JSMSG_STREAM_INVALID_HIGHWATERMARK, 0, JSEXN_RANGEERR, "'highWaterMark' must be a non-negative, non-NaN number.") diff --git a/js/src/jsfriendapi.h b/js/src/jsfriendapi.h index db76bda34a21..7ef3f2f605c3 100644 --- a/js/src/jsfriendapi.h +++ b/js/src/jsfriendapi.h @@ -2107,6 +2107,12 @@ JS_IsArrayBufferViewObject(JSObject* obj); extern JS_FRIEND_API(uint32_t) JS_GetArrayBufferViewByteLength(JSObject* obj); +/** + * More generic name for JS_GetTypedArrayByteOffset to cover DataViews as well + */ +extern JS_FRIEND_API(uint32_t) +JS_GetArrayBufferViewByteOffset(JSObject* obj); + /* * Return a pointer to the start of the data referenced by a typed array. The * data is still owned by the typed array, and should not be modified on diff --git a/js/src/jsnum.cpp b/js/src/jsnum.cpp index 7dfb729e3de8..8d098df6422c 100644 --- a/js/src/jsnum.cpp +++ b/js/src/jsnum.cpp @@ -1118,6 +1118,12 @@ static const JSFunctionSpec number_methods[] = { JS_FS_END }; +bool +js::IsInteger(const Value& val) +{ + return val.isInt32() || + (mozilla::IsFinite(val.toDouble()) && JS::ToInteger(val.toDouble()) == val.toDouble()); +} static const JSFunctionSpec number_static_methods[] = { JS_SELF_HOSTED_FN("isFinite", "Number_isFinite", 1,0), diff --git a/js/src/jsnum.h b/js/src/jsnum.h index d88002e1fec6..77e23402586f 100644 --- a/js/src/jsnum.h +++ b/js/src/jsnum.h @@ -81,6 +81,10 @@ Int32ToString(JSContext* cx, int32_t i); extern JSAtom* Int32ToAtom(JSContext* cx, int32_t si); +// ES6 15.7.3.12 +extern bool +IsInteger(const Value& val); + /* * Convert an integer or double (contained in the given value) to a string and * append to the given buffer. diff --git a/js/src/jsprototypes.h b/js/src/jsprototypes.h index d7de8f781506..1325bc711e06 100644 --- a/js/src/jsprototypes.h +++ b/js/src/jsprototypes.h @@ -61,6 +61,12 @@ #define IF_SAB(real,imaginary) imaginary #endif +#ifdef ENABLE_STREAMS +#define IF_STREAMS(real,imaginary) real +#else +#define IF_STREAMS(real,imaginary) imaginary +#endif + #define JS_FOR_PROTOTYPES(real,imaginary) \ imaginary(Null, 0, InitNullClass, dummy) \ real(Object, 1, InitViaClassSpec, OCLASP(Plain)) \ @@ -112,12 +118,23 @@ IF_SIMD(real,imaginary)(SIMD, 45, InitSimdClass, OCLASP(Si real(TypedArray, 47, InitViaClassSpec, &js::TypedArrayObject::sharedTypedArrayPrototypeClass) \ IF_SAB(real,imaginary)(Atomics, 48, InitAtomicsClass, OCLASP(Atomics)) \ real(SavedFrame, 49, InitViaClassSpec, &js::SavedFrame::class_) \ - real(WebAssembly, 50, InitWebAssemblyClass, CLASP(WebAssembly)) \ - imaginary(WasmModule, 51, dummy, dummy) \ - imaginary(WasmInstance, 52, dummy, dummy) \ - imaginary(WasmMemory, 53, dummy, dummy) \ - imaginary(WasmTable, 54, dummy, dummy) \ - real(Promise, 55, InitViaClassSpec, OCLASP(Promise)) \ + real(Promise, 50, InitViaClassSpec, OCLASP(Promise)) \ + IF_STREAMS(real,imaginary) (ReadableStream, 51, InitViaClassSpec, &js::ReadableStream::class_) \ + IF_STREAMS(real,imaginary) (ReadableStreamDefaultReader, 52, InitViaClassSpec, &js::ReadableStreamDefaultReader::class_) \ + IF_STREAMS(real,imaginary) (ReadableStreamBYOBReader, 53, InitViaClassSpec, &js::ReadableStreamBYOBReader::class_) \ + IF_STREAMS(real,imaginary) (ReadableStreamDefaultController, 54, InitViaClassSpec, &js::ReadableStreamDefaultController::class_) \ + IF_STREAMS(real,imaginary) (ReadableByteStreamController, 55, InitViaClassSpec, &js::ReadableByteStreamController::class_) \ + IF_STREAMS(real,imaginary) (ReadableStreamBYOBRequest, 56, InitViaClassSpec, &js::ReadableStreamBYOBRequest::class_) \ + imaginary(WritableStream, 57, dummy, dummy) \ + imaginary(WritableStreamDefaultWriter, 58, dummy, dummy) \ + imaginary(WritableStreamDefaultController, 59, dummy, dummy) \ + real(ByteLengthQueuingStrategy, 60, InitViaClassSpec, &js::ByteLengthQueuingStrategy::class_) \ + real(CountQueuingStrategy, 61, InitViaClassSpec, &js::CountQueuingStrategy::class_) \ + real(WebAssembly, 62, InitWebAssemblyClass, CLASP(WebAssembly)) \ + imaginary(WasmModule, 63, dummy, dummy) \ + imaginary(WasmInstance, 64, dummy, dummy) \ + imaginary(WasmMemory, 65, dummy, dummy) \ + imaginary(WasmTable, 66, dummy, dummy) \ #define JS_FOR_EACH_PROTOTYPE(macro) JS_FOR_PROTOTYPES(macro,macro) diff --git a/js/src/moz.build b/js/src/moz.build index 2ce25dcbed5c..a910f4b5ccb4 100644 --- a/js/src/moz.build +++ b/js/src/moz.build @@ -157,6 +157,7 @@ UNIFIED_SOURCES += [ 'builtin/Reflect.cpp', 'builtin/ReflectParse.cpp', 'builtin/SIMD.cpp', + 'builtin/Stream.cpp', 'builtin/SymbolObject.cpp', 'builtin/TestingFunctions.cpp', 'builtin/TypedObject.cpp', diff --git a/js/src/vm/ArrayBufferObject.cpp b/js/src/vm/ArrayBufferObject.cpp index 22e45dc96b35..c510cf939599 100644 --- a/js/src/vm/ArrayBufferObject.cpp +++ b/js/src/vm/ArrayBufferObject.cpp @@ -1876,6 +1876,17 @@ JS_GetArrayBufferViewByteLength(JSObject* obj) : obj->as().byteLength(); } +JS_FRIEND_API(uint32_t) +JS_GetArrayBufferViewByteOffset(JSObject* obj) +{ + obj = CheckedUnwrap(obj); + if (!obj) + return 0; + return obj->is() + ? obj->as().byteOffset() + : obj->as().byteOffset(); +} + JS_FRIEND_API(JSObject*) JS_GetObjectAsArrayBufferView(JSObject* obj, uint32_t* length, bool* isSharedMemory, uint8_t** data) { diff --git a/js/src/vm/CommonPropertyNames.h b/js/src/vm/CommonPropertyNames.h index 6f96c2eeaa32..ac44d1739b77 100644 --- a/js/src/vm/CommonPropertyNames.h +++ b/js/src/vm/CommonPropertyNames.h @@ -36,6 +36,7 @@ macro(AsyncGeneratorFunction, AsyncGeneratorFunction, "AsyncGeneratorFunction") \ macro(AsyncWrapped, AsyncWrapped, "AsyncWrapped") \ macro(async, async, "async") \ + macro(autoAllocateChunkSize, autoAllocateChunkSize, "autoAllocateChunkSize") \ macro(await, await, "await") \ macro(Bool8x16, Bool8x16, "Bool8x16") \ macro(Bool16x8, Bool16x8, "Bool16x8") \ @@ -47,6 +48,7 @@ macro(buffer, buffer, "buffer") \ macro(builder, builder, "builder") \ macro(by, by, "by") \ + macro(byob, byob, "byob") \ macro(byteAlignment, byteAlignment, "byteAlignment") \ macro(byteLength, byteLength, "byteLength") \ macro(byteOffset, byteOffset, "byteOffset") \ @@ -57,6 +59,7 @@ macro(callee, callee, "callee") \ macro(caller, caller, "caller") \ macro(callFunction, callFunction, "callFunction") \ + macro(cancel, cancel, "cancel") \ macro(case, case_, "case") \ macro(caseFirst, caseFirst, "caseFirst") \ macro(catch, catch_, "catch") \ @@ -164,6 +167,7 @@ macro(has, has, "has") \ macro(hasOwn, hasOwn, "hasOwn") \ macro(hasOwnProperty, hasOwnProperty, "hasOwnProperty") \ + macro(highWaterMark, highWaterMark, "highWaterMark") \ macro(hour, hour, "hour") \ macro(if, if_, "if") \ macro(ignoreCase, ignoreCase, "ignoreCase") \ @@ -229,6 +233,7 @@ macro(minusSign, minusSign, "minusSign") \ macro(minute, minute, "minute") \ macro(missingArguments, missingArguments, "missingArguments") \ + macro(mode, mode, "mode") \ macro(module, module, "module") \ macro(Module, Module, "Module") \ macro(ModuleDeclarationInstantiation, ModuleDeclarationInstantiation, "ModuleDeclarationInstantiation") \ @@ -282,6 +287,7 @@ macro(percentSign, percentSign, "percentSign") \ macro(plusSign, plusSign, "plusSign") \ macro(public, public_, "public") \ + macro(pull, pull, "pull") \ macro(preventExtensions, preventExtensions, "preventExtensions") \ macro(private, private_, "private") \ macro(promise, promise, "promise") \ @@ -327,6 +333,7 @@ macro(StarGeneratorNext, StarGeneratorNext, "StarGeneratorNext") \ macro(StarGeneratorReturn, StarGeneratorReturn, "StarGeneratorReturn") \ macro(StarGeneratorThrow, StarGeneratorThrow, "StarGeneratorThrow") \ + macro(start, start, "start") \ macro(startTimestamp, startTimestamp, "startTimestamp") \ macro(state, state, "state") \ macro(static, static_, "static") \ diff --git a/js/src/vm/GlobalObject.cpp b/js/src/vm/GlobalObject.cpp index 9a9e12a3652d..d28265aa8bb1 100644 --- a/js/src/vm/GlobalObject.cpp +++ b/js/src/vm/GlobalObject.cpp @@ -27,6 +27,7 @@ #include "builtin/Promise.h" #include "builtin/RegExp.h" #include "builtin/SelfHostingDefines.h" +#include "builtin/Stream.h" #include "builtin/SymbolObject.h" #include "builtin/TypedObject.h" #include "builtin/WeakMapObject.h" @@ -100,18 +101,25 @@ GlobalObject::skipDeselectedConstructor(JSContext* cx, JSProtoKey key) if (key == JSProto_WebAssembly) return !wasm::HasSupport(cx); -#ifdef ENABLE_SHARED_ARRAY_BUFFER // Return true if the given constructor has been disabled at run-time. switch (key) { +#if defined(ENABLE_SHARED_ARRAY_BUFFER) case JSProto_Atomics: case JSProto_SharedArrayBuffer: return !cx->compartment()->creationOptions().getSharedMemoryAndAtomicsEnabled(); +#endif +#if defined(ENABLE_STREAMS) + case JSProto_ReadableStream: + case JSProto_ReadableStreamDefaultReader: + case JSProto_ReadableStreamBYOBReader: + case JSProto_ReadableStreamDefaultController: + case JSProto_ReadableByteStreamController: + case JSProto_ReadableStreamBYOBRequest: + return !cx->compartment()->creationOptions().getStreamsEnabled(); +#endif default: return false; } -#else - return false; -#endif } /* static */ bool diff --git a/js/src/vm/SelfHosting.cpp b/js/src/vm/SelfHosting.cpp index 406706326583..d7c0ce1ac404 100644 --- a/js/src/vm/SelfHosting.cpp +++ b/js/src/vm/SelfHosting.cpp @@ -33,6 +33,7 @@ #include "builtin/RegExp.h" #include "builtin/SelfHostingDefines.h" #include "builtin/SIMD.h" +#include "builtin/Stream.h" #include "builtin/TypedObject.h" #include "builtin/WeakSetObject.h" #include "gc/Marking.h" @@ -67,7 +68,6 @@ using JS::AutoCheckCannotGC; using mozilla::IsInRange; using mozilla::Maybe; using mozilla::PodMove; -using mozilla::Maybe; static void selfHosting_WarningReporter(JSContext* cx, JSErrorReport* report) @@ -2441,6 +2441,9 @@ static const JSFunctionSpec intrinsic_functions[] = { JS_FN("CallWeakSetMethodIfWrapped", CallNonGenericSelfhostedMethod>, 2, 0), + JS_FN("IsReadableStreamBYOBRequest", + intrinsic_IsInstanceOfBuiltin, 1, 0), + // See builtin/TypedObject.h for descriptors of the typedobj functions. JS_FN("NewOpaqueTypedObject", js::NewOpaqueTypedObject, 1, 0), JS_FN("NewDerivedTypedObject", js::NewDerivedTypedObject, 3, 0), diff --git a/testing/web-platform/meta/XMLHttpRequest/setrequestheader-content-type.htm.ini b/testing/web-platform/meta/XMLHttpRequest/setrequestheader-content-type.htm.ini index 361ad6eb5509..aa45e93b0848 100644 --- a/testing/web-platform/meta/XMLHttpRequest/setrequestheader-content-type.htm.ini +++ b/testing/web-platform/meta/XMLHttpRequest/setrequestheader-content-type.htm.ini @@ -1,8 +1,5 @@ [setrequestheader-content-type.htm] type: testharness - [ReadableStream request respects setRequestHeader("")] - expected: FAIL - [ReadableStream request with under type sends no Content-Type without setRequestHeader() call] expected: FAIL diff --git a/testing/web-platform/meta/css/CSS2/backgrounds/background-root-002.xht.ini b/testing/web-platform/meta/css/CSS2/backgrounds/background-root-002.xht.ini index 8368c3f89fc3..9f8fe66ffa5d 100644 --- a/testing/web-platform/meta/css/CSS2/backgrounds/background-root-002.xht.ini +++ b/testing/web-platform/meta/css/CSS2/backgrounds/background-root-002.xht.ini @@ -2,4 +2,4 @@ type: reftest expected: if os == "win": FAIL - if os == "linux": FAIL \ No newline at end of file + if os == "linux": FAIL diff --git a/testing/web-platform/meta/css/selectors4/focus-within-009.html.ini b/testing/web-platform/meta/css/selectors4/focus-within-009.html.ini deleted file mode 100644 index 5bb36234375c..000000000000 --- a/testing/web-platform/meta/css/selectors4/focus-within-009.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[focus-within-008.html] - type: reftest - disabled: https://bugzilla.mozilla.org/show_bug.cgi?id=1377588 diff --git a/testing/web-platform/meta/css/vendor-imports/mozilla/mozilla-central-reftests/images3/object-fit-cover-004e.html.ini b/testing/web-platform/meta/css/vendor-imports/mozilla/mozilla-central-reftests/images3/object-fit-cover-004e.html.ini deleted file mode 100644 index 367cd1815e3e..000000000000 --- a/testing/web-platform/meta/css/vendor-imports/mozilla/mozilla-central-reftests/images3/object-fit-cover-004e.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[object-fit-cover-svg-004e.html] - type: reftest - disabled: https://bugzilla.mozilla.org/show_bug.cgi?id=1381855 diff --git a/testing/web-platform/meta/css/vendor-imports/mozilla/mozilla-central-reftests/images3/object-fit-cover-004o.html.ini b/testing/web-platform/meta/css/vendor-imports/mozilla/mozilla-central-reftests/images3/object-fit-cover-004o.html.ini deleted file mode 100644 index 3ad84b6e3857..000000000000 --- a/testing/web-platform/meta/css/vendor-imports/mozilla/mozilla-central-reftests/images3/object-fit-cover-004o.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[object-fit-cover-svg-004o.html] - type: reftest - disabled: https://bugzilla.mozilla.org/show_bug.cgi?id=1381855 diff --git a/testing/web-platform/meta/cssom-view/elementFromPoint.html.ini b/testing/web-platform/meta/cssom-view/elementFromPoint.html.ini index d94842945f7d..2f8b7b920ec3 100644 --- a/testing/web-platform/meta/cssom-view/elementFromPoint.html.ini +++ b/testing/web-platform/meta/cssom-view/elementFromPoint.html.ini @@ -8,3 +8,4 @@ if (os == "win") and (version == "10.0.15063"): https://bugzilla.mozilla.org/show_bug.cgi?id=1383056 expected: if (os == "win") and (version == "10.0.15063"): FAIL + diff --git a/testing/web-platform/meta/cssom/serialize-namespaced-type-selectors.html.ini b/testing/web-platform/meta/cssom/serialize-namespaced-type-selectors.html.ini index f78ecd8b1bd5..06747fdc06a7 100644 --- a/testing/web-platform/meta/cssom/serialize-namespaced-type-selectors.html.ini +++ b/testing/web-platform/meta/cssom/serialize-namespaced-type-selectors.html.ini @@ -14,3 +14,4 @@ expected: if stylo: PASS FAIL + diff --git a/testing/web-platform/meta/fetch/api/response/response-consume.html.ini b/testing/web-platform/meta/fetch/api/response/response-consume.html.ini index caf4c271a237..0b67564af19a 100644 --- a/testing/web-platform/meta/fetch/api/response/response-consume.html.ini +++ b/testing/web-platform/meta/fetch/api/response/response-consume.html.ini @@ -33,12 +33,6 @@ [Consume response's body: from stream with correct multipart type to formData] expected: FAIL - [Consume response's body: from stream without correct multipart type to formData (error case)] - expected: FAIL - [Consume response's body: from stream with correct urlencoded type to formData] expected: FAIL - [Consume response's body: from stream without correct urlencoded type to formData (error case)] - expected: FAIL - diff --git a/testing/web-platform/meta/html/dom/reflection-embedded.html.ini b/testing/web-platform/meta/html/dom/reflection-embedded.html.ini index 1d41d1f635e2..33f99157b3b5 100644 --- a/testing/web-platform/meta/html/dom/reflection-embedded.html.ini +++ b/testing/web-platform/meta/html/dom/reflection-embedded.html.ini @@ -971,3 +971,4 @@ [iframe.allowUserMedia: IDL set to object "test-valueOf"] expected: FAIL + diff --git a/testing/web-platform/meta/page-visibility/idlharness.html.ini b/testing/web-platform/meta/page-visibility/idlharness.html.ini index 4661f17c03d1..5ec7d1b2419a 100644 --- a/testing/web-platform/meta/page-visibility/idlharness.html.ini +++ b/testing/web-platform/meta/page-visibility/idlharness.html.ini @@ -5,3 +5,4 @@ [Stringification of window.document] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/attr-referrer/cross-origin/http-http/img-tag/insecure-protocol.keep-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/attr-referrer/cross-origin/http-http/img-tag/insecure-protocol.keep-origin-redirect.http.html.ini index c5a1c77ae1cf..6ea4ff11522a 100644 --- a/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/attr-referrer/cross-origin/http-http/img-tag/insecure-protocol.keep-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/attr-referrer/cross-origin/http-http/img-tag/insecure-protocol.keep-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is stripped-referrer when a\n document served over http requires an http\n sub-resource via img-tag using the attr-referrer\n delivery method with keep-origin-redirect and when\n the target request is cross-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/attr-referrer/cross-origin/http-http/img-tag/insecure-protocol.no-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/attr-referrer/cross-origin/http-http/img-tag/insecure-protocol.no-redirect.http.html.ini index 18ba0a3bce10..6d4f4e1f18c0 100644 --- a/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/attr-referrer/cross-origin/http-http/img-tag/insecure-protocol.no-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/attr-referrer/cross-origin/http-http/img-tag/insecure-protocol.no-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is stripped-referrer when a\n document served over http requires an http\n sub-resource via img-tag using the attr-referrer\n delivery method with no-redirect and when\n the target request is cross-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/attr-referrer/cross-origin/http-http/img-tag/insecure-protocol.swap-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/attr-referrer/cross-origin/http-http/img-tag/insecure-protocol.swap-origin-redirect.http.html.ini index 1798261f72bf..150f220eded7 100644 --- a/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/attr-referrer/cross-origin/http-http/img-tag/insecure-protocol.swap-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/attr-referrer/cross-origin/http-http/img-tag/insecure-protocol.swap-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is stripped-referrer when a\n document served over http requires an http\n sub-resource via img-tag using the attr-referrer\n delivery method with swap-origin-redirect and when\n the target request is cross-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/attr-referrer/cross-origin/http-https/img-tag/upgrade-protocol.keep-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/attr-referrer/cross-origin/http-https/img-tag/upgrade-protocol.keep-origin-redirect.http.html.ini index 9d10ef16a090..c8aea32e550d 100644 --- a/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/attr-referrer/cross-origin/http-https/img-tag/upgrade-protocol.keep-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/attr-referrer/cross-origin/http-https/img-tag/upgrade-protocol.keep-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is stripped-referrer when a\n document served over http requires an https\n sub-resource via img-tag using the attr-referrer\n delivery method with keep-origin-redirect and when\n the target request is cross-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/attr-referrer/cross-origin/http-https/img-tag/upgrade-protocol.no-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/attr-referrer/cross-origin/http-https/img-tag/upgrade-protocol.no-redirect.http.html.ini index 1187b0d7aae9..ebd97202a3bf 100644 --- a/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/attr-referrer/cross-origin/http-https/img-tag/upgrade-protocol.no-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/attr-referrer/cross-origin/http-https/img-tag/upgrade-protocol.no-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is stripped-referrer when a\n document served over http requires an https\n sub-resource via img-tag using the attr-referrer\n delivery method with no-redirect and when\n the target request is cross-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/attr-referrer/cross-origin/http-https/img-tag/upgrade-protocol.swap-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/attr-referrer/cross-origin/http-https/img-tag/upgrade-protocol.swap-origin-redirect.http.html.ini index 7160d4b2c542..7adfff23cd20 100644 --- a/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/attr-referrer/cross-origin/http-https/img-tag/upgrade-protocol.swap-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/attr-referrer/cross-origin/http-https/img-tag/upgrade-protocol.swap-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is stripped-referrer when a\n document served over http requires an https\n sub-resource via img-tag using the attr-referrer\n delivery method with swap-origin-redirect and when\n the target request is cross-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/attr-referrer/same-origin/http-http/img-tag/insecure-protocol.keep-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/attr-referrer/same-origin/http-http/img-tag/insecure-protocol.keep-origin-redirect.http.html.ini index 145c5618e105..d78fd5ee5f1d 100644 --- a/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/attr-referrer/same-origin/http-http/img-tag/insecure-protocol.keep-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/attr-referrer/same-origin/http-http/img-tag/insecure-protocol.keep-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is stripped-referrer when a\n document served over http requires an http\n sub-resource via img-tag using the attr-referrer\n delivery method with keep-origin-redirect and when\n the target request is same-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/attr-referrer/same-origin/http-http/img-tag/insecure-protocol.no-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/attr-referrer/same-origin/http-http/img-tag/insecure-protocol.no-redirect.http.html.ini index 3e4adc23ed70..95901dc03c15 100644 --- a/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/attr-referrer/same-origin/http-http/img-tag/insecure-protocol.no-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/attr-referrer/same-origin/http-http/img-tag/insecure-protocol.no-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is stripped-referrer when a\n document served over http requires an http\n sub-resource via img-tag using the attr-referrer\n delivery method with no-redirect and when\n the target request is same-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/attr-referrer/same-origin/http-http/img-tag/insecure-protocol.swap-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/attr-referrer/same-origin/http-http/img-tag/insecure-protocol.swap-origin-redirect.http.html.ini index 7e35bac4d65b..e5377e887475 100644 --- a/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/attr-referrer/same-origin/http-http/img-tag/insecure-protocol.swap-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/attr-referrer/same-origin/http-http/img-tag/insecure-protocol.swap-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is stripped-referrer when a\n document served over http requires an http\n sub-resource via img-tag using the attr-referrer\n delivery method with swap-origin-redirect and when\n the target request is same-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/attr-referrer/same-origin/http-https/img-tag/upgrade-protocol.keep-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/attr-referrer/same-origin/http-https/img-tag/upgrade-protocol.keep-origin-redirect.http.html.ini index dd155968ba67..265fb69515c2 100644 --- a/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/attr-referrer/same-origin/http-https/img-tag/upgrade-protocol.keep-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/attr-referrer/same-origin/http-https/img-tag/upgrade-protocol.keep-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is stripped-referrer when a\n document served over http requires an https\n sub-resource via img-tag using the attr-referrer\n delivery method with keep-origin-redirect and when\n the target request is same-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/attr-referrer/same-origin/http-https/img-tag/upgrade-protocol.no-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/attr-referrer/same-origin/http-https/img-tag/upgrade-protocol.no-redirect.http.html.ini index a5aeba9643b0..7f7f0ac1d5d7 100644 --- a/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/attr-referrer/same-origin/http-https/img-tag/upgrade-protocol.no-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/attr-referrer/same-origin/http-https/img-tag/upgrade-protocol.no-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is stripped-referrer when a\n document served over http requires an https\n sub-resource via img-tag using the attr-referrer\n delivery method with no-redirect and when\n the target request is same-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/attr-referrer/same-origin/http-https/img-tag/upgrade-protocol.swap-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/attr-referrer/same-origin/http-https/img-tag/upgrade-protocol.swap-origin-redirect.http.html.ini index eb2e5c9cb288..42db87d83ddb 100644 --- a/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/attr-referrer/same-origin/http-https/img-tag/upgrade-protocol.swap-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/attr-referrer/same-origin/http-https/img-tag/upgrade-protocol.swap-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is stripped-referrer when a\n document served over http requires an https\n sub-resource via img-tag using the attr-referrer\n delivery method with swap-origin-redirect and when\n the target request is same-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/http-rp/cross-origin/http-http/img-tag/insecure-protocol.keep-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/http-rp/cross-origin/http-http/img-tag/insecure-protocol.keep-origin-redirect.http.html.ini index 998fba3bfc0a..40e60f600ce6 100644 --- a/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/http-rp/cross-origin/http-http/img-tag/insecure-protocol.keep-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/http-rp/cross-origin/http-http/img-tag/insecure-protocol.keep-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is stripped-referrer when a\n document served over http requires an http\n sub-resource via img-tag using the http-rp\n delivery method with keep-origin-redirect and when\n the target request is cross-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/http-rp/cross-origin/http-http/img-tag/insecure-protocol.no-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/http-rp/cross-origin/http-http/img-tag/insecure-protocol.no-redirect.http.html.ini index 2ef756bd5a9f..851b4ff35ac1 100644 --- a/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/http-rp/cross-origin/http-http/img-tag/insecure-protocol.no-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/http-rp/cross-origin/http-http/img-tag/insecure-protocol.no-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is stripped-referrer when a\n document served over http requires an http\n sub-resource via img-tag using the http-rp\n delivery method with no-redirect and when\n the target request is cross-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/http-rp/cross-origin/http-http/img-tag/insecure-protocol.swap-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/http-rp/cross-origin/http-http/img-tag/insecure-protocol.swap-origin-redirect.http.html.ini index 1db1e92c01fc..c33ff1eb8995 100644 --- a/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/http-rp/cross-origin/http-http/img-tag/insecure-protocol.swap-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/http-rp/cross-origin/http-http/img-tag/insecure-protocol.swap-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is stripped-referrer when a\n document served over http requires an http\n sub-resource via img-tag using the http-rp\n delivery method with swap-origin-redirect and when\n the target request is cross-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/http-rp/cross-origin/http-https/img-tag/upgrade-protocol.keep-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/http-rp/cross-origin/http-https/img-tag/upgrade-protocol.keep-origin-redirect.http.html.ini index 3914eef2d14d..212be4cae851 100644 --- a/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/http-rp/cross-origin/http-https/img-tag/upgrade-protocol.keep-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/http-rp/cross-origin/http-https/img-tag/upgrade-protocol.keep-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is stripped-referrer when a\n document served over http requires an https\n sub-resource via img-tag using the http-rp\n delivery method with keep-origin-redirect and when\n the target request is cross-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/http-rp/cross-origin/http-https/img-tag/upgrade-protocol.no-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/http-rp/cross-origin/http-https/img-tag/upgrade-protocol.no-redirect.http.html.ini index 88213c7781df..45bb6ee1f744 100644 --- a/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/http-rp/cross-origin/http-https/img-tag/upgrade-protocol.no-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/http-rp/cross-origin/http-https/img-tag/upgrade-protocol.no-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is stripped-referrer when a\n document served over http requires an https\n sub-resource via img-tag using the http-rp\n delivery method with no-redirect and when\n the target request is cross-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/http-rp/cross-origin/http-https/img-tag/upgrade-protocol.swap-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/http-rp/cross-origin/http-https/img-tag/upgrade-protocol.swap-origin-redirect.http.html.ini index 33eec1a1f2d3..15e3904cf6b7 100644 --- a/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/http-rp/cross-origin/http-https/img-tag/upgrade-protocol.swap-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/http-rp/cross-origin/http-https/img-tag/upgrade-protocol.swap-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is stripped-referrer when a\n document served over http requires an https\n sub-resource via img-tag using the http-rp\n delivery method with swap-origin-redirect and when\n the target request is cross-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/http-rp/same-origin/http-http/img-tag/insecure-protocol.keep-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/http-rp/same-origin/http-http/img-tag/insecure-protocol.keep-origin-redirect.http.html.ini index ec0f289496d7..5a8b17b252cb 100644 --- a/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/http-rp/same-origin/http-http/img-tag/insecure-protocol.keep-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/http-rp/same-origin/http-http/img-tag/insecure-protocol.keep-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is stripped-referrer when a\n document served over http requires an http\n sub-resource via img-tag using the http-rp\n delivery method with keep-origin-redirect and when\n the target request is same-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/http-rp/same-origin/http-http/img-tag/insecure-protocol.no-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/http-rp/same-origin/http-http/img-tag/insecure-protocol.no-redirect.http.html.ini index 2a5a890ec51a..6486c515a6b9 100644 --- a/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/http-rp/same-origin/http-http/img-tag/insecure-protocol.no-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/http-rp/same-origin/http-http/img-tag/insecure-protocol.no-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is stripped-referrer when a\n document served over http requires an http\n sub-resource via img-tag using the http-rp\n delivery method with no-redirect and when\n the target request is same-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/http-rp/same-origin/http-http/img-tag/insecure-protocol.swap-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/http-rp/same-origin/http-http/img-tag/insecure-protocol.swap-origin-redirect.http.html.ini index 8594edca775e..c19491b1b08a 100644 --- a/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/http-rp/same-origin/http-http/img-tag/insecure-protocol.swap-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/http-rp/same-origin/http-http/img-tag/insecure-protocol.swap-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is stripped-referrer when a\n document served over http requires an http\n sub-resource via img-tag using the http-rp\n delivery method with swap-origin-redirect and when\n the target request is same-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/http-rp/same-origin/http-https/img-tag/upgrade-protocol.keep-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/http-rp/same-origin/http-https/img-tag/upgrade-protocol.keep-origin-redirect.http.html.ini index f582c7300aa5..bd92b468a449 100644 --- a/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/http-rp/same-origin/http-https/img-tag/upgrade-protocol.keep-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/http-rp/same-origin/http-https/img-tag/upgrade-protocol.keep-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is stripped-referrer when a\n document served over http requires an https\n sub-resource via img-tag using the http-rp\n delivery method with keep-origin-redirect and when\n the target request is same-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/http-rp/same-origin/http-https/img-tag/upgrade-protocol.no-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/http-rp/same-origin/http-https/img-tag/upgrade-protocol.no-redirect.http.html.ini index 2e383e1cce38..cbe532b4e401 100644 --- a/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/http-rp/same-origin/http-https/img-tag/upgrade-protocol.no-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/http-rp/same-origin/http-https/img-tag/upgrade-protocol.no-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is stripped-referrer when a\n document served over http requires an https\n sub-resource via img-tag using the http-rp\n delivery method with no-redirect and when\n the target request is same-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/http-rp/same-origin/http-https/img-tag/upgrade-protocol.swap-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/http-rp/same-origin/http-https/img-tag/upgrade-protocol.swap-origin-redirect.http.html.ini index dfd1922de3f7..24f6c504e829 100644 --- a/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/http-rp/same-origin/http-https/img-tag/upgrade-protocol.swap-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/no-referrer-when-downgrade/http-rp/same-origin/http-https/img-tag/upgrade-protocol.swap-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is stripped-referrer when a\n document served over http requires an https\n sub-resource via img-tag using the http-rp\n delivery method with swap-origin-redirect and when\n the target request is same-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/no-referrer/attr-referrer/cross-origin/http-http/img-tag/generic.keep-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/no-referrer/attr-referrer/cross-origin/http-http/img-tag/generic.keep-origin-redirect.http.html.ini index eca60d3c3240..5dbdd5c1187d 100644 --- a/testing/web-platform/meta/referrer-policy/no-referrer/attr-referrer/cross-origin/http-http/img-tag/generic.keep-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/no-referrer/attr-referrer/cross-origin/http-http/img-tag/generic.keep-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is omitted when a\n document served over http requires an http\n sub-resource via img-tag using the attr-referrer\n delivery method with keep-origin-redirect and when\n the target request is cross-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/no-referrer/attr-referrer/cross-origin/http-http/img-tag/generic.no-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/no-referrer/attr-referrer/cross-origin/http-http/img-tag/generic.no-redirect.http.html.ini index 9fdda3340346..892e85718884 100644 --- a/testing/web-platform/meta/referrer-policy/no-referrer/attr-referrer/cross-origin/http-http/img-tag/generic.no-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/no-referrer/attr-referrer/cross-origin/http-http/img-tag/generic.no-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is omitted when a\n document served over http requires an http\n sub-resource via img-tag using the attr-referrer\n delivery method with no-redirect and when\n the target request is cross-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/no-referrer/attr-referrer/cross-origin/http-http/img-tag/generic.swap-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/no-referrer/attr-referrer/cross-origin/http-http/img-tag/generic.swap-origin-redirect.http.html.ini index 240526de6c0c..71b310cdc23d 100644 --- a/testing/web-platform/meta/referrer-policy/no-referrer/attr-referrer/cross-origin/http-http/img-tag/generic.swap-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/no-referrer/attr-referrer/cross-origin/http-http/img-tag/generic.swap-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is omitted when a\n document served over http requires an http\n sub-resource via img-tag using the attr-referrer\n delivery method with swap-origin-redirect and when\n the target request is cross-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/no-referrer/attr-referrer/cross-origin/http-https/img-tag/generic.keep-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/no-referrer/attr-referrer/cross-origin/http-https/img-tag/generic.keep-origin-redirect.http.html.ini index cefdcc457a3c..fabd557ed01c 100644 --- a/testing/web-platform/meta/referrer-policy/no-referrer/attr-referrer/cross-origin/http-https/img-tag/generic.keep-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/no-referrer/attr-referrer/cross-origin/http-https/img-tag/generic.keep-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is omitted when a\n document served over http requires an https\n sub-resource via img-tag using the attr-referrer\n delivery method with keep-origin-redirect and when\n the target request is cross-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/no-referrer/attr-referrer/cross-origin/http-https/img-tag/generic.no-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/no-referrer/attr-referrer/cross-origin/http-https/img-tag/generic.no-redirect.http.html.ini index 23b5d42ca7a5..aa76ea8568c0 100644 --- a/testing/web-platform/meta/referrer-policy/no-referrer/attr-referrer/cross-origin/http-https/img-tag/generic.no-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/no-referrer/attr-referrer/cross-origin/http-https/img-tag/generic.no-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is omitted when a\n document served over http requires an https\n sub-resource via img-tag using the attr-referrer\n delivery method with no-redirect and when\n the target request is cross-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/no-referrer/attr-referrer/cross-origin/http-https/img-tag/generic.swap-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/no-referrer/attr-referrer/cross-origin/http-https/img-tag/generic.swap-origin-redirect.http.html.ini index 9a4cbdafc6ff..9d16416c77d3 100644 --- a/testing/web-platform/meta/referrer-policy/no-referrer/attr-referrer/cross-origin/http-https/img-tag/generic.swap-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/no-referrer/attr-referrer/cross-origin/http-https/img-tag/generic.swap-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is omitted when a\n document served over http requires an https\n sub-resource via img-tag using the attr-referrer\n delivery method with swap-origin-redirect and when\n the target request is cross-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/no-referrer/attr-referrer/same-origin/http-http/img-tag/generic.keep-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/no-referrer/attr-referrer/same-origin/http-http/img-tag/generic.keep-origin-redirect.http.html.ini index 588495ce149b..04c7f5740f49 100644 --- a/testing/web-platform/meta/referrer-policy/no-referrer/attr-referrer/same-origin/http-http/img-tag/generic.keep-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/no-referrer/attr-referrer/same-origin/http-http/img-tag/generic.keep-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is omitted when a\n document served over http requires an http\n sub-resource via img-tag using the attr-referrer\n delivery method with keep-origin-redirect and when\n the target request is same-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/no-referrer/attr-referrer/same-origin/http-http/img-tag/generic.no-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/no-referrer/attr-referrer/same-origin/http-http/img-tag/generic.no-redirect.http.html.ini index f0b40806dec0..c44b9700eb3e 100644 --- a/testing/web-platform/meta/referrer-policy/no-referrer/attr-referrer/same-origin/http-http/img-tag/generic.no-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/no-referrer/attr-referrer/same-origin/http-http/img-tag/generic.no-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is omitted when a\n document served over http requires an http\n sub-resource via img-tag using the attr-referrer\n delivery method with no-redirect and when\n the target request is same-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/no-referrer/attr-referrer/same-origin/http-http/img-tag/generic.swap-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/no-referrer/attr-referrer/same-origin/http-http/img-tag/generic.swap-origin-redirect.http.html.ini index 13b38039a13b..37b1b0832fee 100644 --- a/testing/web-platform/meta/referrer-policy/no-referrer/attr-referrer/same-origin/http-http/img-tag/generic.swap-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/no-referrer/attr-referrer/same-origin/http-http/img-tag/generic.swap-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is omitted when a\n document served over http requires an http\n sub-resource via img-tag using the attr-referrer\n delivery method with swap-origin-redirect and when\n the target request is same-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/no-referrer/attr-referrer/same-origin/http-https/img-tag/generic.keep-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/no-referrer/attr-referrer/same-origin/http-https/img-tag/generic.keep-origin-redirect.http.html.ini index 1d56c39f4172..5c254faf1e79 100644 --- a/testing/web-platform/meta/referrer-policy/no-referrer/attr-referrer/same-origin/http-https/img-tag/generic.keep-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/no-referrer/attr-referrer/same-origin/http-https/img-tag/generic.keep-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is omitted when a\n document served over http requires an https\n sub-resource via img-tag using the attr-referrer\n delivery method with keep-origin-redirect and when\n the target request is same-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/no-referrer/attr-referrer/same-origin/http-https/img-tag/generic.no-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/no-referrer/attr-referrer/same-origin/http-https/img-tag/generic.no-redirect.http.html.ini index 4d98fe4dd06c..25cfb8ca033f 100644 --- a/testing/web-platform/meta/referrer-policy/no-referrer/attr-referrer/same-origin/http-https/img-tag/generic.no-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/no-referrer/attr-referrer/same-origin/http-https/img-tag/generic.no-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is omitted when a\n document served over http requires an https\n sub-resource via img-tag using the attr-referrer\n delivery method with no-redirect and when\n the target request is same-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/no-referrer/attr-referrer/same-origin/http-https/img-tag/generic.swap-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/no-referrer/attr-referrer/same-origin/http-https/img-tag/generic.swap-origin-redirect.http.html.ini index ea40680e962d..58ddd8c0bdd6 100644 --- a/testing/web-platform/meta/referrer-policy/no-referrer/attr-referrer/same-origin/http-https/img-tag/generic.swap-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/no-referrer/attr-referrer/same-origin/http-https/img-tag/generic.swap-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is omitted when a\n document served over http requires an https\n sub-resource via img-tag using the attr-referrer\n delivery method with swap-origin-redirect and when\n the target request is same-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/no-referrer/http-rp/cross-origin/http-http/img-tag/generic.keep-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/no-referrer/http-rp/cross-origin/http-http/img-tag/generic.keep-origin-redirect.http.html.ini index 74ce34119553..e12b3b3d03e4 100644 --- a/testing/web-platform/meta/referrer-policy/no-referrer/http-rp/cross-origin/http-http/img-tag/generic.keep-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/no-referrer/http-rp/cross-origin/http-http/img-tag/generic.keep-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is omitted when a\n document served over http requires an http\n sub-resource via img-tag using the http-rp\n delivery method with keep-origin-redirect and when\n the target request is cross-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/no-referrer/http-rp/cross-origin/http-http/img-tag/generic.no-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/no-referrer/http-rp/cross-origin/http-http/img-tag/generic.no-redirect.http.html.ini index a06777a95ae5..53f0dc35b118 100644 --- a/testing/web-platform/meta/referrer-policy/no-referrer/http-rp/cross-origin/http-http/img-tag/generic.no-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/no-referrer/http-rp/cross-origin/http-http/img-tag/generic.no-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is omitted when a\n document served over http requires an http\n sub-resource via img-tag using the http-rp\n delivery method with no-redirect and when\n the target request is cross-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/no-referrer/http-rp/cross-origin/http-http/img-tag/generic.swap-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/no-referrer/http-rp/cross-origin/http-http/img-tag/generic.swap-origin-redirect.http.html.ini index 1e09b400c83c..b2cfef3a509b 100644 --- a/testing/web-platform/meta/referrer-policy/no-referrer/http-rp/cross-origin/http-http/img-tag/generic.swap-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/no-referrer/http-rp/cross-origin/http-http/img-tag/generic.swap-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is omitted when a\n document served over http requires an http\n sub-resource via img-tag using the http-rp\n delivery method with swap-origin-redirect and when\n the target request is cross-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/no-referrer/http-rp/cross-origin/http-https/img-tag/generic.keep-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/no-referrer/http-rp/cross-origin/http-https/img-tag/generic.keep-origin-redirect.http.html.ini index 291fc6e52e94..975b037ccc26 100644 --- a/testing/web-platform/meta/referrer-policy/no-referrer/http-rp/cross-origin/http-https/img-tag/generic.keep-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/no-referrer/http-rp/cross-origin/http-https/img-tag/generic.keep-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is omitted when a\n document served over http requires an https\n sub-resource via img-tag using the http-rp\n delivery method with keep-origin-redirect and when\n the target request is cross-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/no-referrer/http-rp/cross-origin/http-https/img-tag/generic.no-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/no-referrer/http-rp/cross-origin/http-https/img-tag/generic.no-redirect.http.html.ini index 4d576a7ca7df..e37ceaa85532 100644 --- a/testing/web-platform/meta/referrer-policy/no-referrer/http-rp/cross-origin/http-https/img-tag/generic.no-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/no-referrer/http-rp/cross-origin/http-https/img-tag/generic.no-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is omitted when a\n document served over http requires an https\n sub-resource via img-tag using the http-rp\n delivery method with no-redirect and when\n the target request is cross-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/no-referrer/http-rp/cross-origin/http-https/img-tag/generic.swap-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/no-referrer/http-rp/cross-origin/http-https/img-tag/generic.swap-origin-redirect.http.html.ini index f246eb0bb864..729dca4533e6 100644 --- a/testing/web-platform/meta/referrer-policy/no-referrer/http-rp/cross-origin/http-https/img-tag/generic.swap-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/no-referrer/http-rp/cross-origin/http-https/img-tag/generic.swap-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is omitted when a\n document served over http requires an https\n sub-resource via img-tag using the http-rp\n delivery method with swap-origin-redirect and when\n the target request is cross-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/no-referrer/http-rp/same-origin/http-http/img-tag/generic.keep-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/no-referrer/http-rp/same-origin/http-http/img-tag/generic.keep-origin-redirect.http.html.ini index ffedccde5587..1a3204c747f5 100644 --- a/testing/web-platform/meta/referrer-policy/no-referrer/http-rp/same-origin/http-http/img-tag/generic.keep-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/no-referrer/http-rp/same-origin/http-http/img-tag/generic.keep-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is omitted when a\n document served over http requires an http\n sub-resource via img-tag using the http-rp\n delivery method with keep-origin-redirect and when\n the target request is same-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/no-referrer/http-rp/same-origin/http-http/img-tag/generic.no-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/no-referrer/http-rp/same-origin/http-http/img-tag/generic.no-redirect.http.html.ini index 0942e53f3598..fa8602727da2 100644 --- a/testing/web-platform/meta/referrer-policy/no-referrer/http-rp/same-origin/http-http/img-tag/generic.no-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/no-referrer/http-rp/same-origin/http-http/img-tag/generic.no-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is omitted when a\n document served over http requires an http\n sub-resource via img-tag using the http-rp\n delivery method with no-redirect and when\n the target request is same-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/no-referrer/http-rp/same-origin/http-http/img-tag/generic.swap-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/no-referrer/http-rp/same-origin/http-http/img-tag/generic.swap-origin-redirect.http.html.ini index 0c8120957194..27f180bd4567 100644 --- a/testing/web-platform/meta/referrer-policy/no-referrer/http-rp/same-origin/http-http/img-tag/generic.swap-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/no-referrer/http-rp/same-origin/http-http/img-tag/generic.swap-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is omitted when a\n document served over http requires an http\n sub-resource via img-tag using the http-rp\n delivery method with swap-origin-redirect and when\n the target request is same-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/no-referrer/http-rp/same-origin/http-https/img-tag/generic.keep-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/no-referrer/http-rp/same-origin/http-https/img-tag/generic.keep-origin-redirect.http.html.ini index 55f551a70131..1e89a3dfde1e 100644 --- a/testing/web-platform/meta/referrer-policy/no-referrer/http-rp/same-origin/http-https/img-tag/generic.keep-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/no-referrer/http-rp/same-origin/http-https/img-tag/generic.keep-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is omitted when a\n document served over http requires an https\n sub-resource via img-tag using the http-rp\n delivery method with keep-origin-redirect and when\n the target request is same-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/no-referrer/http-rp/same-origin/http-https/img-tag/generic.no-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/no-referrer/http-rp/same-origin/http-https/img-tag/generic.no-redirect.http.html.ini index a202abdf9dd8..a875fdaba485 100644 --- a/testing/web-platform/meta/referrer-policy/no-referrer/http-rp/same-origin/http-https/img-tag/generic.no-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/no-referrer/http-rp/same-origin/http-https/img-tag/generic.no-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is omitted when a\n document served over http requires an https\n sub-resource via img-tag using the http-rp\n delivery method with no-redirect and when\n the target request is same-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/no-referrer/http-rp/same-origin/http-https/img-tag/generic.swap-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/no-referrer/http-rp/same-origin/http-https/img-tag/generic.swap-origin-redirect.http.html.ini index 276bb1bc364b..64d6d7777c3b 100644 --- a/testing/web-platform/meta/referrer-policy/no-referrer/http-rp/same-origin/http-https/img-tag/generic.swap-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/no-referrer/http-rp/same-origin/http-https/img-tag/generic.swap-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is omitted when a\n document served over http requires an https\n sub-resource via img-tag using the http-rp\n delivery method with swap-origin-redirect and when\n the target request is same-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/attr-referrer/cross-origin/http-http/img-tag/cross-origin.keep-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/attr-referrer/cross-origin/http-http/img-tag/cross-origin.keep-origin-redirect.http.html.ini index 4a17a470f9cf..96f4661f9293 100644 --- a/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/attr-referrer/cross-origin/http-http/img-tag/cross-origin.keep-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/attr-referrer/cross-origin/http-http/img-tag/cross-origin.keep-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is origin when a\n document served over http requires an http\n sub-resource via img-tag using the attr-referrer\n delivery method with keep-origin-redirect and when\n the target request is cross-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/attr-referrer/cross-origin/http-http/img-tag/cross-origin.no-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/attr-referrer/cross-origin/http-http/img-tag/cross-origin.no-redirect.http.html.ini index a4bbef09074f..bd3353c7b31b 100644 --- a/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/attr-referrer/cross-origin/http-http/img-tag/cross-origin.no-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/attr-referrer/cross-origin/http-http/img-tag/cross-origin.no-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is origin when a\n document served over http requires an http\n sub-resource via img-tag using the attr-referrer\n delivery method with no-redirect and when\n the target request is cross-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/attr-referrer/cross-origin/http-http/img-tag/cross-origin.swap-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/attr-referrer/cross-origin/http-http/img-tag/cross-origin.swap-origin-redirect.http.html.ini index f3f1cf37d579..d3a5fcb77c38 100644 --- a/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/attr-referrer/cross-origin/http-http/img-tag/cross-origin.swap-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/attr-referrer/cross-origin/http-http/img-tag/cross-origin.swap-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is origin when a\n document served over http requires an http\n sub-resource via img-tag using the attr-referrer\n delivery method with swap-origin-redirect and when\n the target request is cross-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/attr-referrer/cross-origin/http-https/img-tag/cross-origin.keep-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/attr-referrer/cross-origin/http-https/img-tag/cross-origin.keep-origin-redirect.http.html.ini index 872f9c39d5db..e50a3cf7b026 100644 --- a/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/attr-referrer/cross-origin/http-https/img-tag/cross-origin.keep-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/attr-referrer/cross-origin/http-https/img-tag/cross-origin.keep-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is origin when a\n document served over http requires an https\n sub-resource via img-tag using the attr-referrer\n delivery method with keep-origin-redirect and when\n the target request is cross-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/attr-referrer/cross-origin/http-https/img-tag/cross-origin.no-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/attr-referrer/cross-origin/http-https/img-tag/cross-origin.no-redirect.http.html.ini index 61e974d5b410..22e6de5567a7 100644 --- a/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/attr-referrer/cross-origin/http-https/img-tag/cross-origin.no-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/attr-referrer/cross-origin/http-https/img-tag/cross-origin.no-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is origin when a\n document served over http requires an https\n sub-resource via img-tag using the attr-referrer\n delivery method with no-redirect and when\n the target request is cross-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/attr-referrer/cross-origin/http-https/img-tag/cross-origin.swap-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/attr-referrer/cross-origin/http-https/img-tag/cross-origin.swap-origin-redirect.http.html.ini index 9289197321a6..df11238c5d98 100644 --- a/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/attr-referrer/cross-origin/http-https/img-tag/cross-origin.swap-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/attr-referrer/cross-origin/http-https/img-tag/cross-origin.swap-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is origin when a\n document served over http requires an https\n sub-resource via img-tag using the attr-referrer\n delivery method with swap-origin-redirect and when\n the target request is cross-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/attr-referrer/same-origin/http-http/img-tag/same-origin-insecure.keep-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/attr-referrer/same-origin/http-http/img-tag/same-origin-insecure.keep-origin-redirect.http.html.ini index 08f2e942dbf4..7b43c5b2729e 100644 --- a/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/attr-referrer/same-origin/http-http/img-tag/same-origin-insecure.keep-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/attr-referrer/same-origin/http-http/img-tag/same-origin-insecure.keep-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is stripped-referrer when a\n document served over http requires an http\n sub-resource via img-tag using the attr-referrer\n delivery method with keep-origin-redirect and when\n the target request is same-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/attr-referrer/same-origin/http-http/img-tag/same-origin-insecure.no-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/attr-referrer/same-origin/http-http/img-tag/same-origin-insecure.no-redirect.http.html.ini index e228e6ffef23..c94849cfab8c 100644 --- a/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/attr-referrer/same-origin/http-http/img-tag/same-origin-insecure.no-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/attr-referrer/same-origin/http-http/img-tag/same-origin-insecure.no-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is stripped-referrer when a\n document served over http requires an http\n sub-resource via img-tag using the attr-referrer\n delivery method with no-redirect and when\n the target request is same-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/attr-referrer/same-origin/http-http/img-tag/same-origin-insecure.swap-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/attr-referrer/same-origin/http-http/img-tag/same-origin-insecure.swap-origin-redirect.http.html.ini index a263b7afae96..758d28a16e40 100644 --- a/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/attr-referrer/same-origin/http-http/img-tag/same-origin-insecure.swap-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/attr-referrer/same-origin/http-http/img-tag/same-origin-insecure.swap-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is origin when a\n document served over http requires an http\n sub-resource via img-tag using the attr-referrer\n delivery method with swap-origin-redirect and when\n the target request is same-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/attr-referrer/same-origin/http-https/img-tag/same-origin-downgrade.keep-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/attr-referrer/same-origin/http-https/img-tag/same-origin-downgrade.keep-origin-redirect.http.html.ini index ffce576e8a76..d6f4e664ca00 100644 --- a/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/attr-referrer/same-origin/http-https/img-tag/same-origin-downgrade.keep-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/attr-referrer/same-origin/http-https/img-tag/same-origin-downgrade.keep-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is origin when a\n document served over http requires an https\n sub-resource via img-tag using the attr-referrer\n delivery method with keep-origin-redirect and when\n the target request is same-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/attr-referrer/same-origin/http-https/img-tag/same-origin-downgrade.no-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/attr-referrer/same-origin/http-https/img-tag/same-origin-downgrade.no-redirect.http.html.ini index b9b46a1215ba..78a20f59a64d 100644 --- a/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/attr-referrer/same-origin/http-https/img-tag/same-origin-downgrade.no-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/attr-referrer/same-origin/http-https/img-tag/same-origin-downgrade.no-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is origin when a\n document served over http requires an https\n sub-resource via img-tag using the attr-referrer\n delivery method with no-redirect and when\n the target request is same-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/attr-referrer/same-origin/http-https/img-tag/same-origin-downgrade.swap-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/attr-referrer/same-origin/http-https/img-tag/same-origin-downgrade.swap-origin-redirect.http.html.ini index fcb5f7d98d1b..9c75e0b74f71 100644 --- a/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/attr-referrer/same-origin/http-https/img-tag/same-origin-downgrade.swap-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/attr-referrer/same-origin/http-https/img-tag/same-origin-downgrade.swap-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is origin when a\n document served over http requires an https\n sub-resource via img-tag using the attr-referrer\n delivery method with swap-origin-redirect and when\n the target request is same-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/attr-referrer/same-origin/http-https/img-tag/same-origin-insecure.swap-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/attr-referrer/same-origin/http-https/img-tag/same-origin-insecure.swap-origin-redirect.http.html.ini index d1f8178587b9..85da8a89b96e 100644 --- a/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/attr-referrer/same-origin/http-https/img-tag/same-origin-insecure.swap-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/attr-referrer/same-origin/http-https/img-tag/same-origin-insecure.swap-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is origin when a\n document served over http requires an https\n sub-resource via img-tag using the attr-referrer\n delivery method with swap-origin-redirect and when\n the target request is same-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/attr-referrer/same-origin/http-https/img-tag/same-origin-upgrade.keep-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/attr-referrer/same-origin/http-https/img-tag/same-origin-upgrade.keep-origin-redirect.http.html.ini index bcfb7d94d02a..4a4d16e01684 100644 --- a/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/attr-referrer/same-origin/http-https/img-tag/same-origin-upgrade.keep-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/attr-referrer/same-origin/http-https/img-tag/same-origin-upgrade.keep-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is origin when a\n document served over http requires an https\n sub-resource via img-tag using the attr-referrer\n delivery method with keep-origin-redirect and when\n the target request is same-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/attr-referrer/same-origin/http-https/img-tag/same-origin-upgrade.no-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/attr-referrer/same-origin/http-https/img-tag/same-origin-upgrade.no-redirect.http.html.ini index 20e9b3a7ce96..9e8e102a81ca 100644 --- a/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/attr-referrer/same-origin/http-https/img-tag/same-origin-upgrade.no-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/attr-referrer/same-origin/http-https/img-tag/same-origin-upgrade.no-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is origin when a\n document served over http requires an https\n sub-resource via img-tag using the attr-referrer\n delivery method with no-redirect and when\n the target request is same-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/attr-referrer/same-origin/http-https/img-tag/same-origin-upgrade.swap-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/attr-referrer/same-origin/http-https/img-tag/same-origin-upgrade.swap-origin-redirect.http.html.ini index 111cb630fc3c..17d9ef0bdcea 100644 --- a/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/attr-referrer/same-origin/http-https/img-tag/same-origin-upgrade.swap-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/attr-referrer/same-origin/http-https/img-tag/same-origin-upgrade.swap-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is origin when a\n document served over http requires an https\n sub-resource via img-tag using the attr-referrer\n delivery method with swap-origin-redirect and when\n the target request is same-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/http-rp/cross-origin/http-http/img-tag/cross-origin.keep-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/http-rp/cross-origin/http-http/img-tag/cross-origin.keep-origin-redirect.http.html.ini index d16a300583e3..08c6afa16eab 100644 --- a/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/http-rp/cross-origin/http-http/img-tag/cross-origin.keep-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/http-rp/cross-origin/http-http/img-tag/cross-origin.keep-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is origin when a\n document served over http requires an http\n sub-resource via img-tag using the http-rp\n delivery method with keep-origin-redirect and when\n the target request is cross-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/http-rp/cross-origin/http-http/img-tag/cross-origin.no-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/http-rp/cross-origin/http-http/img-tag/cross-origin.no-redirect.http.html.ini index 185b9ae111d6..044125f15b12 100644 --- a/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/http-rp/cross-origin/http-http/img-tag/cross-origin.no-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/http-rp/cross-origin/http-http/img-tag/cross-origin.no-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is origin when a\n document served over http requires an http\n sub-resource via img-tag using the http-rp\n delivery method with no-redirect and when\n the target request is cross-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/http-rp/cross-origin/http-http/img-tag/cross-origin.swap-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/http-rp/cross-origin/http-http/img-tag/cross-origin.swap-origin-redirect.http.html.ini index e0dcfcdd36b7..9a339da1100f 100644 --- a/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/http-rp/cross-origin/http-http/img-tag/cross-origin.swap-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/http-rp/cross-origin/http-http/img-tag/cross-origin.swap-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is origin when a\n document served over http requires an http\n sub-resource via img-tag using the http-rp\n delivery method with swap-origin-redirect and when\n the target request is cross-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/http-rp/cross-origin/http-https/img-tag/cross-origin.keep-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/http-rp/cross-origin/http-https/img-tag/cross-origin.keep-origin-redirect.http.html.ini index e992fbfe6e54..32251056244a 100644 --- a/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/http-rp/cross-origin/http-https/img-tag/cross-origin.keep-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/http-rp/cross-origin/http-https/img-tag/cross-origin.keep-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is origin when a\n document served over http requires an https\n sub-resource via img-tag using the http-rp\n delivery method with keep-origin-redirect and when\n the target request is cross-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/http-rp/cross-origin/http-https/img-tag/cross-origin.no-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/http-rp/cross-origin/http-https/img-tag/cross-origin.no-redirect.http.html.ini index a41f7853ba4a..c1150a59f1cd 100644 --- a/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/http-rp/cross-origin/http-https/img-tag/cross-origin.no-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/http-rp/cross-origin/http-https/img-tag/cross-origin.no-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is origin when a\n document served over http requires an https\n sub-resource via img-tag using the http-rp\n delivery method with no-redirect and when\n the target request is cross-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/http-rp/cross-origin/http-https/img-tag/cross-origin.swap-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/http-rp/cross-origin/http-https/img-tag/cross-origin.swap-origin-redirect.http.html.ini index 79650c1dd5e7..c0cba6b8c1fa 100644 --- a/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/http-rp/cross-origin/http-https/img-tag/cross-origin.swap-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/http-rp/cross-origin/http-https/img-tag/cross-origin.swap-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is origin when a\n document served over http requires an https\n sub-resource via img-tag using the http-rp\n delivery method with swap-origin-redirect and when\n the target request is cross-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/http-rp/same-origin/http-http/img-tag/same-origin-insecure.keep-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/http-rp/same-origin/http-http/img-tag/same-origin-insecure.keep-origin-redirect.http.html.ini index 5a3fff1b54cd..9779888b173d 100644 --- a/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/http-rp/same-origin/http-http/img-tag/same-origin-insecure.keep-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/http-rp/same-origin/http-http/img-tag/same-origin-insecure.keep-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is stripped-referrer when a\n document served over http requires an http\n sub-resource via img-tag using the http-rp\n delivery method with keep-origin-redirect and when\n the target request is same-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/http-rp/same-origin/http-http/img-tag/same-origin-insecure.no-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/http-rp/same-origin/http-http/img-tag/same-origin-insecure.no-redirect.http.html.ini index 717e568a1923..9be071f3b14c 100644 --- a/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/http-rp/same-origin/http-http/img-tag/same-origin-insecure.no-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/http-rp/same-origin/http-http/img-tag/same-origin-insecure.no-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is stripped-referrer when a\n document served over http requires an http\n sub-resource via img-tag using the http-rp\n delivery method with no-redirect and when\n the target request is same-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/http-rp/same-origin/http-http/img-tag/same-origin-insecure.swap-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/http-rp/same-origin/http-http/img-tag/same-origin-insecure.swap-origin-redirect.http.html.ini index dee1e0c8ee30..239e18b55e36 100644 --- a/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/http-rp/same-origin/http-http/img-tag/same-origin-insecure.swap-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/http-rp/same-origin/http-http/img-tag/same-origin-insecure.swap-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is origin when a\n document served over http requires an http\n sub-resource via img-tag using the http-rp\n delivery method with swap-origin-redirect and when\n the target request is same-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/http-rp/same-origin/http-https/img-tag/same-origin-downgrade.keep-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/http-rp/same-origin/http-https/img-tag/same-origin-downgrade.keep-origin-redirect.http.html.ini index 322a4656bab9..4ac816a653db 100644 --- a/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/http-rp/same-origin/http-https/img-tag/same-origin-downgrade.keep-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/http-rp/same-origin/http-https/img-tag/same-origin-downgrade.keep-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is origin when a\n document served over http requires an https\n sub-resource via img-tag using the http-rp\n delivery method with keep-origin-redirect and when\n the target request is same-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/http-rp/same-origin/http-https/img-tag/same-origin-downgrade.no-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/http-rp/same-origin/http-https/img-tag/same-origin-downgrade.no-redirect.http.html.ini index ead731ef243d..9cca69709f3e 100644 --- a/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/http-rp/same-origin/http-https/img-tag/same-origin-downgrade.no-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/http-rp/same-origin/http-https/img-tag/same-origin-downgrade.no-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is origin when a\n document served over http requires an https\n sub-resource via img-tag using the http-rp\n delivery method with no-redirect and when\n the target request is same-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/http-rp/same-origin/http-https/img-tag/same-origin-downgrade.swap-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/http-rp/same-origin/http-https/img-tag/same-origin-downgrade.swap-origin-redirect.http.html.ini index f4d511e0011d..83c08f811ecd 100644 --- a/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/http-rp/same-origin/http-https/img-tag/same-origin-downgrade.swap-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/http-rp/same-origin/http-https/img-tag/same-origin-downgrade.swap-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is origin when a\n document served over http requires an https\n sub-resource via img-tag using the http-rp\n delivery method with swap-origin-redirect and when\n the target request is same-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/http-rp/same-origin/http-https/img-tag/same-origin-insecure.swap-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/http-rp/same-origin/http-https/img-tag/same-origin-insecure.swap-origin-redirect.http.html.ini index 3780d64e87fc..2508ad4842ec 100644 --- a/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/http-rp/same-origin/http-https/img-tag/same-origin-insecure.swap-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/http-rp/same-origin/http-https/img-tag/same-origin-insecure.swap-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is origin when a\n document served over http requires an https\n sub-resource via img-tag using the http-rp\n delivery method with swap-origin-redirect and when\n the target request is same-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/http-rp/same-origin/http-https/img-tag/same-origin-upgrade.keep-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/http-rp/same-origin/http-https/img-tag/same-origin-upgrade.keep-origin-redirect.http.html.ini index 4ccbcec66a11..9e4831fe520f 100644 --- a/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/http-rp/same-origin/http-https/img-tag/same-origin-upgrade.keep-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/http-rp/same-origin/http-https/img-tag/same-origin-upgrade.keep-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is origin when a\n document served over http requires an https\n sub-resource via img-tag using the http-rp\n delivery method with keep-origin-redirect and when\n the target request is same-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/http-rp/same-origin/http-https/img-tag/same-origin-upgrade.no-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/http-rp/same-origin/http-https/img-tag/same-origin-upgrade.no-redirect.http.html.ini index 4dc988a48a52..b1c2f2ff2d74 100644 --- a/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/http-rp/same-origin/http-https/img-tag/same-origin-upgrade.no-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/http-rp/same-origin/http-https/img-tag/same-origin-upgrade.no-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is origin when a\n document served over http requires an https\n sub-resource via img-tag using the http-rp\n delivery method with no-redirect and when\n the target request is same-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/http-rp/same-origin/http-https/img-tag/same-origin-upgrade.swap-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/http-rp/same-origin/http-https/img-tag/same-origin-upgrade.swap-origin-redirect.http.html.ini index 58d5a881f750..92a1c4cf6bb1 100644 --- a/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/http-rp/same-origin/http-https/img-tag/same-origin-upgrade.swap-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/origin-when-cross-origin/http-rp/same-origin/http-https/img-tag/same-origin-upgrade.swap-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is origin when a\n document served over http requires an https\n sub-resource via img-tag using the http-rp\n delivery method with swap-origin-redirect and when\n the target request is same-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/origin/attr-referrer/cross-origin/http-http/img-tag/generic.keep-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/origin/attr-referrer/cross-origin/http-http/img-tag/generic.keep-origin-redirect.http.html.ini index 44b795fd7961..c0d33b8c2e40 100644 --- a/testing/web-platform/meta/referrer-policy/origin/attr-referrer/cross-origin/http-http/img-tag/generic.keep-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/origin/attr-referrer/cross-origin/http-http/img-tag/generic.keep-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is origin when a\n document served over http requires an http\n sub-resource via img-tag using the attr-referrer\n delivery method with keep-origin-redirect and when\n the target request is cross-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/origin/attr-referrer/cross-origin/http-http/img-tag/generic.no-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/origin/attr-referrer/cross-origin/http-http/img-tag/generic.no-redirect.http.html.ini index 1618d305ad7e..988913503463 100644 --- a/testing/web-platform/meta/referrer-policy/origin/attr-referrer/cross-origin/http-http/img-tag/generic.no-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/origin/attr-referrer/cross-origin/http-http/img-tag/generic.no-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is origin when a\n document served over http requires an http\n sub-resource via img-tag using the attr-referrer\n delivery method with no-redirect and when\n the target request is cross-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/origin/attr-referrer/cross-origin/http-http/img-tag/generic.swap-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/origin/attr-referrer/cross-origin/http-http/img-tag/generic.swap-origin-redirect.http.html.ini index 370f1fb2f76d..192638fb00ab 100644 --- a/testing/web-platform/meta/referrer-policy/origin/attr-referrer/cross-origin/http-http/img-tag/generic.swap-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/origin/attr-referrer/cross-origin/http-http/img-tag/generic.swap-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is origin when a\n document served over http requires an http\n sub-resource via img-tag using the attr-referrer\n delivery method with swap-origin-redirect and when\n the target request is cross-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/origin/attr-referrer/cross-origin/http-https/img-tag/generic.keep-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/origin/attr-referrer/cross-origin/http-https/img-tag/generic.keep-origin-redirect.http.html.ini index 47f9ba173350..970e4893ffb1 100644 --- a/testing/web-platform/meta/referrer-policy/origin/attr-referrer/cross-origin/http-https/img-tag/generic.keep-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/origin/attr-referrer/cross-origin/http-https/img-tag/generic.keep-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is origin when a\n document served over http requires an https\n sub-resource via img-tag using the attr-referrer\n delivery method with keep-origin-redirect and when\n the target request is cross-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/origin/attr-referrer/cross-origin/http-https/img-tag/generic.no-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/origin/attr-referrer/cross-origin/http-https/img-tag/generic.no-redirect.http.html.ini index 211323481d79..6fddb46a7017 100644 --- a/testing/web-platform/meta/referrer-policy/origin/attr-referrer/cross-origin/http-https/img-tag/generic.no-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/origin/attr-referrer/cross-origin/http-https/img-tag/generic.no-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is origin when a\n document served over http requires an https\n sub-resource via img-tag using the attr-referrer\n delivery method with no-redirect and when\n the target request is cross-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/origin/attr-referrer/cross-origin/http-https/img-tag/generic.swap-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/origin/attr-referrer/cross-origin/http-https/img-tag/generic.swap-origin-redirect.http.html.ini index 4de689bb9420..a1056e0d37cd 100644 --- a/testing/web-platform/meta/referrer-policy/origin/attr-referrer/cross-origin/http-https/img-tag/generic.swap-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/origin/attr-referrer/cross-origin/http-https/img-tag/generic.swap-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is origin when a\n document served over http requires an https\n sub-resource via img-tag using the attr-referrer\n delivery method with swap-origin-redirect and when\n the target request is cross-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/origin/attr-referrer/same-origin/http-http/img-tag/generic.keep-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/origin/attr-referrer/same-origin/http-http/img-tag/generic.keep-origin-redirect.http.html.ini index bc371816262e..b45d809e90ac 100644 --- a/testing/web-platform/meta/referrer-policy/origin/attr-referrer/same-origin/http-http/img-tag/generic.keep-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/origin/attr-referrer/same-origin/http-http/img-tag/generic.keep-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is origin when a\n document served over http requires an http\n sub-resource via img-tag using the attr-referrer\n delivery method with keep-origin-redirect and when\n the target request is same-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/origin/attr-referrer/same-origin/http-http/img-tag/generic.no-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/origin/attr-referrer/same-origin/http-http/img-tag/generic.no-redirect.http.html.ini index 4f54faa7fa3c..4404c0df21d5 100644 --- a/testing/web-platform/meta/referrer-policy/origin/attr-referrer/same-origin/http-http/img-tag/generic.no-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/origin/attr-referrer/same-origin/http-http/img-tag/generic.no-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is origin when a\n document served over http requires an http\n sub-resource via img-tag using the attr-referrer\n delivery method with no-redirect and when\n the target request is same-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/origin/attr-referrer/same-origin/http-http/img-tag/generic.swap-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/origin/attr-referrer/same-origin/http-http/img-tag/generic.swap-origin-redirect.http.html.ini index b4e8d00db372..eabc3db0c45b 100644 --- a/testing/web-platform/meta/referrer-policy/origin/attr-referrer/same-origin/http-http/img-tag/generic.swap-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/origin/attr-referrer/same-origin/http-http/img-tag/generic.swap-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is origin when a\n document served over http requires an http\n sub-resource via img-tag using the attr-referrer\n delivery method with swap-origin-redirect and when\n the target request is same-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/origin/attr-referrer/same-origin/http-https/img-tag/generic.keep-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/origin/attr-referrer/same-origin/http-https/img-tag/generic.keep-origin-redirect.http.html.ini index fda86935fa50..edbee2915347 100644 --- a/testing/web-platform/meta/referrer-policy/origin/attr-referrer/same-origin/http-https/img-tag/generic.keep-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/origin/attr-referrer/same-origin/http-https/img-tag/generic.keep-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is origin when a\n document served over http requires an https\n sub-resource via img-tag using the attr-referrer\n delivery method with keep-origin-redirect and when\n the target request is same-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/origin/attr-referrer/same-origin/http-https/img-tag/generic.no-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/origin/attr-referrer/same-origin/http-https/img-tag/generic.no-redirect.http.html.ini index ee48c36c2b94..6975280bbd21 100644 --- a/testing/web-platform/meta/referrer-policy/origin/attr-referrer/same-origin/http-https/img-tag/generic.no-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/origin/attr-referrer/same-origin/http-https/img-tag/generic.no-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is origin when a\n document served over http requires an https\n sub-resource via img-tag using the attr-referrer\n delivery method with no-redirect and when\n the target request is same-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/origin/attr-referrer/same-origin/http-https/img-tag/generic.swap-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/origin/attr-referrer/same-origin/http-https/img-tag/generic.swap-origin-redirect.http.html.ini index b1d2ebb59e2d..e28152c6005d 100644 --- a/testing/web-platform/meta/referrer-policy/origin/attr-referrer/same-origin/http-https/img-tag/generic.swap-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/origin/attr-referrer/same-origin/http-https/img-tag/generic.swap-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is origin when a\n document served over http requires an https\n sub-resource via img-tag using the attr-referrer\n delivery method with swap-origin-redirect and when\n the target request is same-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/origin/http-rp/cross-origin/http-http/img-tag/generic.keep-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/origin/http-rp/cross-origin/http-http/img-tag/generic.keep-origin-redirect.http.html.ini index 683fd35d0fb4..0e16faffd5bc 100644 --- a/testing/web-platform/meta/referrer-policy/origin/http-rp/cross-origin/http-http/img-tag/generic.keep-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/origin/http-rp/cross-origin/http-http/img-tag/generic.keep-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is origin when a\n document served over http requires an http\n sub-resource via img-tag using the http-rp\n delivery method with keep-origin-redirect and when\n the target request is cross-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/origin/http-rp/cross-origin/http-http/img-tag/generic.no-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/origin/http-rp/cross-origin/http-http/img-tag/generic.no-redirect.http.html.ini index 9a6ea2944d5d..795227ca223b 100644 --- a/testing/web-platform/meta/referrer-policy/origin/http-rp/cross-origin/http-http/img-tag/generic.no-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/origin/http-rp/cross-origin/http-http/img-tag/generic.no-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is origin when a\n document served over http requires an http\n sub-resource via img-tag using the http-rp\n delivery method with no-redirect and when\n the target request is cross-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/origin/http-rp/cross-origin/http-http/img-tag/generic.swap-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/origin/http-rp/cross-origin/http-http/img-tag/generic.swap-origin-redirect.http.html.ini index 2aaa1d7f3f63..ba1d0bab1cde 100644 --- a/testing/web-platform/meta/referrer-policy/origin/http-rp/cross-origin/http-http/img-tag/generic.swap-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/origin/http-rp/cross-origin/http-http/img-tag/generic.swap-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is origin when a\n document served over http requires an http\n sub-resource via img-tag using the http-rp\n delivery method with swap-origin-redirect and when\n the target request is cross-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/origin/http-rp/cross-origin/http-https/img-tag/generic.keep-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/origin/http-rp/cross-origin/http-https/img-tag/generic.keep-origin-redirect.http.html.ini index 24d5a6457c0b..2c03594d4b42 100644 --- a/testing/web-platform/meta/referrer-policy/origin/http-rp/cross-origin/http-https/img-tag/generic.keep-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/origin/http-rp/cross-origin/http-https/img-tag/generic.keep-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is origin when a\n document served over http requires an https\n sub-resource via img-tag using the http-rp\n delivery method with keep-origin-redirect and when\n the target request is cross-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/origin/http-rp/cross-origin/http-https/img-tag/generic.no-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/origin/http-rp/cross-origin/http-https/img-tag/generic.no-redirect.http.html.ini index 7dcce8484dad..7608e4668f3a 100644 --- a/testing/web-platform/meta/referrer-policy/origin/http-rp/cross-origin/http-https/img-tag/generic.no-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/origin/http-rp/cross-origin/http-https/img-tag/generic.no-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is origin when a\n document served over http requires an https\n sub-resource via img-tag using the http-rp\n delivery method with no-redirect and when\n the target request is cross-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/origin/http-rp/cross-origin/http-https/img-tag/generic.swap-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/origin/http-rp/cross-origin/http-https/img-tag/generic.swap-origin-redirect.http.html.ini index c72dd8e59465..ca3c69c8bb9c 100644 --- a/testing/web-platform/meta/referrer-policy/origin/http-rp/cross-origin/http-https/img-tag/generic.swap-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/origin/http-rp/cross-origin/http-https/img-tag/generic.swap-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is origin when a\n document served over http requires an https\n sub-resource via img-tag using the http-rp\n delivery method with swap-origin-redirect and when\n the target request is cross-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/origin/http-rp/same-origin/http-http/img-tag/generic.keep-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/origin/http-rp/same-origin/http-http/img-tag/generic.keep-origin-redirect.http.html.ini index e772d6ceb4c1..218a95656f66 100644 --- a/testing/web-platform/meta/referrer-policy/origin/http-rp/same-origin/http-http/img-tag/generic.keep-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/origin/http-rp/same-origin/http-http/img-tag/generic.keep-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is origin when a\n document served over http requires an http\n sub-resource via img-tag using the http-rp\n delivery method with keep-origin-redirect and when\n the target request is same-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/origin/http-rp/same-origin/http-http/img-tag/generic.no-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/origin/http-rp/same-origin/http-http/img-tag/generic.no-redirect.http.html.ini index 2377347a1a53..fb7be2a4f640 100644 --- a/testing/web-platform/meta/referrer-policy/origin/http-rp/same-origin/http-http/img-tag/generic.no-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/origin/http-rp/same-origin/http-http/img-tag/generic.no-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is origin when a\n document served over http requires an http\n sub-resource via img-tag using the http-rp\n delivery method with no-redirect and when\n the target request is same-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/origin/http-rp/same-origin/http-http/img-tag/generic.swap-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/origin/http-rp/same-origin/http-http/img-tag/generic.swap-origin-redirect.http.html.ini index 1a6ed59ad8af..bd6c0a3eeeb4 100644 --- a/testing/web-platform/meta/referrer-policy/origin/http-rp/same-origin/http-http/img-tag/generic.swap-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/origin/http-rp/same-origin/http-http/img-tag/generic.swap-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is origin when a\n document served over http requires an http\n sub-resource via img-tag using the http-rp\n delivery method with swap-origin-redirect and when\n the target request is same-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/origin/http-rp/same-origin/http-https/img-tag/generic.keep-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/origin/http-rp/same-origin/http-https/img-tag/generic.keep-origin-redirect.http.html.ini index a7e0a4f22afd..ae4827b0ed5b 100644 --- a/testing/web-platform/meta/referrer-policy/origin/http-rp/same-origin/http-https/img-tag/generic.keep-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/origin/http-rp/same-origin/http-https/img-tag/generic.keep-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is origin when a\n document served over http requires an https\n sub-resource via img-tag using the http-rp\n delivery method with keep-origin-redirect and when\n the target request is same-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/origin/http-rp/same-origin/http-https/img-tag/generic.no-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/origin/http-rp/same-origin/http-https/img-tag/generic.no-redirect.http.html.ini index ce1e6914605a..8958c292176c 100644 --- a/testing/web-platform/meta/referrer-policy/origin/http-rp/same-origin/http-https/img-tag/generic.no-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/origin/http-rp/same-origin/http-https/img-tag/generic.no-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is origin when a\n document served over http requires an https\n sub-resource via img-tag using the http-rp\n delivery method with no-redirect and when\n the target request is same-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/origin/http-rp/same-origin/http-https/img-tag/generic.swap-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/origin/http-rp/same-origin/http-https/img-tag/generic.swap-origin-redirect.http.html.ini index 3d0737090aa1..89e6d7dddcb4 100644 --- a/testing/web-platform/meta/referrer-policy/origin/http-rp/same-origin/http-https/img-tag/generic.swap-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/origin/http-rp/same-origin/http-https/img-tag/generic.swap-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is origin when a\n document served over http requires an https\n sub-resource via img-tag using the http-rp\n delivery method with swap-origin-redirect and when\n the target request is same-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/origin/meta-referrer/cross-origin/http-http/img-tag/generic.keep-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/origin/meta-referrer/cross-origin/http-http/img-tag/generic.keep-origin-redirect.http.html.ini index 866691f5f7f1..64927f9fd777 100644 --- a/testing/web-platform/meta/referrer-policy/origin/meta-referrer/cross-origin/http-http/img-tag/generic.keep-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/origin/meta-referrer/cross-origin/http-http/img-tag/generic.keep-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is origin when a\n document served over http requires an http\n sub-resource via img-tag using the meta-referrer\n delivery method with keep-origin-redirect and when\n the target request is cross-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/origin/meta-referrer/cross-origin/http-http/img-tag/generic.no-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/origin/meta-referrer/cross-origin/http-http/img-tag/generic.no-redirect.http.html.ini index 261301a6c6d7..f40fb7e4cc48 100644 --- a/testing/web-platform/meta/referrer-policy/origin/meta-referrer/cross-origin/http-http/img-tag/generic.no-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/origin/meta-referrer/cross-origin/http-http/img-tag/generic.no-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is origin when a\n document served over http requires an http\n sub-resource via img-tag using the meta-referrer\n delivery method with no-redirect and when\n the target request is cross-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/origin/meta-referrer/cross-origin/http-http/img-tag/generic.swap-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/origin/meta-referrer/cross-origin/http-http/img-tag/generic.swap-origin-redirect.http.html.ini index 1659a7f1f74a..a473d080d4c9 100644 --- a/testing/web-platform/meta/referrer-policy/origin/meta-referrer/cross-origin/http-http/img-tag/generic.swap-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/origin/meta-referrer/cross-origin/http-http/img-tag/generic.swap-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is origin when a\n document served over http requires an http\n sub-resource via img-tag using the meta-referrer\n delivery method with swap-origin-redirect and when\n the target request is cross-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/origin/meta-referrer/cross-origin/http-https/img-tag/generic.keep-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/origin/meta-referrer/cross-origin/http-https/img-tag/generic.keep-origin-redirect.http.html.ini index 74d828c0a262..4532531affce 100644 --- a/testing/web-platform/meta/referrer-policy/origin/meta-referrer/cross-origin/http-https/img-tag/generic.keep-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/origin/meta-referrer/cross-origin/http-https/img-tag/generic.keep-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is origin when a\n document served over http requires an https\n sub-resource via img-tag using the meta-referrer\n delivery method with keep-origin-redirect and when\n the target request is cross-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/origin/meta-referrer/cross-origin/http-https/img-tag/generic.no-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/origin/meta-referrer/cross-origin/http-https/img-tag/generic.no-redirect.http.html.ini index 4647be4918b1..770f7d04d113 100644 --- a/testing/web-platform/meta/referrer-policy/origin/meta-referrer/cross-origin/http-https/img-tag/generic.no-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/origin/meta-referrer/cross-origin/http-https/img-tag/generic.no-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is origin when a\n document served over http requires an https\n sub-resource via img-tag using the meta-referrer\n delivery method with no-redirect and when\n the target request is cross-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/origin/meta-referrer/cross-origin/http-https/img-tag/generic.swap-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/origin/meta-referrer/cross-origin/http-https/img-tag/generic.swap-origin-redirect.http.html.ini index ed0271a97699..629abb964f1e 100644 --- a/testing/web-platform/meta/referrer-policy/origin/meta-referrer/cross-origin/http-https/img-tag/generic.swap-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/origin/meta-referrer/cross-origin/http-https/img-tag/generic.swap-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is origin when a\n document served over http requires an https\n sub-resource via img-tag using the meta-referrer\n delivery method with swap-origin-redirect and when\n the target request is cross-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/origin/meta-referrer/same-origin/http-http/img-tag/generic.keep-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/origin/meta-referrer/same-origin/http-http/img-tag/generic.keep-origin-redirect.http.html.ini index 2c0794338e0c..bc1357bbd939 100644 --- a/testing/web-platform/meta/referrer-policy/origin/meta-referrer/same-origin/http-http/img-tag/generic.keep-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/origin/meta-referrer/same-origin/http-http/img-tag/generic.keep-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is origin when a\n document served over http requires an http\n sub-resource via img-tag using the meta-referrer\n delivery method with keep-origin-redirect and when\n the target request is same-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/origin/meta-referrer/same-origin/http-http/img-tag/generic.no-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/origin/meta-referrer/same-origin/http-http/img-tag/generic.no-redirect.http.html.ini index 51bde200a2f3..db7a14d2aa36 100644 --- a/testing/web-platform/meta/referrer-policy/origin/meta-referrer/same-origin/http-http/img-tag/generic.no-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/origin/meta-referrer/same-origin/http-http/img-tag/generic.no-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is origin when a\n document served over http requires an http\n sub-resource via img-tag using the meta-referrer\n delivery method with no-redirect and when\n the target request is same-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/origin/meta-referrer/same-origin/http-http/img-tag/generic.swap-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/origin/meta-referrer/same-origin/http-http/img-tag/generic.swap-origin-redirect.http.html.ini index b31b9dbbfbb7..2e87dbf0fbc4 100644 --- a/testing/web-platform/meta/referrer-policy/origin/meta-referrer/same-origin/http-http/img-tag/generic.swap-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/origin/meta-referrer/same-origin/http-http/img-tag/generic.swap-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is origin when a\n document served over http requires an http\n sub-resource via img-tag using the meta-referrer\n delivery method with swap-origin-redirect and when\n the target request is same-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/origin/meta-referrer/same-origin/http-https/img-tag/generic.keep-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/origin/meta-referrer/same-origin/http-https/img-tag/generic.keep-origin-redirect.http.html.ini index 9f3fd346924b..a7375348e6ef 100644 --- a/testing/web-platform/meta/referrer-policy/origin/meta-referrer/same-origin/http-https/img-tag/generic.keep-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/origin/meta-referrer/same-origin/http-https/img-tag/generic.keep-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is origin when a\n document served over http requires an https\n sub-resource via img-tag using the meta-referrer\n delivery method with keep-origin-redirect and when\n the target request is same-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/origin/meta-referrer/same-origin/http-https/img-tag/generic.no-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/origin/meta-referrer/same-origin/http-https/img-tag/generic.no-redirect.http.html.ini index 0e5490b77dca..0510cb7745b4 100644 --- a/testing/web-platform/meta/referrer-policy/origin/meta-referrer/same-origin/http-https/img-tag/generic.no-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/origin/meta-referrer/same-origin/http-https/img-tag/generic.no-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is origin when a\n document served over http requires an https\n sub-resource via img-tag using the meta-referrer\n delivery method with no-redirect and when\n the target request is same-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/origin/meta-referrer/same-origin/http-https/img-tag/generic.swap-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/origin/meta-referrer/same-origin/http-https/img-tag/generic.swap-origin-redirect.http.html.ini index df60093c7df4..232f63e7c944 100644 --- a/testing/web-platform/meta/referrer-policy/origin/meta-referrer/same-origin/http-https/img-tag/generic.swap-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/origin/meta-referrer/same-origin/http-https/img-tag/generic.swap-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is origin when a\n document served over http requires an https\n sub-resource via img-tag using the meta-referrer\n delivery method with swap-origin-redirect and when\n the target request is same-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/unsafe-url/attr-referrer/cross-origin/http-http/img-tag/generic.keep-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/unsafe-url/attr-referrer/cross-origin/http-http/img-tag/generic.keep-origin-redirect.http.html.ini index 1e3170069f55..a1cab64b9250 100644 --- a/testing/web-platform/meta/referrer-policy/unsafe-url/attr-referrer/cross-origin/http-http/img-tag/generic.keep-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/unsafe-url/attr-referrer/cross-origin/http-http/img-tag/generic.keep-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is stripped-referrer when a\n document served over http requires an http\n sub-resource via img-tag using the attr-referrer\n delivery method with keep-origin-redirect and when\n the target request is cross-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/unsafe-url/attr-referrer/cross-origin/http-http/img-tag/generic.no-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/unsafe-url/attr-referrer/cross-origin/http-http/img-tag/generic.no-redirect.http.html.ini index f33442b6cc7e..d3f2ff3a7541 100644 --- a/testing/web-platform/meta/referrer-policy/unsafe-url/attr-referrer/cross-origin/http-http/img-tag/generic.no-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/unsafe-url/attr-referrer/cross-origin/http-http/img-tag/generic.no-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is stripped-referrer when a\n document served over http requires an http\n sub-resource via img-tag using the attr-referrer\n delivery method with no-redirect and when\n the target request is cross-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/unsafe-url/attr-referrer/cross-origin/http-http/img-tag/generic.swap-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/unsafe-url/attr-referrer/cross-origin/http-http/img-tag/generic.swap-origin-redirect.http.html.ini index faf0621c515c..c4804d2624ee 100644 --- a/testing/web-platform/meta/referrer-policy/unsafe-url/attr-referrer/cross-origin/http-http/img-tag/generic.swap-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/unsafe-url/attr-referrer/cross-origin/http-http/img-tag/generic.swap-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is stripped-referrer when a\n document served over http requires an http\n sub-resource via img-tag using the attr-referrer\n delivery method with swap-origin-redirect and when\n the target request is cross-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/unsafe-url/attr-referrer/cross-origin/http-https/img-tag/generic.keep-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/unsafe-url/attr-referrer/cross-origin/http-https/img-tag/generic.keep-origin-redirect.http.html.ini index 0abbecb0ff3b..d27cf5d9456f 100644 --- a/testing/web-platform/meta/referrer-policy/unsafe-url/attr-referrer/cross-origin/http-https/img-tag/generic.keep-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/unsafe-url/attr-referrer/cross-origin/http-https/img-tag/generic.keep-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is stripped-referrer when a\n document served over http requires an https\n sub-resource via img-tag using the attr-referrer\n delivery method with keep-origin-redirect and when\n the target request is cross-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/unsafe-url/attr-referrer/cross-origin/http-https/img-tag/generic.no-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/unsafe-url/attr-referrer/cross-origin/http-https/img-tag/generic.no-redirect.http.html.ini index a50675c5c2a4..096d8761836e 100644 --- a/testing/web-platform/meta/referrer-policy/unsafe-url/attr-referrer/cross-origin/http-https/img-tag/generic.no-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/unsafe-url/attr-referrer/cross-origin/http-https/img-tag/generic.no-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is stripped-referrer when a\n document served over http requires an https\n sub-resource via img-tag using the attr-referrer\n delivery method with no-redirect and when\n the target request is cross-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/unsafe-url/attr-referrer/cross-origin/http-https/img-tag/generic.swap-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/unsafe-url/attr-referrer/cross-origin/http-https/img-tag/generic.swap-origin-redirect.http.html.ini index dc981bba34e2..b442d5bb660f 100644 --- a/testing/web-platform/meta/referrer-policy/unsafe-url/attr-referrer/cross-origin/http-https/img-tag/generic.swap-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/unsafe-url/attr-referrer/cross-origin/http-https/img-tag/generic.swap-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is stripped-referrer when a\n document served over http requires an https\n sub-resource via img-tag using the attr-referrer\n delivery method with swap-origin-redirect and when\n the target request is cross-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/unsafe-url/attr-referrer/same-origin/http-http/img-tag/generic.keep-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/unsafe-url/attr-referrer/same-origin/http-http/img-tag/generic.keep-origin-redirect.http.html.ini index 949628bff3a9..6a685a5655a7 100644 --- a/testing/web-platform/meta/referrer-policy/unsafe-url/attr-referrer/same-origin/http-http/img-tag/generic.keep-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/unsafe-url/attr-referrer/same-origin/http-http/img-tag/generic.keep-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is stripped-referrer when a\n document served over http requires an http\n sub-resource via img-tag using the attr-referrer\n delivery method with keep-origin-redirect and when\n the target request is same-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/unsafe-url/attr-referrer/same-origin/http-http/img-tag/generic.no-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/unsafe-url/attr-referrer/same-origin/http-http/img-tag/generic.no-redirect.http.html.ini index 04be65163211..3bffc5b49973 100644 --- a/testing/web-platform/meta/referrer-policy/unsafe-url/attr-referrer/same-origin/http-http/img-tag/generic.no-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/unsafe-url/attr-referrer/same-origin/http-http/img-tag/generic.no-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is stripped-referrer when a\n document served over http requires an http\n sub-resource via img-tag using the attr-referrer\n delivery method with no-redirect and when\n the target request is same-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/unsafe-url/attr-referrer/same-origin/http-http/img-tag/generic.swap-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/unsafe-url/attr-referrer/same-origin/http-http/img-tag/generic.swap-origin-redirect.http.html.ini index a55a9ba445f1..f714c73deee1 100644 --- a/testing/web-platform/meta/referrer-policy/unsafe-url/attr-referrer/same-origin/http-http/img-tag/generic.swap-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/unsafe-url/attr-referrer/same-origin/http-http/img-tag/generic.swap-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is stripped-referrer when a\n document served over http requires an http\n sub-resource via img-tag using the attr-referrer\n delivery method with swap-origin-redirect and when\n the target request is same-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/unsafe-url/attr-referrer/same-origin/http-https/img-tag/generic.keep-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/unsafe-url/attr-referrer/same-origin/http-https/img-tag/generic.keep-origin-redirect.http.html.ini index 5f68ba5fea24..7a11c1a8c6c0 100644 --- a/testing/web-platform/meta/referrer-policy/unsafe-url/attr-referrer/same-origin/http-https/img-tag/generic.keep-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/unsafe-url/attr-referrer/same-origin/http-https/img-tag/generic.keep-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is stripped-referrer when a\n document served over http requires an https\n sub-resource via img-tag using the attr-referrer\n delivery method with keep-origin-redirect and when\n the target request is same-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/unsafe-url/attr-referrer/same-origin/http-https/img-tag/generic.no-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/unsafe-url/attr-referrer/same-origin/http-https/img-tag/generic.no-redirect.http.html.ini index 8597a7e8b544..f4eb3574d917 100644 --- a/testing/web-platform/meta/referrer-policy/unsafe-url/attr-referrer/same-origin/http-https/img-tag/generic.no-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/unsafe-url/attr-referrer/same-origin/http-https/img-tag/generic.no-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is stripped-referrer when a\n document served over http requires an https\n sub-resource via img-tag using the attr-referrer\n delivery method with no-redirect and when\n the target request is same-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/unsafe-url/attr-referrer/same-origin/http-https/img-tag/generic.swap-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/unsafe-url/attr-referrer/same-origin/http-https/img-tag/generic.swap-origin-redirect.http.html.ini index 5b982bf3a5f5..ce09e9ee258d 100644 --- a/testing/web-platform/meta/referrer-policy/unsafe-url/attr-referrer/same-origin/http-https/img-tag/generic.swap-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/unsafe-url/attr-referrer/same-origin/http-https/img-tag/generic.swap-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is stripped-referrer when a\n document served over http requires an https\n sub-resource via img-tag using the attr-referrer\n delivery method with swap-origin-redirect and when\n the target request is same-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/unsafe-url/http-rp/cross-origin/http-http/img-tag/generic.keep-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/unsafe-url/http-rp/cross-origin/http-http/img-tag/generic.keep-origin-redirect.http.html.ini index f4833b81eca7..7ca3759719c9 100644 --- a/testing/web-platform/meta/referrer-policy/unsafe-url/http-rp/cross-origin/http-http/img-tag/generic.keep-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/unsafe-url/http-rp/cross-origin/http-http/img-tag/generic.keep-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is stripped-referrer when a\n document served over http requires an http\n sub-resource via img-tag using the http-rp\n delivery method with keep-origin-redirect and when\n the target request is cross-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/unsafe-url/http-rp/cross-origin/http-http/img-tag/generic.no-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/unsafe-url/http-rp/cross-origin/http-http/img-tag/generic.no-redirect.http.html.ini index af917ed95d90..59297e0da89d 100644 --- a/testing/web-platform/meta/referrer-policy/unsafe-url/http-rp/cross-origin/http-http/img-tag/generic.no-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/unsafe-url/http-rp/cross-origin/http-http/img-tag/generic.no-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is stripped-referrer when a\n document served over http requires an http\n sub-resource via img-tag using the http-rp\n delivery method with no-redirect and when\n the target request is cross-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/unsafe-url/http-rp/cross-origin/http-http/img-tag/generic.swap-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/unsafe-url/http-rp/cross-origin/http-http/img-tag/generic.swap-origin-redirect.http.html.ini index 0dfb71907032..97c10c7c5fca 100644 --- a/testing/web-platform/meta/referrer-policy/unsafe-url/http-rp/cross-origin/http-http/img-tag/generic.swap-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/unsafe-url/http-rp/cross-origin/http-http/img-tag/generic.swap-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is stripped-referrer when a\n document served over http requires an http\n sub-resource via img-tag using the http-rp\n delivery method with swap-origin-redirect and when\n the target request is cross-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/unsafe-url/http-rp/cross-origin/http-https/img-tag/generic.keep-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/unsafe-url/http-rp/cross-origin/http-https/img-tag/generic.keep-origin-redirect.http.html.ini index 50d9827474af..894fbb3af5fc 100644 --- a/testing/web-platform/meta/referrer-policy/unsafe-url/http-rp/cross-origin/http-https/img-tag/generic.keep-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/unsafe-url/http-rp/cross-origin/http-https/img-tag/generic.keep-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is stripped-referrer when a\n document served over http requires an https\n sub-resource via img-tag using the http-rp\n delivery method with keep-origin-redirect and when\n the target request is cross-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/unsafe-url/http-rp/cross-origin/http-https/img-tag/generic.no-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/unsafe-url/http-rp/cross-origin/http-https/img-tag/generic.no-redirect.http.html.ini index 1e2b1320fe09..40fa3e401100 100644 --- a/testing/web-platform/meta/referrer-policy/unsafe-url/http-rp/cross-origin/http-https/img-tag/generic.no-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/unsafe-url/http-rp/cross-origin/http-https/img-tag/generic.no-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is stripped-referrer when a\n document served over http requires an https\n sub-resource via img-tag using the http-rp\n delivery method with no-redirect and when\n the target request is cross-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/unsafe-url/http-rp/cross-origin/http-https/img-tag/generic.swap-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/unsafe-url/http-rp/cross-origin/http-https/img-tag/generic.swap-origin-redirect.http.html.ini index c88f740a2bb0..e133ca7ad3e5 100644 --- a/testing/web-platform/meta/referrer-policy/unsafe-url/http-rp/cross-origin/http-https/img-tag/generic.swap-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/unsafe-url/http-rp/cross-origin/http-https/img-tag/generic.swap-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is stripped-referrer when a\n document served over http requires an https\n sub-resource via img-tag using the http-rp\n delivery method with swap-origin-redirect and when\n the target request is cross-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/unsafe-url/http-rp/same-origin/http-http/img-tag/generic.keep-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/unsafe-url/http-rp/same-origin/http-http/img-tag/generic.keep-origin-redirect.http.html.ini index f044579e5155..1d208d1831ae 100644 --- a/testing/web-platform/meta/referrer-policy/unsafe-url/http-rp/same-origin/http-http/img-tag/generic.keep-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/unsafe-url/http-rp/same-origin/http-http/img-tag/generic.keep-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is stripped-referrer when a\n document served over http requires an http\n sub-resource via img-tag using the http-rp\n delivery method with keep-origin-redirect and when\n the target request is same-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/unsafe-url/http-rp/same-origin/http-http/img-tag/generic.no-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/unsafe-url/http-rp/same-origin/http-http/img-tag/generic.no-redirect.http.html.ini index 3037d1cec460..710f7724511a 100644 --- a/testing/web-platform/meta/referrer-policy/unsafe-url/http-rp/same-origin/http-http/img-tag/generic.no-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/unsafe-url/http-rp/same-origin/http-http/img-tag/generic.no-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is stripped-referrer when a\n document served over http requires an http\n sub-resource via img-tag using the http-rp\n delivery method with no-redirect and when\n the target request is same-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/unsafe-url/http-rp/same-origin/http-http/img-tag/generic.swap-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/unsafe-url/http-rp/same-origin/http-http/img-tag/generic.swap-origin-redirect.http.html.ini index b735fc1d634e..1e9067d1446e 100644 --- a/testing/web-platform/meta/referrer-policy/unsafe-url/http-rp/same-origin/http-http/img-tag/generic.swap-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/unsafe-url/http-rp/same-origin/http-http/img-tag/generic.swap-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is stripped-referrer when a\n document served over http requires an http\n sub-resource via img-tag using the http-rp\n delivery method with swap-origin-redirect and when\n the target request is same-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/unsafe-url/http-rp/same-origin/http-https/img-tag/generic.keep-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/unsafe-url/http-rp/same-origin/http-https/img-tag/generic.keep-origin-redirect.http.html.ini index 371f026ae521..1859deecaffe 100644 --- a/testing/web-platform/meta/referrer-policy/unsafe-url/http-rp/same-origin/http-https/img-tag/generic.keep-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/unsafe-url/http-rp/same-origin/http-https/img-tag/generic.keep-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is stripped-referrer when a\n document served over http requires an https\n sub-resource via img-tag using the http-rp\n delivery method with keep-origin-redirect and when\n the target request is same-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/unsafe-url/http-rp/same-origin/http-https/img-tag/generic.no-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/unsafe-url/http-rp/same-origin/http-https/img-tag/generic.no-redirect.http.html.ini index 9a08e867fa8f..d234aa7e6240 100644 --- a/testing/web-platform/meta/referrer-policy/unsafe-url/http-rp/same-origin/http-https/img-tag/generic.no-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/unsafe-url/http-rp/same-origin/http-https/img-tag/generic.no-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is stripped-referrer when a\n document served over http requires an https\n sub-resource via img-tag using the http-rp\n delivery method with no-redirect and when\n the target request is same-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/unsafe-url/http-rp/same-origin/http-https/img-tag/generic.swap-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/unsafe-url/http-rp/same-origin/http-https/img-tag/generic.swap-origin-redirect.http.html.ini index 23a4651183fe..bc35c52d3949 100644 --- a/testing/web-platform/meta/referrer-policy/unsafe-url/http-rp/same-origin/http-https/img-tag/generic.swap-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/unsafe-url/http-rp/same-origin/http-https/img-tag/generic.swap-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is stripped-referrer when a\n document served over http requires an https\n sub-resource via img-tag using the http-rp\n delivery method with swap-origin-redirect and when\n the target request is same-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/unset-referrer-policy/attr-referrer/cross-origin/http-http/img-tag/insecure-protocol.keep-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/unset-referrer-policy/attr-referrer/cross-origin/http-http/img-tag/insecure-protocol.keep-origin-redirect.http.html.ini index c5a1c77ae1cf..6ea4ff11522a 100644 --- a/testing/web-platform/meta/referrer-policy/unset-referrer-policy/attr-referrer/cross-origin/http-http/img-tag/insecure-protocol.keep-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/unset-referrer-policy/attr-referrer/cross-origin/http-http/img-tag/insecure-protocol.keep-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is stripped-referrer when a\n document served over http requires an http\n sub-resource via img-tag using the attr-referrer\n delivery method with keep-origin-redirect and when\n the target request is cross-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/unset-referrer-policy/attr-referrer/cross-origin/http-http/img-tag/insecure-protocol.no-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/unset-referrer-policy/attr-referrer/cross-origin/http-http/img-tag/insecure-protocol.no-redirect.http.html.ini index 18ba0a3bce10..6d4f4e1f18c0 100644 --- a/testing/web-platform/meta/referrer-policy/unset-referrer-policy/attr-referrer/cross-origin/http-http/img-tag/insecure-protocol.no-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/unset-referrer-policy/attr-referrer/cross-origin/http-http/img-tag/insecure-protocol.no-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is stripped-referrer when a\n document served over http requires an http\n sub-resource via img-tag using the attr-referrer\n delivery method with no-redirect and when\n the target request is cross-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/unset-referrer-policy/attr-referrer/cross-origin/http-http/img-tag/insecure-protocol.swap-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/unset-referrer-policy/attr-referrer/cross-origin/http-http/img-tag/insecure-protocol.swap-origin-redirect.http.html.ini index 1798261f72bf..150f220eded7 100644 --- a/testing/web-platform/meta/referrer-policy/unset-referrer-policy/attr-referrer/cross-origin/http-http/img-tag/insecure-protocol.swap-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/unset-referrer-policy/attr-referrer/cross-origin/http-http/img-tag/insecure-protocol.swap-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is stripped-referrer when a\n document served over http requires an http\n sub-resource via img-tag using the attr-referrer\n delivery method with swap-origin-redirect and when\n the target request is cross-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/unset-referrer-policy/attr-referrer/cross-origin/http-https/img-tag/upgrade-protocol.keep-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/unset-referrer-policy/attr-referrer/cross-origin/http-https/img-tag/upgrade-protocol.keep-origin-redirect.http.html.ini index 9d10ef16a090..c8aea32e550d 100644 --- a/testing/web-platform/meta/referrer-policy/unset-referrer-policy/attr-referrer/cross-origin/http-https/img-tag/upgrade-protocol.keep-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/unset-referrer-policy/attr-referrer/cross-origin/http-https/img-tag/upgrade-protocol.keep-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is stripped-referrer when a\n document served over http requires an https\n sub-resource via img-tag using the attr-referrer\n delivery method with keep-origin-redirect and when\n the target request is cross-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/unset-referrer-policy/attr-referrer/cross-origin/http-https/img-tag/upgrade-protocol.no-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/unset-referrer-policy/attr-referrer/cross-origin/http-https/img-tag/upgrade-protocol.no-redirect.http.html.ini index 1187b0d7aae9..ebd97202a3bf 100644 --- a/testing/web-platform/meta/referrer-policy/unset-referrer-policy/attr-referrer/cross-origin/http-https/img-tag/upgrade-protocol.no-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/unset-referrer-policy/attr-referrer/cross-origin/http-https/img-tag/upgrade-protocol.no-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is stripped-referrer when a\n document served over http requires an https\n sub-resource via img-tag using the attr-referrer\n delivery method with no-redirect and when\n the target request is cross-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/unset-referrer-policy/attr-referrer/cross-origin/http-https/img-tag/upgrade-protocol.swap-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/unset-referrer-policy/attr-referrer/cross-origin/http-https/img-tag/upgrade-protocol.swap-origin-redirect.http.html.ini index 7160d4b2c542..7adfff23cd20 100644 --- a/testing/web-platform/meta/referrer-policy/unset-referrer-policy/attr-referrer/cross-origin/http-https/img-tag/upgrade-protocol.swap-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/unset-referrer-policy/attr-referrer/cross-origin/http-https/img-tag/upgrade-protocol.swap-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is stripped-referrer when a\n document served over http requires an https\n sub-resource via img-tag using the attr-referrer\n delivery method with swap-origin-redirect and when\n the target request is cross-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/unset-referrer-policy/attr-referrer/same-origin/http-http/img-tag/insecure-protocol.keep-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/unset-referrer-policy/attr-referrer/same-origin/http-http/img-tag/insecure-protocol.keep-origin-redirect.http.html.ini index 145c5618e105..d78fd5ee5f1d 100644 --- a/testing/web-platform/meta/referrer-policy/unset-referrer-policy/attr-referrer/same-origin/http-http/img-tag/insecure-protocol.keep-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/unset-referrer-policy/attr-referrer/same-origin/http-http/img-tag/insecure-protocol.keep-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is stripped-referrer when a\n document served over http requires an http\n sub-resource via img-tag using the attr-referrer\n delivery method with keep-origin-redirect and when\n the target request is same-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/unset-referrer-policy/attr-referrer/same-origin/http-http/img-tag/insecure-protocol.no-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/unset-referrer-policy/attr-referrer/same-origin/http-http/img-tag/insecure-protocol.no-redirect.http.html.ini index 3e4adc23ed70..95901dc03c15 100644 --- a/testing/web-platform/meta/referrer-policy/unset-referrer-policy/attr-referrer/same-origin/http-http/img-tag/insecure-protocol.no-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/unset-referrer-policy/attr-referrer/same-origin/http-http/img-tag/insecure-protocol.no-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is stripped-referrer when a\n document served over http requires an http\n sub-resource via img-tag using the attr-referrer\n delivery method with no-redirect and when\n the target request is same-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/unset-referrer-policy/attr-referrer/same-origin/http-http/img-tag/insecure-protocol.swap-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/unset-referrer-policy/attr-referrer/same-origin/http-http/img-tag/insecure-protocol.swap-origin-redirect.http.html.ini index 7e35bac4d65b..e5377e887475 100644 --- a/testing/web-platform/meta/referrer-policy/unset-referrer-policy/attr-referrer/same-origin/http-http/img-tag/insecure-protocol.swap-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/unset-referrer-policy/attr-referrer/same-origin/http-http/img-tag/insecure-protocol.swap-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is stripped-referrer when a\n document served over http requires an http\n sub-resource via img-tag using the attr-referrer\n delivery method with swap-origin-redirect and when\n the target request is same-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/unset-referrer-policy/attr-referrer/same-origin/http-https/img-tag/upgrade-protocol.keep-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/unset-referrer-policy/attr-referrer/same-origin/http-https/img-tag/upgrade-protocol.keep-origin-redirect.http.html.ini index dd155968ba67..265fb69515c2 100644 --- a/testing/web-platform/meta/referrer-policy/unset-referrer-policy/attr-referrer/same-origin/http-https/img-tag/upgrade-protocol.keep-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/unset-referrer-policy/attr-referrer/same-origin/http-https/img-tag/upgrade-protocol.keep-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is stripped-referrer when a\n document served over http requires an https\n sub-resource via img-tag using the attr-referrer\n delivery method with keep-origin-redirect and when\n the target request is same-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/unset-referrer-policy/attr-referrer/same-origin/http-https/img-tag/upgrade-protocol.no-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/unset-referrer-policy/attr-referrer/same-origin/http-https/img-tag/upgrade-protocol.no-redirect.http.html.ini index a5aeba9643b0..7f7f0ac1d5d7 100644 --- a/testing/web-platform/meta/referrer-policy/unset-referrer-policy/attr-referrer/same-origin/http-https/img-tag/upgrade-protocol.no-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/unset-referrer-policy/attr-referrer/same-origin/http-https/img-tag/upgrade-protocol.no-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is stripped-referrer when a\n document served over http requires an https\n sub-resource via img-tag using the attr-referrer\n delivery method with no-redirect and when\n the target request is same-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/unset-referrer-policy/attr-referrer/same-origin/http-https/img-tag/upgrade-protocol.swap-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/unset-referrer-policy/attr-referrer/same-origin/http-https/img-tag/upgrade-protocol.swap-origin-redirect.http.html.ini index eb2e5c9cb288..42db87d83ddb 100644 --- a/testing/web-platform/meta/referrer-policy/unset-referrer-policy/attr-referrer/same-origin/http-https/img-tag/upgrade-protocol.swap-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/unset-referrer-policy/attr-referrer/same-origin/http-https/img-tag/upgrade-protocol.swap-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is stripped-referrer when a\n document served over http requires an https\n sub-resource via img-tag using the attr-referrer\n delivery method with swap-origin-redirect and when\n the target request is same-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/unset-referrer-policy/http-rp/cross-origin/http-http/img-tag/insecure-protocol.keep-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/unset-referrer-policy/http-rp/cross-origin/http-http/img-tag/insecure-protocol.keep-origin-redirect.http.html.ini index 998fba3bfc0a..40e60f600ce6 100644 --- a/testing/web-platform/meta/referrer-policy/unset-referrer-policy/http-rp/cross-origin/http-http/img-tag/insecure-protocol.keep-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/unset-referrer-policy/http-rp/cross-origin/http-http/img-tag/insecure-protocol.keep-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is stripped-referrer when a\n document served over http requires an http\n sub-resource via img-tag using the http-rp\n delivery method with keep-origin-redirect and when\n the target request is cross-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/unset-referrer-policy/http-rp/cross-origin/http-http/img-tag/insecure-protocol.no-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/unset-referrer-policy/http-rp/cross-origin/http-http/img-tag/insecure-protocol.no-redirect.http.html.ini index 2ef756bd5a9f..851b4ff35ac1 100644 --- a/testing/web-platform/meta/referrer-policy/unset-referrer-policy/http-rp/cross-origin/http-http/img-tag/insecure-protocol.no-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/unset-referrer-policy/http-rp/cross-origin/http-http/img-tag/insecure-protocol.no-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is stripped-referrer when a\n document served over http requires an http\n sub-resource via img-tag using the http-rp\n delivery method with no-redirect and when\n the target request is cross-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/unset-referrer-policy/http-rp/cross-origin/http-http/img-tag/insecure-protocol.swap-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/unset-referrer-policy/http-rp/cross-origin/http-http/img-tag/insecure-protocol.swap-origin-redirect.http.html.ini index 1db1e92c01fc..c33ff1eb8995 100644 --- a/testing/web-platform/meta/referrer-policy/unset-referrer-policy/http-rp/cross-origin/http-http/img-tag/insecure-protocol.swap-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/unset-referrer-policy/http-rp/cross-origin/http-http/img-tag/insecure-protocol.swap-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is stripped-referrer when a\n document served over http requires an http\n sub-resource via img-tag using the http-rp\n delivery method with swap-origin-redirect and when\n the target request is cross-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/unset-referrer-policy/http-rp/cross-origin/http-https/img-tag/upgrade-protocol.keep-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/unset-referrer-policy/http-rp/cross-origin/http-https/img-tag/upgrade-protocol.keep-origin-redirect.http.html.ini index 3914eef2d14d..212be4cae851 100644 --- a/testing/web-platform/meta/referrer-policy/unset-referrer-policy/http-rp/cross-origin/http-https/img-tag/upgrade-protocol.keep-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/unset-referrer-policy/http-rp/cross-origin/http-https/img-tag/upgrade-protocol.keep-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is stripped-referrer when a\n document served over http requires an https\n sub-resource via img-tag using the http-rp\n delivery method with keep-origin-redirect and when\n the target request is cross-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/unset-referrer-policy/http-rp/cross-origin/http-https/img-tag/upgrade-protocol.no-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/unset-referrer-policy/http-rp/cross-origin/http-https/img-tag/upgrade-protocol.no-redirect.http.html.ini index 88213c7781df..45bb6ee1f744 100644 --- a/testing/web-platform/meta/referrer-policy/unset-referrer-policy/http-rp/cross-origin/http-https/img-tag/upgrade-protocol.no-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/unset-referrer-policy/http-rp/cross-origin/http-https/img-tag/upgrade-protocol.no-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is stripped-referrer when a\n document served over http requires an https\n sub-resource via img-tag using the http-rp\n delivery method with no-redirect and when\n the target request is cross-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/unset-referrer-policy/http-rp/cross-origin/http-https/img-tag/upgrade-protocol.swap-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/unset-referrer-policy/http-rp/cross-origin/http-https/img-tag/upgrade-protocol.swap-origin-redirect.http.html.ini index 33eec1a1f2d3..15e3904cf6b7 100644 --- a/testing/web-platform/meta/referrer-policy/unset-referrer-policy/http-rp/cross-origin/http-https/img-tag/upgrade-protocol.swap-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/unset-referrer-policy/http-rp/cross-origin/http-https/img-tag/upgrade-protocol.swap-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is stripped-referrer when a\n document served over http requires an https\n sub-resource via img-tag using the http-rp\n delivery method with swap-origin-redirect and when\n the target request is cross-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/unset-referrer-policy/http-rp/same-origin/http-http/img-tag/insecure-protocol.keep-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/unset-referrer-policy/http-rp/same-origin/http-http/img-tag/insecure-protocol.keep-origin-redirect.http.html.ini index ec0f289496d7..5a8b17b252cb 100644 --- a/testing/web-platform/meta/referrer-policy/unset-referrer-policy/http-rp/same-origin/http-http/img-tag/insecure-protocol.keep-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/unset-referrer-policy/http-rp/same-origin/http-http/img-tag/insecure-protocol.keep-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is stripped-referrer when a\n document served over http requires an http\n sub-resource via img-tag using the http-rp\n delivery method with keep-origin-redirect and when\n the target request is same-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/unset-referrer-policy/http-rp/same-origin/http-http/img-tag/insecure-protocol.no-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/unset-referrer-policy/http-rp/same-origin/http-http/img-tag/insecure-protocol.no-redirect.http.html.ini index 2a5a890ec51a..6486c515a6b9 100644 --- a/testing/web-platform/meta/referrer-policy/unset-referrer-policy/http-rp/same-origin/http-http/img-tag/insecure-protocol.no-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/unset-referrer-policy/http-rp/same-origin/http-http/img-tag/insecure-protocol.no-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is stripped-referrer when a\n document served over http requires an http\n sub-resource via img-tag using the http-rp\n delivery method with no-redirect and when\n the target request is same-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/unset-referrer-policy/http-rp/same-origin/http-http/img-tag/insecure-protocol.swap-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/unset-referrer-policy/http-rp/same-origin/http-http/img-tag/insecure-protocol.swap-origin-redirect.http.html.ini index 8594edca775e..c19491b1b08a 100644 --- a/testing/web-platform/meta/referrer-policy/unset-referrer-policy/http-rp/same-origin/http-http/img-tag/insecure-protocol.swap-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/unset-referrer-policy/http-rp/same-origin/http-http/img-tag/insecure-protocol.swap-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is stripped-referrer when a\n document served over http requires an http\n sub-resource via img-tag using the http-rp\n delivery method with swap-origin-redirect and when\n the target request is same-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/unset-referrer-policy/http-rp/same-origin/http-https/img-tag/upgrade-protocol.keep-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/unset-referrer-policy/http-rp/same-origin/http-https/img-tag/upgrade-protocol.keep-origin-redirect.http.html.ini index f582c7300aa5..bd92b468a449 100644 --- a/testing/web-platform/meta/referrer-policy/unset-referrer-policy/http-rp/same-origin/http-https/img-tag/upgrade-protocol.keep-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/unset-referrer-policy/http-rp/same-origin/http-https/img-tag/upgrade-protocol.keep-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is stripped-referrer when a\n document served over http requires an https\n sub-resource via img-tag using the http-rp\n delivery method with keep-origin-redirect and when\n the target request is same-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/unset-referrer-policy/http-rp/same-origin/http-https/img-tag/upgrade-protocol.no-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/unset-referrer-policy/http-rp/same-origin/http-https/img-tag/upgrade-protocol.no-redirect.http.html.ini index 2e383e1cce38..cbe532b4e401 100644 --- a/testing/web-platform/meta/referrer-policy/unset-referrer-policy/http-rp/same-origin/http-https/img-tag/upgrade-protocol.no-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/unset-referrer-policy/http-rp/same-origin/http-https/img-tag/upgrade-protocol.no-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is stripped-referrer when a\n document served over http requires an https\n sub-resource via img-tag using the http-rp\n delivery method with no-redirect and when\n the target request is same-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/referrer-policy/unset-referrer-policy/http-rp/same-origin/http-https/img-tag/upgrade-protocol.swap-origin-redirect.http.html.ini b/testing/web-platform/meta/referrer-policy/unset-referrer-policy/http-rp/same-origin/http-https/img-tag/upgrade-protocol.swap-origin-redirect.http.html.ini index dfd1922de3f7..24f6c504e829 100644 --- a/testing/web-platform/meta/referrer-policy/unset-referrer-policy/http-rp/same-origin/http-https/img-tag/upgrade-protocol.swap-origin-redirect.http.html.ini +++ b/testing/web-platform/meta/referrer-policy/unset-referrer-policy/http-rp/same-origin/http-https/img-tag/upgrade-protocol.swap-origin-redirect.http.html.ini @@ -2,3 +2,4 @@ type: testharness [The referrer URL is stripped-referrer when a\n document served over http requires an https\n sub-resource via img-tag using the http-rp\n delivery method with swap-origin-redirect and when\n the target request is same-origin.] expected: FAIL + diff --git a/testing/web-platform/meta/service-workers/service-worker/fetch-event.https.html.ini b/testing/web-platform/meta/service-workers/service-worker/fetch-event.https.html.ini index 1536e8ed6b12..53c9f1c1ddcc 100644 --- a/testing/web-platform/meta/service-workers/service-worker/fetch-event.https.html.ini +++ b/testing/web-platform/meta/service-workers/service-worker/fetch-event.https.html.ini @@ -4,3 +4,4 @@ [Service Worker headers in the request of a fetch event] expected: if e10s: FAIL + diff --git a/testing/web-platform/meta/streams/__dir__.ini b/testing/web-platform/meta/streams/__dir__.ini new file mode 100644 index 000000000000..2848ce22e570 --- /dev/null +++ b/testing/web-platform/meta/streams/__dir__.ini @@ -0,0 +1 @@ +prefs: [dom.streams.enabled:true] diff --git a/testing/web-platform/meta/streams/byte-length-queuing-strategy.dedicatedworker.html.ini b/testing/web-platform/meta/streams/byte-length-queuing-strategy.dedicatedworker.html.ini deleted file mode 100644 index 2227d3d966c9..000000000000 --- a/testing/web-platform/meta/streams/byte-length-queuing-strategy.dedicatedworker.html.ini +++ /dev/null @@ -1,23 +0,0 @@ -[byte-length-queuing-strategy.dedicatedworker.html] - type: testharness - [Can construct a ByteLengthQueuingStrategy with a valid high water mark] - expected: FAIL - - [Can construct a ByteLengthQueuingStrategy with any value as its high water mark] - expected: FAIL - - [ByteLengthQueuingStrategy constructor behaves as expected with strange arguments] - expected: FAIL - - [ByteLengthQueuingStrategy size behaves as expected with strange arguments] - expected: FAIL - - [ByteLengthQueuingStrategy.prototype.size should work generically on its this and its arguments] - expected: FAIL - - [ByteLengthQueuingStrategy instances have the correct properties] - expected: FAIL - - [ByteLengthQueuingStrategy's highWaterMark property can be set to anything] - expected: FAIL - diff --git a/testing/web-platform/meta/streams/byte-length-queuing-strategy.html.ini b/testing/web-platform/meta/streams/byte-length-queuing-strategy.html.ini deleted file mode 100644 index 8755329d1beb..000000000000 --- a/testing/web-platform/meta/streams/byte-length-queuing-strategy.html.ini +++ /dev/null @@ -1,23 +0,0 @@ -[byte-length-queuing-strategy.html] - type: testharness - [Can construct a ByteLengthQueuingStrategy with a valid high water mark] - expected: FAIL - - [Can construct a ByteLengthQueuingStrategy with any value as its high water mark] - expected: FAIL - - [ByteLengthQueuingStrategy constructor behaves as expected with strange arguments] - expected: FAIL - - [ByteLengthQueuingStrategy size behaves as expected with strange arguments] - expected: FAIL - - [ByteLengthQueuingStrategy.prototype.size should work generically on its this and its arguments] - expected: FAIL - - [ByteLengthQueuingStrategy instances have the correct properties] - expected: FAIL - - [ByteLengthQueuingStrategy's highWaterMark property can be set to anything] - expected: FAIL - diff --git a/testing/web-platform/meta/streams/byte-length-queuing-strategy.serviceworker.https.html.ini b/testing/web-platform/meta/streams/byte-length-queuing-strategy.serviceworker.https.html.ini deleted file mode 100644 index b8772a9ab1d7..000000000000 --- a/testing/web-platform/meta/streams/byte-length-queuing-strategy.serviceworker.https.html.ini +++ /dev/null @@ -1,23 +0,0 @@ -[byte-length-queuing-strategy.serviceworker.https.html] - type: testharness - [Can construct a ByteLengthQueuingStrategy with a valid high water mark] - expected: FAIL - - [Can construct a ByteLengthQueuingStrategy with any value as its high water mark] - expected: FAIL - - [ByteLengthQueuingStrategy constructor behaves as expected with strange arguments] - expected: FAIL - - [ByteLengthQueuingStrategy size behaves as expected with strange arguments] - expected: FAIL - - [ByteLengthQueuingStrategy.prototype.size should work generically on its this and its arguments] - expected: FAIL - - [ByteLengthQueuingStrategy instances have the correct properties] - expected: FAIL - - [ByteLengthQueuingStrategy's highWaterMark property can be set to anything] - expected: FAIL - diff --git a/testing/web-platform/meta/streams/byte-length-queuing-strategy.sharedworker.html.ini b/testing/web-platform/meta/streams/byte-length-queuing-strategy.sharedworker.html.ini deleted file mode 100644 index aa09b61d6d47..000000000000 --- a/testing/web-platform/meta/streams/byte-length-queuing-strategy.sharedworker.html.ini +++ /dev/null @@ -1,23 +0,0 @@ -[byte-length-queuing-strategy.sharedworker.html] - type: testharness - [Can construct a ByteLengthQueuingStrategy with a valid high water mark] - expected: FAIL - - [Can construct a ByteLengthQueuingStrategy with any value as its high water mark] - expected: FAIL - - [ByteLengthQueuingStrategy constructor behaves as expected with strange arguments] - expected: FAIL - - [ByteLengthQueuingStrategy size behaves as expected with strange arguments] - expected: FAIL - - [ByteLengthQueuingStrategy.prototype.size should work generically on its this and its arguments] - expected: FAIL - - [ByteLengthQueuingStrategy instances have the correct properties] - expected: FAIL - - [ByteLengthQueuingStrategy's highWaterMark property can be set to anything] - expected: FAIL - diff --git a/testing/web-platform/meta/streams/count-queuing-strategy.dedicatedworker.html.ini b/testing/web-platform/meta/streams/count-queuing-strategy.dedicatedworker.html.ini deleted file mode 100644 index dc44b88aaa21..000000000000 --- a/testing/web-platform/meta/streams/count-queuing-strategy.dedicatedworker.html.ini +++ /dev/null @@ -1,23 +0,0 @@ -[count-queuing-strategy.dedicatedworker.html] - type: testharness - [Can construct a CountQueuingStrategy with a valid high water mark] - expected: FAIL - - [Can construct a CountQueuingStrategy with any value as its high water mark] - expected: FAIL - - [CountQueuingStrategy constructor behaves as expected with strange arguments] - expected: FAIL - - [CountQueuingStrategy.prototype.size should work generically on its this and its arguments] - expected: FAIL - - [CountQueuingStrategy size behaves as expected with strange arguments] - expected: FAIL - - [CountQueuingStrategy instances have the correct properties] - expected: FAIL - - [CountQueuingStrategy's highWaterMark property can be set to anything] - expected: FAIL - diff --git a/testing/web-platform/meta/streams/count-queuing-strategy.html.ini b/testing/web-platform/meta/streams/count-queuing-strategy.html.ini deleted file mode 100644 index 0a26bfb7ee26..000000000000 --- a/testing/web-platform/meta/streams/count-queuing-strategy.html.ini +++ /dev/null @@ -1,23 +0,0 @@ -[count-queuing-strategy.html] - type: testharness - [Can construct a CountQueuingStrategy with a valid high water mark] - expected: FAIL - - [Can construct a CountQueuingStrategy with any value as its high water mark] - expected: FAIL - - [CountQueuingStrategy constructor behaves as expected with strange arguments] - expected: FAIL - - [CountQueuingStrategy.prototype.size should work generically on its this and its arguments] - expected: FAIL - - [CountQueuingStrategy size behaves as expected with strange arguments] - expected: FAIL - - [CountQueuingStrategy instances have the correct properties] - expected: FAIL - - [CountQueuingStrategy's highWaterMark property can be set to anything] - expected: FAIL - diff --git a/testing/web-platform/meta/streams/count-queuing-strategy.serviceworker.https.html.ini b/testing/web-platform/meta/streams/count-queuing-strategy.serviceworker.https.html.ini deleted file mode 100644 index c80725937ca9..000000000000 --- a/testing/web-platform/meta/streams/count-queuing-strategy.serviceworker.https.html.ini +++ /dev/null @@ -1,23 +0,0 @@ -[count-queuing-strategy.serviceworker.https.html] - type: testharness - [Can construct a CountQueuingStrategy with a valid high water mark] - expected: FAIL - - [Can construct a CountQueuingStrategy with any value as its high water mark] - expected: FAIL - - [CountQueuingStrategy constructor behaves as expected with strange arguments] - expected: FAIL - - [CountQueuingStrategy.prototype.size should work generically on its this and its arguments] - expected: FAIL - - [CountQueuingStrategy size behaves as expected with strange arguments] - expected: FAIL - - [CountQueuingStrategy instances have the correct properties] - expected: FAIL - - [CountQueuingStrategy's highWaterMark property can be set to anything] - expected: FAIL - diff --git a/testing/web-platform/meta/streams/count-queuing-strategy.sharedworker.html.ini b/testing/web-platform/meta/streams/count-queuing-strategy.sharedworker.html.ini deleted file mode 100644 index b7f09b95446d..000000000000 --- a/testing/web-platform/meta/streams/count-queuing-strategy.sharedworker.html.ini +++ /dev/null @@ -1,23 +0,0 @@ -[count-queuing-strategy.sharedworker.html] - type: testharness - [Can construct a CountQueuingStrategy with a valid high water mark] - expected: FAIL - - [Can construct a CountQueuingStrategy with any value as its high water mark] - expected: FAIL - - [CountQueuingStrategy constructor behaves as expected with strange arguments] - expected: FAIL - - [CountQueuingStrategy.prototype.size should work generically on its this and its arguments] - expected: FAIL - - [CountQueuingStrategy size behaves as expected with strange arguments] - expected: FAIL - - [CountQueuingStrategy instances have the correct properties] - expected: FAIL - - [CountQueuingStrategy's highWaterMark property can be set to anything] - expected: FAIL - diff --git a/testing/web-platform/meta/streams/readable-byte-streams/general.dedicatedworker.html.ini b/testing/web-platform/meta/streams/readable-byte-streams/general.dedicatedworker.html.ini deleted file mode 100644 index 4bd47bf37c2c..000000000000 --- a/testing/web-platform/meta/streams/readable-byte-streams/general.dedicatedworker.html.ini +++ /dev/null @@ -1,218 +0,0 @@ -[general.dedicatedworker.html] - type: testharness - [getReader({mode: "byob"}) throws on non-bytes streams] - expected: FAIL - - [ReadableStream with byte source can be constructed with no errors] - expected: FAIL - - [ReadableStream with byte source: Construct and expect start and pull being called] - expected: FAIL - - [ReadableStream with byte source: No automatic pull call if start doesn't finish] - expected: FAIL - - [ReadableStream with byte source: Construct with highWaterMark of 0] - expected: FAIL - - [ReadableStream with byte source: getReader(), then releaseLock()] - expected: FAIL - - [ReadableStream with byte source: getReader() with mode set to byob, then releaseLock()] - expected: FAIL - - [ReadableStream with byte source: Test that closing a stream does not release a reader automatically] - expected: FAIL - - [ReadableStream with byte source: Test that closing a stream does not release a BYOB reader automatically] - expected: FAIL - - [ReadableStream with byte source: Test that erroring a stream does not release a reader automatically] - expected: FAIL - - [ReadableStream with byte source: Test that erroring a stream does not release a BYOB reader automatically] - expected: FAIL - - [ReadableStream with byte source: releaseLock() on ReadableStreamReader with pending read() must throw] - expected: FAIL - - [ReadableStream with byte source: Automatic pull() after start()] - expected: FAIL - - [ReadableStream with byte source: Automatic pull() after start() and read()] - expected: FAIL - - [ReadableStream with byte source: autoAllocateChunkSize] - expected: FAIL - - [ReadableStream with byte source: Mix of auto allocate and BYOB] - expected: FAIL - - [ReadableStream with byte source: Automatic pull() after start() and read(view)] - expected: FAIL - - [ReadableStream with byte source: enqueue(), getReader(), then read()] - expected: FAIL - - [ReadableStream with byte source: Push source that doesn't understand pull signal] - expected: FAIL - - [ReadableStream with byte source: read(), but pull() function is not callable] - expected: FAIL - - [ReadableStream with byte source: read(view), but pull() function is not callable] - expected: FAIL - - [ReadableStream with byte source: enqueue() with Uint16Array, getReader(), then read()] - expected: FAIL - - [ReadableStream with byte source: enqueue(), read(view) partially, then read()] - expected: FAIL - - [ReadableStream with byte source: getReader(), enqueue(), close(), then read()] - expected: FAIL - - [ReadableStream with byte source: enqueue(), close(), getReader(), then read()] - expected: FAIL - - [ReadableStream with byte source: Respond to pull() by enqueue()] - expected: FAIL - - [ReadableStream with byte source: Respond to pull() by enqueue() asynchronously] - expected: FAIL - - [ReadableStream with byte source: read(view), then respond()] - expected: FAIL - - [ReadableStream with byte source: read(view), then respond() with a transferred ArrayBuffer] - expected: FAIL - - [ReadableStream with byte source: read(view), then respond() with too big value] - expected: FAIL - - [ReadableStream with byte source: respond(3) to read(view) with 2 element Uint16Array enqueues the 1 byte remainder] - expected: FAIL - - [ReadableStream with byte source: enqueue(), getReader(), then read(view)] - expected: FAIL - - [ReadableStream with byte source: enqueue(), getReader(), then cancel() (mode = not BYOB)] - expected: FAIL - - [ReadableStream with byte source: enqueue(), getReader(), then cancel() (mode = BYOB)] - expected: FAIL - - [ReadableStream with byte source: getReader(), read(view), then cancel()] - expected: FAIL - - [ReadableStream with byte source: cancel() with partially filled pending pull() request] - expected: FAIL - - [ReadableStream with byte source: enqueue(), getReader(), then read(view) where view.buffer is not fully covered by view] - expected: FAIL - - [ReadableStream with byte source: Multiple enqueue(), getReader(), then read(view)] - expected: FAIL - - [ReadableStream with byte source: enqueue(), getReader(), then read(view) with a bigger view] - expected: FAIL - - [ReadableStream with byte source: enqueue(), getReader(), then read(view) with a smaller views] - expected: FAIL - - [ReadableStream with byte source: enqueue() 1 byte, getReader(), then read(view) with Uint16Array] - expected: FAIL - - [ReadableStream with byte source: enqueue() 3 byte, getReader(), then read(view) with 2-element Uint16Array] - expected: FAIL - - [ReadableStream with byte source: read(view) with Uint16Array on close()-d stream with 1 byte enqueue()-d must fail] - expected: FAIL - - [ReadableStream with byte source: A stream must be errored if close()-d before fulfilling read(view) with Uint16Array] - expected: FAIL - - [ReadableStream with byte source: Throw if close()-ed more than once] - expected: FAIL - - [ReadableStream with byte source: Throw on enqueue() after close()] - expected: FAIL - - [ReadableStream with byte source: read(view), then respond() and close() in pull()] - expected: FAIL - - [ReadableStream with byte source: read(view) with Uint32Array, then fill it by multiple respond() calls] - expected: FAIL - - [ReadableStream with byte source: read() twice, then enqueue() twice] - expected: FAIL - - [ReadableStream with byte source: Multiple read(view), close() and respond()] - expected: FAIL - - [ReadableStream with byte source: Multiple read(view), big enqueue()] - expected: FAIL - - [ReadableStream with byte source: Multiple read(view) and multiple enqueue()] - expected: FAIL - - [ReadableStream with byte source: read(view) with passing undefined as view must fail] - expected: FAIL - - [ReadableStream with byte source: read(view) with zero-length view must fail] - expected: FAIL - - [ReadableStream with byte source: read(view) with passing an empty object as view must fail] - expected: FAIL - - [ReadableStream with byte source: Even read(view) with passing ArrayBufferView like object as view must fail] - expected: FAIL - - [ReadableStream with byte source: read() on an errored stream] - expected: FAIL - - [ReadableStream with byte source: read(), then error()] - expected: FAIL - - [ReadableStream with byte source: read(view) on an errored stream] - expected: FAIL - - [ReadableStream with byte source: read(view), then error()] - expected: FAIL - - [ReadableStream with byte source: Throwing in pull function must error the stream] - expected: FAIL - - [ReadableStream with byte source: Throwing in pull in response to read() must be ignored if the stream is errored in it] - expected: FAIL - - [ReadableStream with byte source: Throwing in pull in response to read(view) function must error the stream] - expected: FAIL - - [ReadableStream with byte source: Throwing in pull in response to read(view) must be ignored if the stream is errored in it] - expected: FAIL - - [ReadableStreamBYOBReader can be constructed directly] - expected: FAIL - - [ReadableStreamBYOBReader constructor requires a ReadableStream argument] - expected: FAIL - - [ReadableStreamBYOBReader constructor requires an unlocked ReadableStream] - expected: FAIL - - [ReadableStreamBYOBReader constructor requires a ReadableStream with type "bytes"] - expected: FAIL - - [ReadableStream with byte source: desiredSize when closed] - expected: FAIL - - [ReadableStream with byte source: desiredSize when errored] - expected: FAIL - - [getReader({mode}) must perform ToString()] - expected: FAIL - - [ReadableStream with byte source: default reader + autoAllocateChunkSize + byobRequest interaction] - expected: FAIL - diff --git a/testing/web-platform/meta/streams/readable-byte-streams/general.html.ini b/testing/web-platform/meta/streams/readable-byte-streams/general.html.ini deleted file mode 100644 index 9e0c11095cc6..000000000000 --- a/testing/web-platform/meta/streams/readable-byte-streams/general.html.ini +++ /dev/null @@ -1,218 +0,0 @@ -[general.html] - type: testharness - [getReader({mode: "byob"}) throws on non-bytes streams] - expected: FAIL - - [ReadableStream with byte source can be constructed with no errors] - expected: FAIL - - [ReadableStream with byte source: Construct and expect start and pull being called] - expected: FAIL - - [ReadableStream with byte source: No automatic pull call if start doesn't finish] - expected: FAIL - - [ReadableStream with byte source: Construct with highWaterMark of 0] - expected: FAIL - - [ReadableStream with byte source: getReader(), then releaseLock()] - expected: FAIL - - [ReadableStream with byte source: getReader() with mode set to byob, then releaseLock()] - expected: FAIL - - [ReadableStream with byte source: Test that closing a stream does not release a reader automatically] - expected: FAIL - - [ReadableStream with byte source: Test that closing a stream does not release a BYOB reader automatically] - expected: FAIL - - [ReadableStream with byte source: Test that erroring a stream does not release a reader automatically] - expected: FAIL - - [ReadableStream with byte source: Test that erroring a stream does not release a BYOB reader automatically] - expected: FAIL - - [ReadableStream with byte source: releaseLock() on ReadableStreamReader with pending read() must throw] - expected: FAIL - - [ReadableStream with byte source: Automatic pull() after start()] - expected: FAIL - - [ReadableStream with byte source: Automatic pull() after start() and read()] - expected: FAIL - - [ReadableStream with byte source: autoAllocateChunkSize] - expected: FAIL - - [ReadableStream with byte source: Mix of auto allocate and BYOB] - expected: FAIL - - [ReadableStream with byte source: Automatic pull() after start() and read(view)] - expected: FAIL - - [ReadableStream with byte source: enqueue(), getReader(), then read()] - expected: FAIL - - [ReadableStream with byte source: Push source that doesn't understand pull signal] - expected: FAIL - - [ReadableStream with byte source: read(), but pull() function is not callable] - expected: FAIL - - [ReadableStream with byte source: read(view), but pull() function is not callable] - expected: FAIL - - [ReadableStream with byte source: enqueue() with Uint16Array, getReader(), then read()] - expected: FAIL - - [ReadableStream with byte source: enqueue(), read(view) partially, then read()] - expected: FAIL - - [ReadableStream with byte source: getReader(), enqueue(), close(), then read()] - expected: FAIL - - [ReadableStream with byte source: enqueue(), close(), getReader(), then read()] - expected: FAIL - - [ReadableStream with byte source: Respond to pull() by enqueue()] - expected: FAIL - - [ReadableStream with byte source: Respond to pull() by enqueue() asynchronously] - expected: FAIL - - [ReadableStream with byte source: read(view), then respond()] - expected: FAIL - - [ReadableStream with byte source: read(view), then respond() with a transferred ArrayBuffer] - expected: FAIL - - [ReadableStream with byte source: read(view), then respond() with too big value] - expected: FAIL - - [ReadableStream with byte source: respond(3) to read(view) with 2 element Uint16Array enqueues the 1 byte remainder] - expected: FAIL - - [ReadableStream with byte source: enqueue(), getReader(), then read(view)] - expected: FAIL - - [ReadableStream with byte source: enqueue(), getReader(), then cancel() (mode = not BYOB)] - expected: FAIL - - [ReadableStream with byte source: enqueue(), getReader(), then cancel() (mode = BYOB)] - expected: FAIL - - [ReadableStream with byte source: getReader(), read(view), then cancel()] - expected: FAIL - - [ReadableStream with byte source: cancel() with partially filled pending pull() request] - expected: FAIL - - [ReadableStream with byte source: enqueue(), getReader(), then read(view) where view.buffer is not fully covered by view] - expected: FAIL - - [ReadableStream with byte source: Multiple enqueue(), getReader(), then read(view)] - expected: FAIL - - [ReadableStream with byte source: enqueue(), getReader(), then read(view) with a bigger view] - expected: FAIL - - [ReadableStream with byte source: enqueue(), getReader(), then read(view) with a smaller views] - expected: FAIL - - [ReadableStream with byte source: enqueue() 1 byte, getReader(), then read(view) with Uint16Array] - expected: FAIL - - [ReadableStream with byte source: enqueue() 3 byte, getReader(), then read(view) with 2-element Uint16Array] - expected: FAIL - - [ReadableStream with byte source: read(view) with Uint16Array on close()-d stream with 1 byte enqueue()-d must fail] - expected: FAIL - - [ReadableStream with byte source: A stream must be errored if close()-d before fulfilling read(view) with Uint16Array] - expected: FAIL - - [ReadableStream with byte source: Throw if close()-ed more than once] - expected: FAIL - - [ReadableStream with byte source: Throw on enqueue() after close()] - expected: FAIL - - [ReadableStream with byte source: read(view), then respond() and close() in pull()] - expected: FAIL - - [ReadableStream with byte source: read(view) with Uint32Array, then fill it by multiple respond() calls] - expected: FAIL - - [ReadableStream with byte source: read() twice, then enqueue() twice] - expected: FAIL - - [ReadableStream with byte source: Multiple read(view), close() and respond()] - expected: FAIL - - [ReadableStream with byte source: Multiple read(view), big enqueue()] - expected: FAIL - - [ReadableStream with byte source: Multiple read(view) and multiple enqueue()] - expected: FAIL - - [ReadableStream with byte source: read(view) with passing undefined as view must fail] - expected: FAIL - - [ReadableStream with byte source: read(view) with zero-length view must fail] - expected: FAIL - - [ReadableStream with byte source: read(view) with passing an empty object as view must fail] - expected: FAIL - - [ReadableStream with byte source: Even read(view) with passing ArrayBufferView like object as view must fail] - expected: FAIL - - [ReadableStream with byte source: read() on an errored stream] - expected: FAIL - - [ReadableStream with byte source: read(), then error()] - expected: FAIL - - [ReadableStream with byte source: read(view) on an errored stream] - expected: FAIL - - [ReadableStream with byte source: read(view), then error()] - expected: FAIL - - [ReadableStream with byte source: Throwing in pull function must error the stream] - expected: FAIL - - [ReadableStream with byte source: Throwing in pull in response to read() must be ignored if the stream is errored in it] - expected: FAIL - - [ReadableStream with byte source: Throwing in pull in response to read(view) function must error the stream] - expected: FAIL - - [ReadableStream with byte source: Throwing in pull in response to read(view) must be ignored if the stream is errored in it] - expected: FAIL - - [ReadableStreamBYOBReader can be constructed directly] - expected: FAIL - - [ReadableStreamBYOBReader constructor requires a ReadableStream argument] - expected: FAIL - - [ReadableStreamBYOBReader constructor requires an unlocked ReadableStream] - expected: FAIL - - [ReadableStreamBYOBReader constructor requires a ReadableStream with type "bytes"] - expected: FAIL - - [ReadableStream with byte source: desiredSize when closed] - expected: FAIL - - [ReadableStream with byte source: desiredSize when errored] - expected: FAIL - - [getReader({mode}) must perform ToString()] - expected: FAIL - - [ReadableStream with byte source: default reader + autoAllocateChunkSize + byobRequest interaction] - expected: FAIL - diff --git a/testing/web-platform/meta/streams/readable-byte-streams/general.serviceworker.https.html.ini b/testing/web-platform/meta/streams/readable-byte-streams/general.serviceworker.https.html.ini deleted file mode 100644 index 0dc840bb4044..000000000000 --- a/testing/web-platform/meta/streams/readable-byte-streams/general.serviceworker.https.html.ini +++ /dev/null @@ -1,218 +0,0 @@ -[general.serviceworker.https.html] - type: testharness - [getReader({mode: "byob"}) throws on non-bytes streams] - expected: FAIL - - [ReadableStream with byte source can be constructed with no errors] - expected: FAIL - - [ReadableStream with byte source: Construct and expect start and pull being called] - expected: FAIL - - [ReadableStream with byte source: No automatic pull call if start doesn't finish] - expected: FAIL - - [ReadableStream with byte source: Construct with highWaterMark of 0] - expected: FAIL - - [ReadableStream with byte source: getReader(), then releaseLock()] - expected: FAIL - - [ReadableStream with byte source: getReader() with mode set to byob, then releaseLock()] - expected: FAIL - - [ReadableStream with byte source: Test that closing a stream does not release a reader automatically] - expected: FAIL - - [ReadableStream with byte source: Test that closing a stream does not release a BYOB reader automatically] - expected: FAIL - - [ReadableStream with byte source: Test that erroring a stream does not release a reader automatically] - expected: FAIL - - [ReadableStream with byte source: Test that erroring a stream does not release a BYOB reader automatically] - expected: FAIL - - [ReadableStream with byte source: releaseLock() on ReadableStreamReader with pending read() must throw] - expected: FAIL - - [ReadableStream with byte source: Automatic pull() after start()] - expected: FAIL - - [ReadableStream with byte source: Automatic pull() after start() and read()] - expected: FAIL - - [ReadableStream with byte source: autoAllocateChunkSize] - expected: FAIL - - [ReadableStream with byte source: Mix of auto allocate and BYOB] - expected: FAIL - - [ReadableStream with byte source: Automatic pull() after start() and read(view)] - expected: FAIL - - [ReadableStream with byte source: enqueue(), getReader(), then read()] - expected: FAIL - - [ReadableStream with byte source: Push source that doesn't understand pull signal] - expected: FAIL - - [ReadableStream with byte source: read(), but pull() function is not callable] - expected: FAIL - - [ReadableStream with byte source: read(view), but pull() function is not callable] - expected: FAIL - - [ReadableStream with byte source: enqueue() with Uint16Array, getReader(), then read()] - expected: FAIL - - [ReadableStream with byte source: enqueue(), read(view) partially, then read()] - expected: FAIL - - [ReadableStream with byte source: getReader(), enqueue(), close(), then read()] - expected: FAIL - - [ReadableStream with byte source: enqueue(), close(), getReader(), then read()] - expected: FAIL - - [ReadableStream with byte source: Respond to pull() by enqueue()] - expected: FAIL - - [ReadableStream with byte source: Respond to pull() by enqueue() asynchronously] - expected: FAIL - - [ReadableStream with byte source: read(view), then respond()] - expected: FAIL - - [ReadableStream with byte source: read(view), then respond() with a transferred ArrayBuffer] - expected: FAIL - - [ReadableStream with byte source: read(view), then respond() with too big value] - expected: FAIL - - [ReadableStream with byte source: respond(3) to read(view) with 2 element Uint16Array enqueues the 1 byte remainder] - expected: FAIL - - [ReadableStream with byte source: enqueue(), getReader(), then read(view)] - expected: FAIL - - [ReadableStream with byte source: enqueue(), getReader(), then cancel() (mode = not BYOB)] - expected: FAIL - - [ReadableStream with byte source: enqueue(), getReader(), then cancel() (mode = BYOB)] - expected: FAIL - - [ReadableStream with byte source: getReader(), read(view), then cancel()] - expected: FAIL - - [ReadableStream with byte source: cancel() with partially filled pending pull() request] - expected: FAIL - - [ReadableStream with byte source: enqueue(), getReader(), then read(view) where view.buffer is not fully covered by view] - expected: FAIL - - [ReadableStream with byte source: Multiple enqueue(), getReader(), then read(view)] - expected: FAIL - - [ReadableStream with byte source: enqueue(), getReader(), then read(view) with a bigger view] - expected: FAIL - - [ReadableStream with byte source: enqueue(), getReader(), then read(view) with a smaller views] - expected: FAIL - - [ReadableStream with byte source: enqueue() 1 byte, getReader(), then read(view) with Uint16Array] - expected: FAIL - - [ReadableStream with byte source: enqueue() 3 byte, getReader(), then read(view) with 2-element Uint16Array] - expected: FAIL - - [ReadableStream with byte source: read(view) with Uint16Array on close()-d stream with 1 byte enqueue()-d must fail] - expected: FAIL - - [ReadableStream with byte source: A stream must be errored if close()-d before fulfilling read(view) with Uint16Array] - expected: FAIL - - [ReadableStream with byte source: Throw if close()-ed more than once] - expected: FAIL - - [ReadableStream with byte source: Throw on enqueue() after close()] - expected: FAIL - - [ReadableStream with byte source: read(view), then respond() and close() in pull()] - expected: FAIL - - [ReadableStream with byte source: read(view) with Uint32Array, then fill it by multiple respond() calls] - expected: FAIL - - [ReadableStream with byte source: read() twice, then enqueue() twice] - expected: FAIL - - [ReadableStream with byte source: Multiple read(view), close() and respond()] - expected: FAIL - - [ReadableStream with byte source: Multiple read(view), big enqueue()] - expected: FAIL - - [ReadableStream with byte source: Multiple read(view) and multiple enqueue()] - expected: FAIL - - [ReadableStream with byte source: read(view) with passing undefined as view must fail] - expected: FAIL - - [ReadableStream with byte source: read(view) with zero-length view must fail] - expected: FAIL - - [ReadableStream with byte source: read(view) with passing an empty object as view must fail] - expected: FAIL - - [ReadableStream with byte source: Even read(view) with passing ArrayBufferView like object as view must fail] - expected: FAIL - - [ReadableStream with byte source: read() on an errored stream] - expected: FAIL - - [ReadableStream with byte source: read(), then error()] - expected: FAIL - - [ReadableStream with byte source: read(view) on an errored stream] - expected: FAIL - - [ReadableStream with byte source: read(view), then error()] - expected: FAIL - - [ReadableStream with byte source: Throwing in pull function must error the stream] - expected: FAIL - - [ReadableStream with byte source: Throwing in pull in response to read() must be ignored if the stream is errored in it] - expected: FAIL - - [ReadableStream with byte source: Throwing in pull in response to read(view) function must error the stream] - expected: FAIL - - [ReadableStream with byte source: Throwing in pull in response to read(view) must be ignored if the stream is errored in it] - expected: FAIL - - [ReadableStreamBYOBReader can be constructed directly] - expected: FAIL - - [ReadableStreamBYOBReader constructor requires a ReadableStream argument] - expected: FAIL - - [ReadableStreamBYOBReader constructor requires an unlocked ReadableStream] - expected: FAIL - - [ReadableStreamBYOBReader constructor requires a ReadableStream with type "bytes"] - expected: FAIL - - [ReadableStream with byte source: desiredSize when closed] - expected: FAIL - - [ReadableStream with byte source: desiredSize when errored] - expected: FAIL - - [getReader({mode}) must perform ToString()] - expected: FAIL - - [ReadableStream with byte source: default reader + autoAllocateChunkSize + byobRequest interaction] - expected: FAIL - diff --git a/testing/web-platform/meta/streams/readable-byte-streams/general.sharedworker.html.ini b/testing/web-platform/meta/streams/readable-byte-streams/general.sharedworker.html.ini deleted file mode 100644 index 29d40cb0364f..000000000000 --- a/testing/web-platform/meta/streams/readable-byte-streams/general.sharedworker.html.ini +++ /dev/null @@ -1,218 +0,0 @@ -[general.sharedworker.html] - type: testharness - [getReader({mode: "byob"}) throws on non-bytes streams] - expected: FAIL - - [ReadableStream with byte source can be constructed with no errors] - expected: FAIL - - [ReadableStream with byte source: Construct and expect start and pull being called] - expected: FAIL - - [ReadableStream with byte source: No automatic pull call if start doesn't finish] - expected: FAIL - - [ReadableStream with byte source: Construct with highWaterMark of 0] - expected: FAIL - - [ReadableStream with byte source: getReader(), then releaseLock()] - expected: FAIL - - [ReadableStream with byte source: getReader() with mode set to byob, then releaseLock()] - expected: FAIL - - [ReadableStream with byte source: Test that closing a stream does not release a reader automatically] - expected: FAIL - - [ReadableStream with byte source: Test that closing a stream does not release a BYOB reader automatically] - expected: FAIL - - [ReadableStream with byte source: Test that erroring a stream does not release a reader automatically] - expected: FAIL - - [ReadableStream with byte source: Test that erroring a stream does not release a BYOB reader automatically] - expected: FAIL - - [ReadableStream with byte source: releaseLock() on ReadableStreamReader with pending read() must throw] - expected: FAIL - - [ReadableStream with byte source: Automatic pull() after start()] - expected: FAIL - - [ReadableStream with byte source: Automatic pull() after start() and read()] - expected: FAIL - - [ReadableStream with byte source: autoAllocateChunkSize] - expected: FAIL - - [ReadableStream with byte source: Mix of auto allocate and BYOB] - expected: FAIL - - [ReadableStream with byte source: Automatic pull() after start() and read(view)] - expected: FAIL - - [ReadableStream with byte source: enqueue(), getReader(), then read()] - expected: FAIL - - [ReadableStream with byte source: Push source that doesn't understand pull signal] - expected: FAIL - - [ReadableStream with byte source: read(), but pull() function is not callable] - expected: FAIL - - [ReadableStream with byte source: read(view), but pull() function is not callable] - expected: FAIL - - [ReadableStream with byte source: enqueue() with Uint16Array, getReader(), then read()] - expected: FAIL - - [ReadableStream with byte source: enqueue(), read(view) partially, then read()] - expected: FAIL - - [ReadableStream with byte source: getReader(), enqueue(), close(), then read()] - expected: FAIL - - [ReadableStream with byte source: enqueue(), close(), getReader(), then read()] - expected: FAIL - - [ReadableStream with byte source: Respond to pull() by enqueue()] - expected: FAIL - - [ReadableStream with byte source: Respond to pull() by enqueue() asynchronously] - expected: FAIL - - [ReadableStream with byte source: read(view), then respond()] - expected: FAIL - - [ReadableStream with byte source: read(view), then respond() with a transferred ArrayBuffer] - expected: FAIL - - [ReadableStream with byte source: read(view), then respond() with too big value] - expected: FAIL - - [ReadableStream with byte source: respond(3) to read(view) with 2 element Uint16Array enqueues the 1 byte remainder] - expected: FAIL - - [ReadableStream with byte source: enqueue(), getReader(), then read(view)] - expected: FAIL - - [ReadableStream with byte source: enqueue(), getReader(), then cancel() (mode = not BYOB)] - expected: FAIL - - [ReadableStream with byte source: enqueue(), getReader(), then cancel() (mode = BYOB)] - expected: FAIL - - [ReadableStream with byte source: getReader(), read(view), then cancel()] - expected: FAIL - - [ReadableStream with byte source: cancel() with partially filled pending pull() request] - expected: FAIL - - [ReadableStream with byte source: enqueue(), getReader(), then read(view) where view.buffer is not fully covered by view] - expected: FAIL - - [ReadableStream with byte source: Multiple enqueue(), getReader(), then read(view)] - expected: FAIL - - [ReadableStream with byte source: enqueue(), getReader(), then read(view) with a bigger view] - expected: FAIL - - [ReadableStream with byte source: enqueue(), getReader(), then read(view) with a smaller views] - expected: FAIL - - [ReadableStream with byte source: enqueue() 1 byte, getReader(), then read(view) with Uint16Array] - expected: FAIL - - [ReadableStream with byte source: enqueue() 3 byte, getReader(), then read(view) with 2-element Uint16Array] - expected: FAIL - - [ReadableStream with byte source: read(view) with Uint16Array on close()-d stream with 1 byte enqueue()-d must fail] - expected: FAIL - - [ReadableStream with byte source: A stream must be errored if close()-d before fulfilling read(view) with Uint16Array] - expected: FAIL - - [ReadableStream with byte source: Throw if close()-ed more than once] - expected: FAIL - - [ReadableStream with byte source: Throw on enqueue() after close()] - expected: FAIL - - [ReadableStream with byte source: read(view), then respond() and close() in pull()] - expected: FAIL - - [ReadableStream with byte source: read(view) with Uint32Array, then fill it by multiple respond() calls] - expected: FAIL - - [ReadableStream with byte source: read() twice, then enqueue() twice] - expected: FAIL - - [ReadableStream with byte source: Multiple read(view), close() and respond()] - expected: FAIL - - [ReadableStream with byte source: Multiple read(view), big enqueue()] - expected: FAIL - - [ReadableStream with byte source: Multiple read(view) and multiple enqueue()] - expected: FAIL - - [ReadableStream with byte source: read(view) with passing undefined as view must fail] - expected: FAIL - - [ReadableStream with byte source: read(view) with zero-length view must fail] - expected: FAIL - - [ReadableStream with byte source: read(view) with passing an empty object as view must fail] - expected: FAIL - - [ReadableStream with byte source: Even read(view) with passing ArrayBufferView like object as view must fail] - expected: FAIL - - [ReadableStream with byte source: read() on an errored stream] - expected: FAIL - - [ReadableStream with byte source: read(), then error()] - expected: FAIL - - [ReadableStream with byte source: read(view) on an errored stream] - expected: FAIL - - [ReadableStream with byte source: read(view), then error()] - expected: FAIL - - [ReadableStream with byte source: Throwing in pull function must error the stream] - expected: FAIL - - [ReadableStream with byte source: Throwing in pull in response to read() must be ignored if the stream is errored in it] - expected: FAIL - - [ReadableStream with byte source: Throwing in pull in response to read(view) function must error the stream] - expected: FAIL - - [ReadableStream with byte source: Throwing in pull in response to read(view) must be ignored if the stream is errored in it] - expected: FAIL - - [ReadableStreamBYOBReader can be constructed directly] - expected: FAIL - - [ReadableStreamBYOBReader constructor requires a ReadableStream argument] - expected: FAIL - - [ReadableStreamBYOBReader constructor requires an unlocked ReadableStream] - expected: FAIL - - [ReadableStreamBYOBReader constructor requires a ReadableStream with type "bytes"] - expected: FAIL - - [ReadableStream with byte source: desiredSize when closed] - expected: FAIL - - [ReadableStream with byte source: desiredSize when errored] - expected: FAIL - - [getReader({mode}) must perform ToString()] - expected: FAIL - - [ReadableStream with byte source: default reader + autoAllocateChunkSize + byobRequest interaction] - expected: FAIL - diff --git a/testing/web-platform/meta/streams/readable-streams/bad-strategies.dedicatedworker.html.ini b/testing/web-platform/meta/streams/readable-streams/bad-strategies.dedicatedworker.html.ini deleted file mode 100644 index 4cc71f72d350..000000000000 --- a/testing/web-platform/meta/streams/readable-streams/bad-strategies.dedicatedworker.html.ini +++ /dev/null @@ -1,23 +0,0 @@ -[bad-strategies.dedicatedworker.html] - type: testharness - [Readable stream: throwing strategy.size getter] - expected: FAIL - - [Readable stream: strategy.size errors the stream and then throws] - expected: FAIL - - [Readable stream: strategy.size errors the stream and then returns Infinity] - expected: FAIL - - [Readable stream: throwing strategy.size method] - expected: FAIL - - [Readable stream: throwing strategy.highWaterMark getter] - expected: FAIL - - [Readable stream: invalid strategy.highWaterMark] - expected: FAIL - - [Readable stream: invalid strategy.size return value] - expected: FAIL - diff --git a/testing/web-platform/meta/streams/readable-streams/bad-strategies.html.ini b/testing/web-platform/meta/streams/readable-streams/bad-strategies.html.ini deleted file mode 100644 index 0c2c22ad17a5..000000000000 --- a/testing/web-platform/meta/streams/readable-streams/bad-strategies.html.ini +++ /dev/null @@ -1,23 +0,0 @@ -[bad-strategies.html] - type: testharness - [Readable stream: throwing strategy.size getter] - expected: FAIL - - [Readable stream: strategy.size errors the stream and then throws] - expected: FAIL - - [Readable stream: strategy.size errors the stream and then returns Infinity] - expected: FAIL - - [Readable stream: throwing strategy.size method] - expected: FAIL - - [Readable stream: throwing strategy.highWaterMark getter] - expected: FAIL - - [Readable stream: invalid strategy.highWaterMark] - expected: FAIL - - [Readable stream: invalid strategy.size return value] - expected: FAIL - diff --git a/testing/web-platform/meta/streams/readable-streams/bad-strategies.serviceworker.https.html.ini b/testing/web-platform/meta/streams/readable-streams/bad-strategies.serviceworker.https.html.ini deleted file mode 100644 index 6afa26df1e65..000000000000 --- a/testing/web-platform/meta/streams/readable-streams/bad-strategies.serviceworker.https.html.ini +++ /dev/null @@ -1,23 +0,0 @@ -[bad-strategies.serviceworker.https.html] - type: testharness - [Readable stream: throwing strategy.size getter] - expected: FAIL - - [Readable stream: strategy.size errors the stream and then throws] - expected: FAIL - - [Readable stream: strategy.size errors the stream and then returns Infinity] - expected: FAIL - - [Readable stream: throwing strategy.size method] - expected: FAIL - - [Readable stream: throwing strategy.highWaterMark getter] - expected: FAIL - - [Readable stream: invalid strategy.highWaterMark] - expected: FAIL - - [Readable stream: invalid strategy.size return value] - expected: FAIL - diff --git a/testing/web-platform/meta/streams/readable-streams/bad-strategies.sharedworker.html.ini b/testing/web-platform/meta/streams/readable-streams/bad-strategies.sharedworker.html.ini deleted file mode 100644 index 5299d64d64a8..000000000000 --- a/testing/web-platform/meta/streams/readable-streams/bad-strategies.sharedworker.html.ini +++ /dev/null @@ -1,23 +0,0 @@ -[bad-strategies.sharedworker.html] - type: testharness - [Readable stream: throwing strategy.size getter] - expected: FAIL - - [Readable stream: strategy.size errors the stream and then throws] - expected: FAIL - - [Readable stream: strategy.size errors the stream and then returns Infinity] - expected: FAIL - - [Readable stream: throwing strategy.size method] - expected: FAIL - - [Readable stream: throwing strategy.highWaterMark getter] - expected: FAIL - - [Readable stream: invalid strategy.highWaterMark] - expected: FAIL - - [Readable stream: invalid strategy.size return value] - expected: FAIL - diff --git a/testing/web-platform/meta/streams/readable-streams/bad-underlying-sources.dedicatedworker.html.ini b/testing/web-platform/meta/streams/readable-streams/bad-underlying-sources.dedicatedworker.html.ini deleted file mode 100644 index e129ce8e0268..000000000000 --- a/testing/web-platform/meta/streams/readable-streams/bad-underlying-sources.dedicatedworker.html.ini +++ /dev/null @@ -1,68 +0,0 @@ -[bad-underlying-sources.dedicatedworker.html] - type: testharness - [Underlying source start: throwing getter] - expected: FAIL - - [Underlying source start: throwing method] - expected: FAIL - - [Underlying source: throwing pull getter (initial pull)] - expected: FAIL - - [Underlying source: throwing pull method (initial pull)] - expected: FAIL - - [Underlying source pull: throwing getter (second pull)] - expected: FAIL - - [Underlying source pull: throwing method (second pull)] - expected: FAIL - - [Underlying source cancel: throwing getter] - expected: FAIL - - [Underlying source cancel: throwing method] - expected: FAIL - - [Underlying source: calling enqueue on an empty canceled stream should throw] - expected: FAIL - - [Underlying source: calling enqueue on a non-empty canceled stream should throw] - expected: FAIL - - [Underlying source: calling enqueue on a closed stream should throw] - expected: FAIL - - [Underlying source: calling enqueue on an errored stream should throw] - expected: FAIL - - [Underlying source: calling close twice on an empty stream should throw the second time] - expected: FAIL - - [Underlying source: calling close twice on a non-empty stream should throw the second time] - expected: FAIL - - [Underlying source: calling close on an empty canceled stream should throw] - expected: FAIL - - [Underlying source: calling close on a non-empty canceled stream should throw] - expected: FAIL - - [Underlying source: calling close after error should throw] - expected: FAIL - - [Underlying source: calling error twice should throw the second time] - expected: FAIL - - [Underlying source: calling error after close should throw] - expected: FAIL - - [Underlying source: calling error and returning a rejected promise from start should cause the stream to error with the first error] - expected: FAIL - - [Underlying source: calling error and returning a rejected promise from pull should cause the stream to error with the first error] - expected: FAIL - - [read should not error if it dequeues and pull() throws] - expected: FAIL - diff --git a/testing/web-platform/meta/streams/readable-streams/bad-underlying-sources.html.ini b/testing/web-platform/meta/streams/readable-streams/bad-underlying-sources.html.ini deleted file mode 100644 index 8fc2c6f2c9ff..000000000000 --- a/testing/web-platform/meta/streams/readable-streams/bad-underlying-sources.html.ini +++ /dev/null @@ -1,68 +0,0 @@ -[bad-underlying-sources.html] - type: testharness - [Underlying source start: throwing getter] - expected: FAIL - - [Underlying source start: throwing method] - expected: FAIL - - [Underlying source: throwing pull getter (initial pull)] - expected: FAIL - - [Underlying source: throwing pull method (initial pull)] - expected: FAIL - - [Underlying source pull: throwing getter (second pull)] - expected: FAIL - - [Underlying source pull: throwing method (second pull)] - expected: FAIL - - [Underlying source cancel: throwing getter] - expected: FAIL - - [Underlying source cancel: throwing method] - expected: FAIL - - [Underlying source: calling enqueue on an empty canceled stream should throw] - expected: FAIL - - [Underlying source: calling enqueue on a non-empty canceled stream should throw] - expected: FAIL - - [Underlying source: calling enqueue on a closed stream should throw] - expected: FAIL - - [Underlying source: calling enqueue on an errored stream should throw] - expected: FAIL - - [Underlying source: calling close twice on an empty stream should throw the second time] - expected: FAIL - - [Underlying source: calling close twice on a non-empty stream should throw the second time] - expected: FAIL - - [Underlying source: calling close on an empty canceled stream should throw] - expected: FAIL - - [Underlying source: calling close on a non-empty canceled stream should throw] - expected: FAIL - - [Underlying source: calling close after error should throw] - expected: FAIL - - [Underlying source: calling error twice should throw the second time] - expected: FAIL - - [Underlying source: calling error after close should throw] - expected: FAIL - - [Underlying source: calling error and returning a rejected promise from start should cause the stream to error with the first error] - expected: FAIL - - [Underlying source: calling error and returning a rejected promise from pull should cause the stream to error with the first error] - expected: FAIL - - [read should not error if it dequeues and pull() throws] - expected: FAIL - diff --git a/testing/web-platform/meta/streams/readable-streams/bad-underlying-sources.serviceworker.https.html.ini b/testing/web-platform/meta/streams/readable-streams/bad-underlying-sources.serviceworker.https.html.ini deleted file mode 100644 index 5f727be63d8f..000000000000 --- a/testing/web-platform/meta/streams/readable-streams/bad-underlying-sources.serviceworker.https.html.ini +++ /dev/null @@ -1,68 +0,0 @@ -[bad-underlying-sources.serviceworker.https.html] - type: testharness - [Underlying source start: throwing getter] - expected: FAIL - - [Underlying source start: throwing method] - expected: FAIL - - [Underlying source: throwing pull getter (initial pull)] - expected: FAIL - - [Underlying source: throwing pull method (initial pull)] - expected: FAIL - - [Underlying source pull: throwing getter (second pull)] - expected: FAIL - - [Underlying source pull: throwing method (second pull)] - expected: FAIL - - [Underlying source cancel: throwing getter] - expected: FAIL - - [Underlying source cancel: throwing method] - expected: FAIL - - [Underlying source: calling enqueue on an empty canceled stream should throw] - expected: FAIL - - [Underlying source: calling enqueue on a non-empty canceled stream should throw] - expected: FAIL - - [Underlying source: calling enqueue on a closed stream should throw] - expected: FAIL - - [Underlying source: calling enqueue on an errored stream should throw] - expected: FAIL - - [Underlying source: calling close twice on an empty stream should throw the second time] - expected: FAIL - - [Underlying source: calling close twice on a non-empty stream should throw the second time] - expected: FAIL - - [Underlying source: calling close on an empty canceled stream should throw] - expected: FAIL - - [Underlying source: calling close on a non-empty canceled stream should throw] - expected: FAIL - - [Underlying source: calling close after error should throw] - expected: FAIL - - [Underlying source: calling error twice should throw the second time] - expected: FAIL - - [Underlying source: calling error after close should throw] - expected: FAIL - - [Underlying source: calling error and returning a rejected promise from start should cause the stream to error with the first error] - expected: FAIL - - [Underlying source: calling error and returning a rejected promise from pull should cause the stream to error with the first error] - expected: FAIL - - [read should not error if it dequeues and pull() throws] - expected: FAIL - diff --git a/testing/web-platform/meta/streams/readable-streams/bad-underlying-sources.sharedworker.html.ini b/testing/web-platform/meta/streams/readable-streams/bad-underlying-sources.sharedworker.html.ini deleted file mode 100644 index cda96e330f14..000000000000 --- a/testing/web-platform/meta/streams/readable-streams/bad-underlying-sources.sharedworker.html.ini +++ /dev/null @@ -1,68 +0,0 @@ -[bad-underlying-sources.sharedworker.html] - type: testharness - [Underlying source start: throwing getter] - expected: FAIL - - [Underlying source start: throwing method] - expected: FAIL - - [Underlying source: throwing pull getter (initial pull)] - expected: FAIL - - [Underlying source: throwing pull method (initial pull)] - expected: FAIL - - [Underlying source pull: throwing getter (second pull)] - expected: FAIL - - [Underlying source pull: throwing method (second pull)] - expected: FAIL - - [Underlying source cancel: throwing getter] - expected: FAIL - - [Underlying source cancel: throwing method] - expected: FAIL - - [Underlying source: calling enqueue on an empty canceled stream should throw] - expected: FAIL - - [Underlying source: calling enqueue on a non-empty canceled stream should throw] - expected: FAIL - - [Underlying source: calling enqueue on a closed stream should throw] - expected: FAIL - - [Underlying source: calling enqueue on an errored stream should throw] - expected: FAIL - - [Underlying source: calling close twice on an empty stream should throw the second time] - expected: FAIL - - [Underlying source: calling close twice on a non-empty stream should throw the second time] - expected: FAIL - - [Underlying source: calling close on an empty canceled stream should throw] - expected: FAIL - - [Underlying source: calling close on a non-empty canceled stream should throw] - expected: FAIL - - [Underlying source: calling close after error should throw] - expected: FAIL - - [Underlying source: calling error twice should throw the second time] - expected: FAIL - - [Underlying source: calling error after close should throw] - expected: FAIL - - [Underlying source: calling error and returning a rejected promise from start should cause the stream to error with the first error] - expected: FAIL - - [Underlying source: calling error and returning a rejected promise from pull should cause the stream to error with the first error] - expected: FAIL - - [read should not error if it dequeues and pull() throws] - expected: FAIL - diff --git a/testing/web-platform/meta/streams/readable-streams/brand-checks.dedicatedworker.html.ini b/testing/web-platform/meta/streams/readable-streams/brand-checks.dedicatedworker.html.ini index 6c16f6974c77..e8d51ae43f87 100644 --- a/testing/web-platform/meta/streams/readable-streams/brand-checks.dedicatedworker.html.ini +++ b/testing/web-platform/meta/streams/readable-streams/brand-checks.dedicatedworker.html.ini @@ -3,18 +3,6 @@ [Can get the ReadableStreamReader constructor indirectly] expected: FAIL - [Can get the ReadableStreamController constructor indirectly] - expected: FAIL - - [ReadableStream.prototype.cancel enforces a brand check] - expected: FAIL - - [ReadableStream.prototype.getReader enforces a brand check] - expected: FAIL - - [ReadableStream.prototype.tee enforces a brand check] - expected: FAIL - [ReadableStreamReader.prototype.closed enforces a brand check] expected: FAIL @@ -27,30 +15,3 @@ [ReadableStreamReader.prototype.releaseLock enforces a brand check] expected: FAIL - [ReadableStreamController can't be given a fully-constructed ReadableStream] - expected: FAIL - - [ReadableStreamController.prototype.close enforces a brand check] - expected: FAIL - - [ReadableStreamController.prototype.enqueue enforces a brand check] - expected: FAIL - - [ReadableStreamController.prototype.error enforces a brand check] - expected: FAIL - - [Can get the ReadableStreamDefaultReader constructor indirectly] - expected: FAIL - - [ReadableStreamDefaultReader.prototype.closed enforces a brand check] - expected: FAIL - - [ReadableStreamDefaultReader.prototype.cancel enforces a brand check] - expected: FAIL - - [ReadableStreamDefaultReader.prototype.read enforces a brand check] - expected: FAIL - - [ReadableStreamDefaultReader.prototype.releaseLock enforces a brand check] - expected: FAIL - diff --git a/testing/web-platform/meta/streams/readable-streams/brand-checks.html.ini b/testing/web-platform/meta/streams/readable-streams/brand-checks.html.ini index 254e1b95e673..55edf45d0667 100644 --- a/testing/web-platform/meta/streams/readable-streams/brand-checks.html.ini +++ b/testing/web-platform/meta/streams/readable-streams/brand-checks.html.ini @@ -3,18 +3,6 @@ [Can get the ReadableStreamReader constructor indirectly] expected: FAIL - [Can get the ReadableStreamController constructor indirectly] - expected: FAIL - - [ReadableStream.prototype.cancel enforces a brand check] - expected: FAIL - - [ReadableStream.prototype.getReader enforces a brand check] - expected: FAIL - - [ReadableStream.prototype.tee enforces a brand check] - expected: FAIL - [ReadableStreamReader.prototype.closed enforces a brand check] expected: FAIL @@ -27,30 +15,3 @@ [ReadableStreamReader.prototype.releaseLock enforces a brand check] expected: FAIL - [ReadableStreamController can't be given a fully-constructed ReadableStream] - expected: FAIL - - [ReadableStreamController.prototype.close enforces a brand check] - expected: FAIL - - [ReadableStreamController.prototype.enqueue enforces a brand check] - expected: FAIL - - [ReadableStreamController.prototype.error enforces a brand check] - expected: FAIL - - [Can get the ReadableStreamDefaultReader constructor indirectly] - expected: FAIL - - [ReadableStreamDefaultReader.prototype.closed enforces a brand check] - expected: FAIL - - [ReadableStreamDefaultReader.prototype.cancel enforces a brand check] - expected: FAIL - - [ReadableStreamDefaultReader.prototype.read enforces a brand check] - expected: FAIL - - [ReadableStreamDefaultReader.prototype.releaseLock enforces a brand check] - expected: FAIL - diff --git a/testing/web-platform/meta/streams/readable-streams/brand-checks.serviceworker.https.html.ini b/testing/web-platform/meta/streams/readable-streams/brand-checks.serviceworker.https.html.ini index 91cd7dd48085..1e1ea5162899 100644 --- a/testing/web-platform/meta/streams/readable-streams/brand-checks.serviceworker.https.html.ini +++ b/testing/web-platform/meta/streams/readable-streams/brand-checks.serviceworker.https.html.ini @@ -3,18 +3,6 @@ [Can get the ReadableStreamReader constructor indirectly] expected: FAIL - [Can get the ReadableStreamController constructor indirectly] - expected: FAIL - - [ReadableStream.prototype.cancel enforces a brand check] - expected: FAIL - - [ReadableStream.prototype.getReader enforces a brand check] - expected: FAIL - - [ReadableStream.prototype.tee enforces a brand check] - expected: FAIL - [ReadableStreamReader.prototype.closed enforces a brand check] expected: FAIL @@ -27,30 +15,3 @@ [ReadableStreamReader.prototype.releaseLock enforces a brand check] expected: FAIL - [ReadableStreamController can't be given a fully-constructed ReadableStream] - expected: FAIL - - [ReadableStreamController.prototype.close enforces a brand check] - expected: FAIL - - [ReadableStreamController.prototype.enqueue enforces a brand check] - expected: FAIL - - [ReadableStreamController.prototype.error enforces a brand check] - expected: FAIL - - [Can get the ReadableStreamDefaultReader constructor indirectly] - expected: FAIL - - [ReadableStreamDefaultReader.prototype.closed enforces a brand check] - expected: FAIL - - [ReadableStreamDefaultReader.prototype.cancel enforces a brand check] - expected: FAIL - - [ReadableStreamDefaultReader.prototype.read enforces a brand check] - expected: FAIL - - [ReadableStreamDefaultReader.prototype.releaseLock enforces a brand check] - expected: FAIL - diff --git a/testing/web-platform/meta/streams/readable-streams/brand-checks.sharedworker.html.ini b/testing/web-platform/meta/streams/readable-streams/brand-checks.sharedworker.html.ini index 64333cd8a9bf..e258b4882704 100644 --- a/testing/web-platform/meta/streams/readable-streams/brand-checks.sharedworker.html.ini +++ b/testing/web-platform/meta/streams/readable-streams/brand-checks.sharedworker.html.ini @@ -3,18 +3,6 @@ [Can get the ReadableStreamReader constructor indirectly] expected: FAIL - [Can get the ReadableStreamController constructor indirectly] - expected: FAIL - - [ReadableStream.prototype.cancel enforces a brand check] - expected: FAIL - - [ReadableStream.prototype.getReader enforces a brand check] - expected: FAIL - - [ReadableStream.prototype.tee enforces a brand check] - expected: FAIL - [ReadableStreamReader.prototype.closed enforces a brand check] expected: FAIL @@ -27,30 +15,3 @@ [ReadableStreamReader.prototype.releaseLock enforces a brand check] expected: FAIL - [ReadableStreamController can't be given a fully-constructed ReadableStream] - expected: FAIL - - [ReadableStreamController.prototype.close enforces a brand check] - expected: FAIL - - [ReadableStreamController.prototype.enqueue enforces a brand check] - expected: FAIL - - [ReadableStreamController.prototype.error enforces a brand check] - expected: FAIL - - [Can get the ReadableStreamDefaultReader constructor indirectly] - expected: FAIL - - [ReadableStreamDefaultReader.prototype.closed enforces a brand check] - expected: FAIL - - [ReadableStreamDefaultReader.prototype.cancel enforces a brand check] - expected: FAIL - - [ReadableStreamDefaultReader.prototype.read enforces a brand check] - expected: FAIL - - [ReadableStreamDefaultReader.prototype.releaseLock enforces a brand check] - expected: FAIL - diff --git a/testing/web-platform/meta/streams/readable-streams/cancel.dedicatedworker.html.ini b/testing/web-platform/meta/streams/readable-streams/cancel.dedicatedworker.html.ini deleted file mode 100644 index d1ccc30d0b71..000000000000 --- a/testing/web-platform/meta/streams/readable-streams/cancel.dedicatedworker.html.ini +++ /dev/null @@ -1,32 +0,0 @@ -[cancel.dedicatedworker.html] - type: testharness - [ReadableStream cancellation: integration test on an infinite stream derived from a random push source] - expected: FAIL - - [ReadableStream cancellation: cancel(reason) should pass through the given reason to the underlying source] - expected: FAIL - - [ReadableStream cancellation: cancel() on a locked stream should fail and not call the underlying source cancel] - expected: FAIL - - [ReadableStream cancellation: should fulfill promise when cancel callback went fine] - expected: FAIL - - [ReadableStream cancellation: returning a value from the underlying source's cancel should not affect the fulfillment value of the promise returned by the stream's cancel] - expected: FAIL - - [ReadableStream cancellation: should reject promise when cancel callback raises an exception] - expected: FAIL - - [ReadableStream cancellation: if the underlying source's cancel method returns a promise, the promise returned by the stream's cancel should fulfill when that one does (1)] - expected: FAIL - - [ReadableStream cancellation: if the underlying source's cancel method returns a promise, the promise returned by the stream's cancel should fulfill when that one does (2)] - expected: FAIL - - [ReadableStream cancellation: if the underlying source's cancel method returns a promise, the promise returned by the stream's cancel should reject when that one does] - expected: FAIL - - [ReadableStream cancellation: cancelling before start finishes should prevent pull() from being called] - expected: FAIL - diff --git a/testing/web-platform/meta/streams/readable-streams/cancel.html.ini b/testing/web-platform/meta/streams/readable-streams/cancel.html.ini deleted file mode 100644 index 06a087fc7a5c..000000000000 --- a/testing/web-platform/meta/streams/readable-streams/cancel.html.ini +++ /dev/null @@ -1,32 +0,0 @@ -[cancel.html] - type: testharness - [ReadableStream cancellation: integration test on an infinite stream derived from a random push source] - expected: FAIL - - [ReadableStream cancellation: cancel(reason) should pass through the given reason to the underlying source] - expected: FAIL - - [ReadableStream cancellation: cancel() on a locked stream should fail and not call the underlying source cancel] - expected: FAIL - - [ReadableStream cancellation: should fulfill promise when cancel callback went fine] - expected: FAIL - - [ReadableStream cancellation: returning a value from the underlying source's cancel should not affect the fulfillment value of the promise returned by the stream's cancel] - expected: FAIL - - [ReadableStream cancellation: should reject promise when cancel callback raises an exception] - expected: FAIL - - [ReadableStream cancellation: if the underlying source's cancel method returns a promise, the promise returned by the stream's cancel should fulfill when that one does (1)] - expected: FAIL - - [ReadableStream cancellation: if the underlying source's cancel method returns a promise, the promise returned by the stream's cancel should fulfill when that one does (2)] - expected: FAIL - - [ReadableStream cancellation: if the underlying source's cancel method returns a promise, the promise returned by the stream's cancel should reject when that one does] - expected: FAIL - - [ReadableStream cancellation: cancelling before start finishes should prevent pull() from being called] - expected: FAIL - diff --git a/testing/web-platform/meta/streams/readable-streams/cancel.serviceworker.https.html.ini b/testing/web-platform/meta/streams/readable-streams/cancel.serviceworker.https.html.ini deleted file mode 100644 index 24bb3532811e..000000000000 --- a/testing/web-platform/meta/streams/readable-streams/cancel.serviceworker.https.html.ini +++ /dev/null @@ -1,32 +0,0 @@ -[cancel.serviceworker.https.html] - type: testharness - [ReadableStream cancellation: integration test on an infinite stream derived from a random push source] - expected: FAIL - - [ReadableStream cancellation: cancel(reason) should pass through the given reason to the underlying source] - expected: FAIL - - [ReadableStream cancellation: cancel() on a locked stream should fail and not call the underlying source cancel] - expected: FAIL - - [ReadableStream cancellation: should fulfill promise when cancel callback went fine] - expected: FAIL - - [ReadableStream cancellation: returning a value from the underlying source's cancel should not affect the fulfillment value of the promise returned by the stream's cancel] - expected: FAIL - - [ReadableStream cancellation: should reject promise when cancel callback raises an exception] - expected: FAIL - - [ReadableStream cancellation: if the underlying source's cancel method returns a promise, the promise returned by the stream's cancel should fulfill when that one does (1)] - expected: FAIL - - [ReadableStream cancellation: if the underlying source's cancel method returns a promise, the promise returned by the stream's cancel should fulfill when that one does (2)] - expected: FAIL - - [ReadableStream cancellation: if the underlying source's cancel method returns a promise, the promise returned by the stream's cancel should reject when that one does] - expected: FAIL - - [ReadableStream cancellation: cancelling before start finishes should prevent pull() from being called] - expected: FAIL - diff --git a/testing/web-platform/meta/streams/readable-streams/cancel.sharedworker.html.ini b/testing/web-platform/meta/streams/readable-streams/cancel.sharedworker.html.ini deleted file mode 100644 index ff782ce13267..000000000000 --- a/testing/web-platform/meta/streams/readable-streams/cancel.sharedworker.html.ini +++ /dev/null @@ -1,32 +0,0 @@ -[cancel.sharedworker.html] - type: testharness - [ReadableStream cancellation: integration test on an infinite stream derived from a random push source] - expected: FAIL - - [ReadableStream cancellation: cancel(reason) should pass through the given reason to the underlying source] - expected: FAIL - - [ReadableStream cancellation: cancel() on a locked stream should fail and not call the underlying source cancel] - expected: FAIL - - [ReadableStream cancellation: should fulfill promise when cancel callback went fine] - expected: FAIL - - [ReadableStream cancellation: returning a value from the underlying source's cancel should not affect the fulfillment value of the promise returned by the stream's cancel] - expected: FAIL - - [ReadableStream cancellation: should reject promise when cancel callback raises an exception] - expected: FAIL - - [ReadableStream cancellation: if the underlying source's cancel method returns a promise, the promise returned by the stream's cancel should fulfill when that one does (1)] - expected: FAIL - - [ReadableStream cancellation: if the underlying source's cancel method returns a promise, the promise returned by the stream's cancel should fulfill when that one does (2)] - expected: FAIL - - [ReadableStream cancellation: if the underlying source's cancel method returns a promise, the promise returned by the stream's cancel should reject when that one does] - expected: FAIL - - [ReadableStream cancellation: cancelling before start finishes should prevent pull() from being called] - expected: FAIL - diff --git a/testing/web-platform/meta/streams/readable-streams/count-queuing-strategy-integration.dedicatedworker.html.ini b/testing/web-platform/meta/streams/readable-streams/count-queuing-strategy-integration.dedicatedworker.html.ini deleted file mode 100644 index 5063a9c275cd..000000000000 --- a/testing/web-platform/meta/streams/readable-streams/count-queuing-strategy-integration.dedicatedworker.html.ini +++ /dev/null @@ -1,14 +0,0 @@ -[count-queuing-strategy-integration.dedicatedworker.html] - type: testharness - [Can construct a readable stream with a valid CountQueuingStrategy] - expected: FAIL - - [Correctly governs a ReadableStreamController's desiredSize property (HWM = 0)] - expected: FAIL - - [Correctly governs a ReadableStreamController's desiredSize property (HWM = 1)] - expected: FAIL - - [Correctly governs a ReadableStreamController's desiredSize property (HWM = 4)] - expected: FAIL - diff --git a/testing/web-platform/meta/streams/readable-streams/count-queuing-strategy-integration.html.ini b/testing/web-platform/meta/streams/readable-streams/count-queuing-strategy-integration.html.ini deleted file mode 100644 index 284feed4567f..000000000000 --- a/testing/web-platform/meta/streams/readable-streams/count-queuing-strategy-integration.html.ini +++ /dev/null @@ -1,14 +0,0 @@ -[count-queuing-strategy-integration.html] - type: testharness - [Can construct a readable stream with a valid CountQueuingStrategy] - expected: FAIL - - [Correctly governs a ReadableStreamController's desiredSize property (HWM = 0)] - expected: FAIL - - [Correctly governs a ReadableStreamController's desiredSize property (HWM = 1)] - expected: FAIL - - [Correctly governs a ReadableStreamController's desiredSize property (HWM = 4)] - expected: FAIL - diff --git a/testing/web-platform/meta/streams/readable-streams/count-queuing-strategy-integration.serviceworker.https.html.ini b/testing/web-platform/meta/streams/readable-streams/count-queuing-strategy-integration.serviceworker.https.html.ini deleted file mode 100644 index 824cc5772376..000000000000 --- a/testing/web-platform/meta/streams/readable-streams/count-queuing-strategy-integration.serviceworker.https.html.ini +++ /dev/null @@ -1,14 +0,0 @@ -[count-queuing-strategy-integration.serviceworker.https.html] - type: testharness - [Can construct a readable stream with a valid CountQueuingStrategy] - expected: FAIL - - [Correctly governs a ReadableStreamController's desiredSize property (HWM = 0)] - expected: FAIL - - [Correctly governs a ReadableStreamController's desiredSize property (HWM = 1)] - expected: FAIL - - [Correctly governs a ReadableStreamController's desiredSize property (HWM = 4)] - expected: FAIL - diff --git a/testing/web-platform/meta/streams/readable-streams/count-queuing-strategy-integration.sharedworker.html.ini b/testing/web-platform/meta/streams/readable-streams/count-queuing-strategy-integration.sharedworker.html.ini deleted file mode 100644 index 9a3463695d0b..000000000000 --- a/testing/web-platform/meta/streams/readable-streams/count-queuing-strategy-integration.sharedworker.html.ini +++ /dev/null @@ -1,14 +0,0 @@ -[count-queuing-strategy-integration.sharedworker.html] - type: testharness - [Can construct a readable stream with a valid CountQueuingStrategy] - expected: FAIL - - [Correctly governs a ReadableStreamController's desiredSize property (HWM = 0)] - expected: FAIL - - [Correctly governs a ReadableStreamController's desiredSize property (HWM = 1)] - expected: FAIL - - [Correctly governs a ReadableStreamController's desiredSize property (HWM = 4)] - expected: FAIL - diff --git a/testing/web-platform/meta/streams/readable-streams/default-reader.dedicatedworker.html.ini b/testing/web-platform/meta/streams/readable-streams/default-reader.dedicatedworker.html.ini deleted file mode 100644 index c7612a98438b..000000000000 --- a/testing/web-platform/meta/streams/readable-streams/default-reader.dedicatedworker.html.ini +++ /dev/null @@ -1,77 +0,0 @@ -[default-reader.dedicatedworker.html] - type: testharness - [Can get the ReadableStreamDefaultReader constructor indirectly] - expected: FAIL - - [ReadableStreamDefaultReader instances should have the correct list of properties] - expected: FAIL - - [ReadableStreamDefaultReader closed should always return the same promise object] - expected: FAIL - - [Constructing a ReadableStreamDefaultReader directly should fail if the stream is already locked (via direct construction)] - expected: FAIL - - [Getting a ReadableStreamDefaultReader via getReader should fail if the stream is already locked (via direct construction)] - expected: FAIL - - [Constructing a ReadableStreamDefaultReader directly should fail if the stream is already locked (via getReader)] - expected: FAIL - - [Getting a ReadableStreamDefaultReader via getReader should fail if the stream is already locked (via getReader)] - expected: FAIL - - [Constructing a ReadableStreamDefaultReader directly should be OK if the stream is closed] - expected: FAIL - - [Constructing a ReadableStreamDefaultReader directly should be OK if the stream is errored] - expected: FAIL - - [Reading from a reader for an empty stream will wait until a chunk is available] - expected: FAIL - - [cancel() on a reader does not release the reader] - expected: FAIL - - [closed should be fulfilled after stream is closed (.closed access before acquiring)] - expected: FAIL - - [closed should be rejected after reader releases its lock (multiple stream locks)] - expected: FAIL - - [Multiple readers can access the stream in sequence] - expected: FAIL - - [Cannot use an already-released reader to unlock a stream again] - expected: FAIL - - [cancel() on a released reader is a no-op and does not pass through] - expected: FAIL - - [Getting a second reader after erroring the stream and releasing the reader should succeed] - expected: FAIL - - [ReadableStreamDefaultReader closed promise should be rejected with undefined if that is the error] - expected: FAIL - - [ReadableStreamDefaultReader: if start rejects with no parameter, it should error the stream with an undefined error] - expected: FAIL - - [Erroring a ReadableStream after checking closed should reject ReadableStreamDefaultReader closed promise] - expected: FAIL - - [Erroring a ReadableStream before checking closed should reject ReadableStreamDefaultReader closed promise] - expected: FAIL - - [Reading twice on a stream that gets closed] - expected: FAIL - - [Reading twice on a closed stream] - expected: FAIL - - [Reading twice on an errored stream] - expected: FAIL - - [Reading twice on a stream that gets errored] - expected: FAIL - diff --git a/testing/web-platform/meta/streams/readable-streams/default-reader.html.ini b/testing/web-platform/meta/streams/readable-streams/default-reader.html.ini deleted file mode 100644 index 183e1f8d9f5d..000000000000 --- a/testing/web-platform/meta/streams/readable-streams/default-reader.html.ini +++ /dev/null @@ -1,77 +0,0 @@ -[default-reader.html] - type: testharness - [Can get the ReadableStreamDefaultReader constructor indirectly] - expected: FAIL - - [ReadableStreamDefaultReader instances should have the correct list of properties] - expected: FAIL - - [ReadableStreamDefaultReader closed should always return the same promise object] - expected: FAIL - - [Constructing a ReadableStreamDefaultReader directly should fail if the stream is already locked (via direct construction)] - expected: FAIL - - [Getting a ReadableStreamDefaultReader via getReader should fail if the stream is already locked (via direct construction)] - expected: FAIL - - [Constructing a ReadableStreamDefaultReader directly should fail if the stream is already locked (via getReader)] - expected: FAIL - - [Getting a ReadableStreamDefaultReader via getReader should fail if the stream is already locked (via getReader)] - expected: FAIL - - [Constructing a ReadableStreamDefaultReader directly should be OK if the stream is closed] - expected: FAIL - - [Constructing a ReadableStreamDefaultReader directly should be OK if the stream is errored] - expected: FAIL - - [Reading from a reader for an empty stream will wait until a chunk is available] - expected: FAIL - - [cancel() on a reader does not release the reader] - expected: FAIL - - [closed should be fulfilled after stream is closed (.closed access before acquiring)] - expected: FAIL - - [closed should be rejected after reader releases its lock (multiple stream locks)] - expected: FAIL - - [Multiple readers can access the stream in sequence] - expected: FAIL - - [Cannot use an already-released reader to unlock a stream again] - expected: FAIL - - [cancel() on a released reader is a no-op and does not pass through] - expected: FAIL - - [Getting a second reader after erroring the stream and releasing the reader should succeed] - expected: FAIL - - [ReadableStreamDefaultReader closed promise should be rejected with undefined if that is the error] - expected: FAIL - - [ReadableStreamDefaultReader: if start rejects with no parameter, it should error the stream with an undefined error] - expected: FAIL - - [Erroring a ReadableStream after checking closed should reject ReadableStreamDefaultReader closed promise] - expected: FAIL - - [Erroring a ReadableStream before checking closed should reject ReadableStreamDefaultReader closed promise] - expected: FAIL - - [Reading twice on a stream that gets closed] - expected: FAIL - - [Reading twice on a closed stream] - expected: FAIL - - [Reading twice on an errored stream] - expected: FAIL - - [Reading twice on a stream that gets errored] - expected: FAIL - diff --git a/testing/web-platform/meta/streams/readable-streams/default-reader.serviceworker.https.html.ini b/testing/web-platform/meta/streams/readable-streams/default-reader.serviceworker.https.html.ini deleted file mode 100644 index 48b84f67ee3c..000000000000 --- a/testing/web-platform/meta/streams/readable-streams/default-reader.serviceworker.https.html.ini +++ /dev/null @@ -1,77 +0,0 @@ -[default-reader.serviceworker.https.html] - type: testharness - [Can get the ReadableStreamDefaultReader constructor indirectly] - expected: FAIL - - [ReadableStreamDefaultReader instances should have the correct list of properties] - expected: FAIL - - [ReadableStreamDefaultReader closed should always return the same promise object] - expected: FAIL - - [Constructing a ReadableStreamDefaultReader directly should fail if the stream is already locked (via direct construction)] - expected: FAIL - - [Getting a ReadableStreamDefaultReader via getReader should fail if the stream is already locked (via direct construction)] - expected: FAIL - - [Constructing a ReadableStreamDefaultReader directly should fail if the stream is already locked (via getReader)] - expected: FAIL - - [Getting a ReadableStreamDefaultReader via getReader should fail if the stream is already locked (via getReader)] - expected: FAIL - - [Constructing a ReadableStreamDefaultReader directly should be OK if the stream is closed] - expected: FAIL - - [Constructing a ReadableStreamDefaultReader directly should be OK if the stream is errored] - expected: FAIL - - [Reading from a reader for an empty stream will wait until a chunk is available] - expected: FAIL - - [cancel() on a reader does not release the reader] - expected: FAIL - - [closed should be fulfilled after stream is closed (.closed access before acquiring)] - expected: FAIL - - [closed should be rejected after reader releases its lock (multiple stream locks)] - expected: FAIL - - [Multiple readers can access the stream in sequence] - expected: FAIL - - [Cannot use an already-released reader to unlock a stream again] - expected: FAIL - - [cancel() on a released reader is a no-op and does not pass through] - expected: FAIL - - [Getting a second reader after erroring the stream and releasing the reader should succeed] - expected: FAIL - - [ReadableStreamDefaultReader closed promise should be rejected with undefined if that is the error] - expected: FAIL - - [ReadableStreamDefaultReader: if start rejects with no parameter, it should error the stream with an undefined error] - expected: FAIL - - [Erroring a ReadableStream after checking closed should reject ReadableStreamDefaultReader closed promise] - expected: FAIL - - [Erroring a ReadableStream before checking closed should reject ReadableStreamDefaultReader closed promise] - expected: FAIL - - [Reading twice on a stream that gets closed] - expected: FAIL - - [Reading twice on a closed stream] - expected: FAIL - - [Reading twice on an errored stream] - expected: FAIL - - [Reading twice on a stream that gets errored] - expected: FAIL - diff --git a/testing/web-platform/meta/streams/readable-streams/default-reader.sharedworker.html.ini b/testing/web-platform/meta/streams/readable-streams/default-reader.sharedworker.html.ini deleted file mode 100644 index 90fc592ef0a2..000000000000 --- a/testing/web-platform/meta/streams/readable-streams/default-reader.sharedworker.html.ini +++ /dev/null @@ -1,77 +0,0 @@ -[default-reader.sharedworker.html] - type: testharness - [Can get the ReadableStreamDefaultReader constructor indirectly] - expected: FAIL - - [ReadableStreamDefaultReader instances should have the correct list of properties] - expected: FAIL - - [ReadableStreamDefaultReader closed should always return the same promise object] - expected: FAIL - - [Constructing a ReadableStreamDefaultReader directly should fail if the stream is already locked (via direct construction)] - expected: FAIL - - [Getting a ReadableStreamDefaultReader via getReader should fail if the stream is already locked (via direct construction)] - expected: FAIL - - [Constructing a ReadableStreamDefaultReader directly should fail if the stream is already locked (via getReader)] - expected: FAIL - - [Getting a ReadableStreamDefaultReader via getReader should fail if the stream is already locked (via getReader)] - expected: FAIL - - [Constructing a ReadableStreamDefaultReader directly should be OK if the stream is closed] - expected: FAIL - - [Constructing a ReadableStreamDefaultReader directly should be OK if the stream is errored] - expected: FAIL - - [Reading from a reader for an empty stream will wait until a chunk is available] - expected: FAIL - - [cancel() on a reader does not release the reader] - expected: FAIL - - [closed should be fulfilled after stream is closed (.closed access before acquiring)] - expected: FAIL - - [closed should be rejected after reader releases its lock (multiple stream locks)] - expected: FAIL - - [Multiple readers can access the stream in sequence] - expected: FAIL - - [Cannot use an already-released reader to unlock a stream again] - expected: FAIL - - [cancel() on a released reader is a no-op and does not pass through] - expected: FAIL - - [Getting a second reader after erroring the stream and releasing the reader should succeed] - expected: FAIL - - [ReadableStreamDefaultReader closed promise should be rejected with undefined if that is the error] - expected: FAIL - - [ReadableStreamDefaultReader: if start rejects with no parameter, it should error the stream with an undefined error] - expected: FAIL - - [Erroring a ReadableStream after checking closed should reject ReadableStreamDefaultReader closed promise] - expected: FAIL - - [Erroring a ReadableStream before checking closed should reject ReadableStreamDefaultReader closed promise] - expected: FAIL - - [Reading twice on a stream that gets closed] - expected: FAIL - - [Reading twice on a closed stream] - expected: FAIL - - [Reading twice on an errored stream] - expected: FAIL - - [Reading twice on a stream that gets errored] - expected: FAIL - diff --git a/testing/web-platform/meta/streams/readable-streams/floating-point-total-queue-size.dedicatedworker.html.ini b/testing/web-platform/meta/streams/readable-streams/floating-point-total-queue-size.dedicatedworker.html.ini deleted file mode 100644 index c38640e030b9..000000000000 --- a/testing/web-platform/meta/streams/readable-streams/floating-point-total-queue-size.dedicatedworker.html.ini +++ /dev/null @@ -1,14 +0,0 @@ -[floating-point-total-queue-size.dedicatedworker.html] - type: testharness - [Floating point arithmetic must manifest near NUMBER.MAX_SAFE_INTEGER (total ends up positive)] - expected: FAIL - - [Floating point arithmetic must manifest near 0 (total ends up positive, but clamped)] - expected: FAIL - - [Floating point arithmetic must manifest near 0 (total ends up positive, and not clamped)] - expected: FAIL - - [Floating point arithmetic must manifest near 0 (total ends up zero)] - expected: FAIL - diff --git a/testing/web-platform/meta/streams/readable-streams/floating-point-total-queue-size.html.ini b/testing/web-platform/meta/streams/readable-streams/floating-point-total-queue-size.html.ini deleted file mode 100644 index e57d995fee82..000000000000 --- a/testing/web-platform/meta/streams/readable-streams/floating-point-total-queue-size.html.ini +++ /dev/null @@ -1,14 +0,0 @@ -[floating-point-total-queue-size.html] - type: testharness - [Floating point arithmetic must manifest near NUMBER.MAX_SAFE_INTEGER (total ends up positive)] - expected: FAIL - - [Floating point arithmetic must manifest near 0 (total ends up positive, but clamped)] - expected: FAIL - - [Floating point arithmetic must manifest near 0 (total ends up positive, and not clamped)] - expected: FAIL - - [Floating point arithmetic must manifest near 0 (total ends up zero)] - expected: FAIL - diff --git a/testing/web-platform/meta/streams/readable-streams/floating-point-total-queue-size.serviceworker.https.html.ini b/testing/web-platform/meta/streams/readable-streams/floating-point-total-queue-size.serviceworker.https.html.ini deleted file mode 100644 index 1c4e92642880..000000000000 --- a/testing/web-platform/meta/streams/readable-streams/floating-point-total-queue-size.serviceworker.https.html.ini +++ /dev/null @@ -1,14 +0,0 @@ -[floating-point-total-queue-size.serviceworker.https.html] - type: testharness - [Floating point arithmetic must manifest near NUMBER.MAX_SAFE_INTEGER (total ends up positive)] - expected: FAIL - - [Floating point arithmetic must manifest near 0 (total ends up positive, but clamped)] - expected: FAIL - - [Floating point arithmetic must manifest near 0 (total ends up positive, and not clamped)] - expected: FAIL - - [Floating point arithmetic must manifest near 0 (total ends up zero)] - expected: FAIL - diff --git a/testing/web-platform/meta/streams/readable-streams/floating-point-total-queue-size.sharedworker.html.ini b/testing/web-platform/meta/streams/readable-streams/floating-point-total-queue-size.sharedworker.html.ini deleted file mode 100644 index ec413da7d2cd..000000000000 --- a/testing/web-platform/meta/streams/readable-streams/floating-point-total-queue-size.sharedworker.html.ini +++ /dev/null @@ -1,14 +0,0 @@ -[floating-point-total-queue-size.sharedworker.html] - type: testharness - [Floating point arithmetic must manifest near NUMBER.MAX_SAFE_INTEGER (total ends up positive)] - expected: FAIL - - [Floating point arithmetic must manifest near 0 (total ends up positive, but clamped)] - expected: FAIL - - [Floating point arithmetic must manifest near 0 (total ends up positive, and not clamped)] - expected: FAIL - - [Floating point arithmetic must manifest near 0 (total ends up zero)] - expected: FAIL - diff --git a/testing/web-platform/meta/streams/readable-streams/garbage-collection.dedicatedworker.html.ini b/testing/web-platform/meta/streams/readable-streams/garbage-collection.dedicatedworker.html.ini index 4e4994fbe6a2..73176ba4cfa8 100644 --- a/testing/web-platform/meta/streams/readable-streams/garbage-collection.dedicatedworker.html.ini +++ b/testing/web-platform/meta/streams/readable-streams/garbage-collection.dedicatedworker.html.ini @@ -1,17 +1,5 @@ [garbage-collection.dedicatedworker.html] type: testharness - [ReadableStreamController methods should continue working properly when scripts lose their reference to the readable stream] - expected: FAIL - - [ReadableStream closed promise should fulfill even if the stream and reader JS references are lost] - expected: FAIL - - [ReadableStream closed promise should reject even if stream and reader JS references are lost] - expected: FAIL - [Garbage-collecting a ReadableStreamReader should not unlock its stream] expected: FAIL - [Garbage-collecting a ReadableStreamDefaultReader should not unlock its stream] - expected: FAIL - diff --git a/testing/web-platform/meta/streams/readable-streams/garbage-collection.html.ini b/testing/web-platform/meta/streams/readable-streams/garbage-collection.html.ini index e808c413376c..0249a9c1620c 100644 --- a/testing/web-platform/meta/streams/readable-streams/garbage-collection.html.ini +++ b/testing/web-platform/meta/streams/readable-streams/garbage-collection.html.ini @@ -1,17 +1,5 @@ [garbage-collection.html] type: testharness - [ReadableStreamController methods should continue working properly when scripts lose their reference to the readable stream] - expected: FAIL - - [ReadableStream closed promise should fulfill even if the stream and reader JS references are lost] - expected: FAIL - - [ReadableStream closed promise should reject even if stream and reader JS references are lost] - expected: FAIL - [Garbage-collecting a ReadableStreamReader should not unlock its stream] expected: FAIL - [Garbage-collecting a ReadableStreamDefaultReader should not unlock its stream] - expected: FAIL - diff --git a/testing/web-platform/meta/streams/readable-streams/garbage-collection.serviceworker.https.html.ini b/testing/web-platform/meta/streams/readable-streams/garbage-collection.serviceworker.https.html.ini index 13233d907883..e2e7ab240de2 100644 --- a/testing/web-platform/meta/streams/readable-streams/garbage-collection.serviceworker.https.html.ini +++ b/testing/web-platform/meta/streams/readable-streams/garbage-collection.serviceworker.https.html.ini @@ -1,17 +1,5 @@ [garbage-collection.serviceworker.https.html] type: testharness - [ReadableStreamController methods should continue working properly when scripts lose their reference to the readable stream] - expected: FAIL - - [ReadableStream closed promise should fulfill even if the stream and reader JS references are lost] - expected: FAIL - - [ReadableStream closed promise should reject even if stream and reader JS references are lost] - expected: FAIL - [Garbage-collecting a ReadableStreamReader should not unlock its stream] expected: FAIL - [Garbage-collecting a ReadableStreamDefaultReader should not unlock its stream] - expected: FAIL - diff --git a/testing/web-platform/meta/streams/readable-streams/garbage-collection.sharedworker.html.ini b/testing/web-platform/meta/streams/readable-streams/garbage-collection.sharedworker.html.ini index 9118788dace8..2254ba7a5357 100644 --- a/testing/web-platform/meta/streams/readable-streams/garbage-collection.sharedworker.html.ini +++ b/testing/web-platform/meta/streams/readable-streams/garbage-collection.sharedworker.html.ini @@ -1,17 +1,5 @@ [garbage-collection.sharedworker.html] type: testharness - [ReadableStreamController methods should continue working properly when scripts lose their reference to the readable stream] - expected: FAIL - - [ReadableStream closed promise should fulfill even if the stream and reader JS references are lost] - expected: FAIL - - [ReadableStream closed promise should reject even if stream and reader JS references are lost] - expected: FAIL - [Garbage-collecting a ReadableStreamReader should not unlock its stream] expected: FAIL - [Garbage-collecting a ReadableStreamDefaultReader should not unlock its stream] - expected: FAIL - diff --git a/testing/web-platform/meta/streams/readable-streams/general.dedicatedworker.html.ini b/testing/web-platform/meta/streams/readable-streams/general.dedicatedworker.html.ini deleted file mode 100644 index ed0ecae5ec13..000000000000 --- a/testing/web-platform/meta/streams/readable-streams/general.dedicatedworker.html.ini +++ /dev/null @@ -1,116 +0,0 @@ -[general.dedicatedworker.html] - type: testharness - [ReadableStream can be constructed with no errors] - expected: FAIL - - [ReadableStream can't be constructed with garbage] - expected: FAIL - - [ReadableStream can't be constructed with an invalid type] - expected: FAIL - - [ReadableStream instances should have the correct list of properties] - expected: FAIL - - [ReadableStream constructor should throw for non-function start arguments] - expected: FAIL - - [ReadableStream constructor can get initial garbage as cancel argument] - expected: FAIL - - [ReadableStream constructor can get initial garbage as pull argument] - expected: FAIL - - [ReadableStream start should be called with the proper parameters] - expected: FAIL - - [ReadableStream start controller parameter should be extensible] - expected: FAIL - - [ReadableStream should be able to call start method within prototype chain of its source] - expected: FAIL - - [ReadableStream start should be able to return a promise] - expected: FAIL - - [ReadableStream start should be able to return a promise and reject it] - expected: FAIL - - [ReadableStream should be able to enqueue different objects.] - expected: FAIL - - [ReadableStream: if pull rejects, it should error the stream] - expected: FAIL - - [ReadableStream: should only call pull once upon starting the stream] - expected: FAIL - - [ReadableStream: should call pull when trying to read from a started, empty stream] - expected: FAIL - - [ReadableStream: should only call pull once on a non-empty stream read from before start fulfills] - expected: FAIL - - [ReadableStream: should only call pull once on a non-empty stream read from after start fulfills] - expected: FAIL - - [ReadableStream: should call pull in reaction to read()ing the last chunk, if not draining] - expected: FAIL - - [ReadableStream: should not call pull() in reaction to read()ing the last chunk, if draining] - expected: FAIL - - [ReadableStream: should not call pull until the previous pull call's promise fulfills] - expected: FAIL - - [ReadableStream: should pull after start, and after every read] - expected: FAIL - - [ReadableStream: should not call pull after start if the stream is now closed] - expected: FAIL - - [ReadableStream: should call pull after enqueueing from inside pull (with no read requests), if strategy allows] - expected: FAIL - - [ReadableStream pull should be able to close a stream.] - expected: FAIL - - [ReadableStream pull should be able to error a stream.] - expected: FAIL - - [ReadableStream pull should be able to error a stream and throw.] - expected: FAIL - - [ReadableStream: enqueue should throw when the stream is readable but draining] - expected: FAIL - - [ReadableStream: enqueue should throw when the stream is closed] - expected: FAIL - - [ReadableStream: should call underlying source methods as methods] - expected: FAIL - - [ReadableStream strategies: the default strategy should give desiredSize of 1 to start, decreasing by 1 per enqueue] - expected: FAIL - - [ReadableStream strategies: the default strategy should continue giving desiredSize of 1 if the chunks are read immediately] - expected: FAIL - - [ReadableStream integration test: adapting a random push source] - expected: FAIL - - [ReadableStream integration test: adapting a sync pull source] - expected: FAIL - - [ReadableStream integration test: adapting an async pull source] - expected: FAIL - - [ReadableStream: desiredSize when closed] - expected: FAIL - - [ReadableStream: desiredSize when errored] - expected: FAIL - - [default ReadableStream getReader() should only accept mode:undefined] - expected: FAIL - diff --git a/testing/web-platform/meta/streams/readable-streams/general.html.ini b/testing/web-platform/meta/streams/readable-streams/general.html.ini deleted file mode 100644 index d26726d8e9ac..000000000000 --- a/testing/web-platform/meta/streams/readable-streams/general.html.ini +++ /dev/null @@ -1,116 +0,0 @@ -[general.html] - type: testharness - [ReadableStream can be constructed with no errors] - expected: FAIL - - [ReadableStream can't be constructed with garbage] - expected: FAIL - - [ReadableStream can't be constructed with an invalid type] - expected: FAIL - - [ReadableStream instances should have the correct list of properties] - expected: FAIL - - [ReadableStream constructor should throw for non-function start arguments] - expected: FAIL - - [ReadableStream constructor can get initial garbage as cancel argument] - expected: FAIL - - [ReadableStream constructor can get initial garbage as pull argument] - expected: FAIL - - [ReadableStream start should be called with the proper parameters] - expected: FAIL - - [ReadableStream start controller parameter should be extensible] - expected: FAIL - - [ReadableStream should be able to call start method within prototype chain of its source] - expected: FAIL - - [ReadableStream start should be able to return a promise] - expected: FAIL - - [ReadableStream start should be able to return a promise and reject it] - expected: FAIL - - [ReadableStream should be able to enqueue different objects.] - expected: FAIL - - [ReadableStream: if pull rejects, it should error the stream] - expected: FAIL - - [ReadableStream: should only call pull once upon starting the stream] - expected: FAIL - - [ReadableStream: should call pull when trying to read from a started, empty stream] - expected: FAIL - - [ReadableStream: should only call pull once on a non-empty stream read from before start fulfills] - expected: FAIL - - [ReadableStream: should only call pull once on a non-empty stream read from after start fulfills] - expected: FAIL - - [ReadableStream: should call pull in reaction to read()ing the last chunk, if not draining] - expected: FAIL - - [ReadableStream: should not call pull() in reaction to read()ing the last chunk, if draining] - expected: FAIL - - [ReadableStream: should not call pull until the previous pull call's promise fulfills] - expected: FAIL - - [ReadableStream: should pull after start, and after every read] - expected: FAIL - - [ReadableStream: should not call pull after start if the stream is now closed] - expected: FAIL - - [ReadableStream: should call pull after enqueueing from inside pull (with no read requests), if strategy allows] - expected: FAIL - - [ReadableStream pull should be able to close a stream.] - expected: FAIL - - [ReadableStream pull should be able to error a stream.] - expected: FAIL - - [ReadableStream pull should be able to error a stream and throw.] - expected: FAIL - - [ReadableStream: enqueue should throw when the stream is readable but draining] - expected: FAIL - - [ReadableStream: enqueue should throw when the stream is closed] - expected: FAIL - - [ReadableStream: should call underlying source methods as methods] - expected: FAIL - - [ReadableStream strategies: the default strategy should give desiredSize of 1 to start, decreasing by 1 per enqueue] - expected: FAIL - - [ReadableStream strategies: the default strategy should continue giving desiredSize of 1 if the chunks are read immediately] - expected: FAIL - - [ReadableStream integration test: adapting a random push source] - expected: FAIL - - [ReadableStream integration test: adapting a sync pull source] - expected: FAIL - - [ReadableStream integration test: adapting an async pull source] - expected: FAIL - - [ReadableStream: desiredSize when closed] - expected: FAIL - - [ReadableStream: desiredSize when errored] - expected: FAIL - - [default ReadableStream getReader() should only accept mode:undefined] - expected: FAIL - diff --git a/testing/web-platform/meta/streams/readable-streams/general.serviceworker.https.html.ini b/testing/web-platform/meta/streams/readable-streams/general.serviceworker.https.html.ini deleted file mode 100644 index dd5d945087be..000000000000 --- a/testing/web-platform/meta/streams/readable-streams/general.serviceworker.https.html.ini +++ /dev/null @@ -1,116 +0,0 @@ -[general.serviceworker.https.html] - type: testharness - [ReadableStream can be constructed with no errors] - expected: FAIL - - [ReadableStream can't be constructed with garbage] - expected: FAIL - - [ReadableStream can't be constructed with an invalid type] - expected: FAIL - - [ReadableStream instances should have the correct list of properties] - expected: FAIL - - [ReadableStream constructor should throw for non-function start arguments] - expected: FAIL - - [ReadableStream constructor can get initial garbage as cancel argument] - expected: FAIL - - [ReadableStream constructor can get initial garbage as pull argument] - expected: FAIL - - [ReadableStream start should be called with the proper parameters] - expected: FAIL - - [ReadableStream start controller parameter should be extensible] - expected: FAIL - - [ReadableStream should be able to call start method within prototype chain of its source] - expected: FAIL - - [ReadableStream start should be able to return a promise] - expected: FAIL - - [ReadableStream start should be able to return a promise and reject it] - expected: FAIL - - [ReadableStream should be able to enqueue different objects.] - expected: FAIL - - [ReadableStream: if pull rejects, it should error the stream] - expected: FAIL - - [ReadableStream: should only call pull once upon starting the stream] - expected: FAIL - - [ReadableStream: should call pull when trying to read from a started, empty stream] - expected: FAIL - - [ReadableStream: should only call pull once on a non-empty stream read from before start fulfills] - expected: FAIL - - [ReadableStream: should only call pull once on a non-empty stream read from after start fulfills] - expected: FAIL - - [ReadableStream: should call pull in reaction to read()ing the last chunk, if not draining] - expected: FAIL - - [ReadableStream: should not call pull() in reaction to read()ing the last chunk, if draining] - expected: FAIL - - [ReadableStream: should not call pull until the previous pull call's promise fulfills] - expected: FAIL - - [ReadableStream: should pull after start, and after every read] - expected: FAIL - - [ReadableStream: should not call pull after start if the stream is now closed] - expected: FAIL - - [ReadableStream: should call pull after enqueueing from inside pull (with no read requests), if strategy allows] - expected: FAIL - - [ReadableStream pull should be able to close a stream.] - expected: FAIL - - [ReadableStream pull should be able to error a stream.] - expected: FAIL - - [ReadableStream pull should be able to error a stream and throw.] - expected: FAIL - - [ReadableStream: enqueue should throw when the stream is readable but draining] - expected: FAIL - - [ReadableStream: enqueue should throw when the stream is closed] - expected: FAIL - - [ReadableStream: should call underlying source methods as methods] - expected: FAIL - - [ReadableStream strategies: the default strategy should give desiredSize of 1 to start, decreasing by 1 per enqueue] - expected: FAIL - - [ReadableStream strategies: the default strategy should continue giving desiredSize of 1 if the chunks are read immediately] - expected: FAIL - - [ReadableStream integration test: adapting a random push source] - expected: FAIL - - [ReadableStream integration test: adapting a sync pull source] - expected: FAIL - - [ReadableStream integration test: adapting an async pull source] - expected: FAIL - - [ReadableStream: desiredSize when closed] - expected: FAIL - - [ReadableStream: desiredSize when errored] - expected: FAIL - - [default ReadableStream getReader() should only accept mode:undefined] - expected: FAIL - diff --git a/testing/web-platform/meta/streams/readable-streams/general.sharedworker.html.ini b/testing/web-platform/meta/streams/readable-streams/general.sharedworker.html.ini deleted file mode 100644 index eb5b0e6e2c41..000000000000 --- a/testing/web-platform/meta/streams/readable-streams/general.sharedworker.html.ini +++ /dev/null @@ -1,116 +0,0 @@ -[general.sharedworker.html] - type: testharness - [ReadableStream can be constructed with no errors] - expected: FAIL - - [ReadableStream can't be constructed with garbage] - expected: FAIL - - [ReadableStream can't be constructed with an invalid type] - expected: FAIL - - [ReadableStream instances should have the correct list of properties] - expected: FAIL - - [ReadableStream constructor should throw for non-function start arguments] - expected: FAIL - - [ReadableStream constructor can get initial garbage as cancel argument] - expected: FAIL - - [ReadableStream constructor can get initial garbage as pull argument] - expected: FAIL - - [ReadableStream start should be called with the proper parameters] - expected: FAIL - - [ReadableStream start controller parameter should be extensible] - expected: FAIL - - [ReadableStream should be able to call start method within prototype chain of its source] - expected: FAIL - - [ReadableStream start should be able to return a promise] - expected: FAIL - - [ReadableStream start should be able to return a promise and reject it] - expected: FAIL - - [ReadableStream should be able to enqueue different objects.] - expected: FAIL - - [ReadableStream: if pull rejects, it should error the stream] - expected: FAIL - - [ReadableStream: should only call pull once upon starting the stream] - expected: FAIL - - [ReadableStream: should call pull when trying to read from a started, empty stream] - expected: FAIL - - [ReadableStream: should only call pull once on a non-empty stream read from before start fulfills] - expected: FAIL - - [ReadableStream: should only call pull once on a non-empty stream read from after start fulfills] - expected: FAIL - - [ReadableStream: should call pull in reaction to read()ing the last chunk, if not draining] - expected: FAIL - - [ReadableStream: should not call pull() in reaction to read()ing the last chunk, if draining] - expected: FAIL - - [ReadableStream: should not call pull until the previous pull call's promise fulfills] - expected: FAIL - - [ReadableStream: should pull after start, and after every read] - expected: FAIL - - [ReadableStream: should not call pull after start if the stream is now closed] - expected: FAIL - - [ReadableStream: should call pull after enqueueing from inside pull (with no read requests), if strategy allows] - expected: FAIL - - [ReadableStream pull should be able to close a stream.] - expected: FAIL - - [ReadableStream pull should be able to error a stream.] - expected: FAIL - - [ReadableStream pull should be able to error a stream and throw.] - expected: FAIL - - [ReadableStream: enqueue should throw when the stream is readable but draining] - expected: FAIL - - [ReadableStream: enqueue should throw when the stream is closed] - expected: FAIL - - [ReadableStream: should call underlying source methods as methods] - expected: FAIL - - [ReadableStream strategies: the default strategy should give desiredSize of 1 to start, decreasing by 1 per enqueue] - expected: FAIL - - [ReadableStream strategies: the default strategy should continue giving desiredSize of 1 if the chunks are read immediately] - expected: FAIL - - [ReadableStream integration test: adapting a random push source] - expected: FAIL - - [ReadableStream integration test: adapting a sync pull source] - expected: FAIL - - [ReadableStream integration test: adapting an async pull source] - expected: FAIL - - [ReadableStream: desiredSize when closed] - expected: FAIL - - [ReadableStream: desiredSize when errored] - expected: FAIL - - [default ReadableStream getReader() should only accept mode:undefined] - expected: FAIL - diff --git a/testing/web-platform/meta/streams/readable-streams/pipe-through.dedicatedworker.html.ini b/testing/web-platform/meta/streams/readable-streams/pipe-through.dedicatedworker.html.ini index f37fd1f76332..979a3455226e 100644 --- a/testing/web-platform/meta/streams/readable-streams/pipe-through.dedicatedworker.html.ini +++ b/testing/web-platform/meta/streams/readable-streams/pipe-through.dedicatedworker.html.ini @@ -3,12 +3,6 @@ [ReadableStream.prototype.pipeThrough should work generically on its this and its arguments] expected: FAIL - [ReadableStream.prototype.pipeThrough should throw when its first argument is not convertible to an object] - expected: FAIL - - [ReadableStream.prototype.pipeThrough should throw when "this" has no pipeTo method] - expected: FAIL - [ReadableStream.prototype.pipeThrough should rethrow errors from accessing pipeTo, readable, or writable] expected: FAIL diff --git a/testing/web-platform/meta/streams/readable-streams/pipe-through.html.ini b/testing/web-platform/meta/streams/readable-streams/pipe-through.html.ini index 78c05471c155..971f2fcb53b8 100644 --- a/testing/web-platform/meta/streams/readable-streams/pipe-through.html.ini +++ b/testing/web-platform/meta/streams/readable-streams/pipe-through.html.ini @@ -3,12 +3,6 @@ [ReadableStream.prototype.pipeThrough should work generically on its this and its arguments] expected: FAIL - [ReadableStream.prototype.pipeThrough should throw when its first argument is not convertible to an object] - expected: FAIL - - [ReadableStream.prototype.pipeThrough should throw when "this" has no pipeTo method] - expected: FAIL - [ReadableStream.prototype.pipeThrough should rethrow errors from accessing pipeTo, readable, or writable] expected: FAIL diff --git a/testing/web-platform/meta/streams/readable-streams/pipe-through.serviceworker.https.html.ini b/testing/web-platform/meta/streams/readable-streams/pipe-through.serviceworker.https.html.ini index 288eed9aae4c..81a9c7891846 100644 --- a/testing/web-platform/meta/streams/readable-streams/pipe-through.serviceworker.https.html.ini +++ b/testing/web-platform/meta/streams/readable-streams/pipe-through.serviceworker.https.html.ini @@ -3,12 +3,6 @@ [ReadableStream.prototype.pipeThrough should work generically on its this and its arguments] expected: FAIL - [ReadableStream.prototype.pipeThrough should throw when its first argument is not convertible to an object] - expected: FAIL - - [ReadableStream.prototype.pipeThrough should throw when "this" has no pipeTo method] - expected: FAIL - [ReadableStream.prototype.pipeThrough should rethrow errors from accessing pipeTo, readable, or writable] expected: FAIL diff --git a/testing/web-platform/meta/streams/readable-streams/pipe-through.sharedworker.html.ini b/testing/web-platform/meta/streams/readable-streams/pipe-through.sharedworker.html.ini index 060a53e23ce9..9a02d7234c38 100644 --- a/testing/web-platform/meta/streams/readable-streams/pipe-through.sharedworker.html.ini +++ b/testing/web-platform/meta/streams/readable-streams/pipe-through.sharedworker.html.ini @@ -3,12 +3,6 @@ [ReadableStream.prototype.pipeThrough should work generically on its this and its arguments] expected: FAIL - [ReadableStream.prototype.pipeThrough should throw when its first argument is not convertible to an object] - expected: FAIL - - [ReadableStream.prototype.pipeThrough should throw when "this" has no pipeTo method] - expected: FAIL - [ReadableStream.prototype.pipeThrough should rethrow errors from accessing pipeTo, readable, or writable] expected: FAIL diff --git a/testing/web-platform/meta/streams/readable-streams/tee.dedicatedworker.html.ini b/testing/web-platform/meta/streams/readable-streams/tee.dedicatedworker.html.ini deleted file mode 100644 index 7c1fe19ac9fe..000000000000 --- a/testing/web-platform/meta/streams/readable-streams/tee.dedicatedworker.html.ini +++ /dev/null @@ -1,32 +0,0 @@ -[tee.dedicatedworker.html] - type: testharness - [ReadableStream teeing: rs.tee() returns an array of two ReadableStreams] - expected: FAIL - - [ReadableStream teeing: should be able to read one branch to the end without affecting the other] - expected: FAIL - - [ReadableStream teeing: values should be equal across each branch] - expected: FAIL - - [ReadableStream teeing: errors in the source should propagate to both branches] - expected: FAIL - - [ReadableStream teeing: canceling branch1 should not impact branch2] - expected: FAIL - - [ReadableStream teeing: canceling branch2 should not impact branch2] - expected: FAIL - - [ReadableStream teeing: canceling both branches should aggregate the cancel reasons into an array] - expected: FAIL - - [ReadableStream teeing: failing to cancel the original stream should cause cancel() to reject on branches] - expected: FAIL - - [ReadableStream teeing: closing the original should immediately close the branches] - expected: FAIL - - [ReadableStream teeing: erroring the original should immediately error the branches] - expected: FAIL - diff --git a/testing/web-platform/meta/streams/readable-streams/tee.html.ini b/testing/web-platform/meta/streams/readable-streams/tee.html.ini deleted file mode 100644 index 8cd0066b525a..000000000000 --- a/testing/web-platform/meta/streams/readable-streams/tee.html.ini +++ /dev/null @@ -1,32 +0,0 @@ -[tee.html] - type: testharness - [ReadableStream teeing: rs.tee() returns an array of two ReadableStreams] - expected: FAIL - - [ReadableStream teeing: should be able to read one branch to the end without affecting the other] - expected: FAIL - - [ReadableStream teeing: values should be equal across each branch] - expected: FAIL - - [ReadableStream teeing: errors in the source should propagate to both branches] - expected: FAIL - - [ReadableStream teeing: canceling branch1 should not impact branch2] - expected: FAIL - - [ReadableStream teeing: canceling branch2 should not impact branch2] - expected: FAIL - - [ReadableStream teeing: canceling both branches should aggregate the cancel reasons into an array] - expected: FAIL - - [ReadableStream teeing: failing to cancel the original stream should cause cancel() to reject on branches] - expected: FAIL - - [ReadableStream teeing: closing the original should immediately close the branches] - expected: FAIL - - [ReadableStream teeing: erroring the original should immediately error the branches] - expected: FAIL - diff --git a/testing/web-platform/meta/streams/readable-streams/tee.serviceworker.https.html.ini b/testing/web-platform/meta/streams/readable-streams/tee.serviceworker.https.html.ini deleted file mode 100644 index bbf5d350f036..000000000000 --- a/testing/web-platform/meta/streams/readable-streams/tee.serviceworker.https.html.ini +++ /dev/null @@ -1,32 +0,0 @@ -[tee.serviceworker.https.html] - type: testharness - [ReadableStream teeing: rs.tee() returns an array of two ReadableStreams] - expected: FAIL - - [ReadableStream teeing: should be able to read one branch to the end without affecting the other] - expected: FAIL - - [ReadableStream teeing: values should be equal across each branch] - expected: FAIL - - [ReadableStream teeing: errors in the source should propagate to both branches] - expected: FAIL - - [ReadableStream teeing: canceling branch1 should not impact branch2] - expected: FAIL - - [ReadableStream teeing: canceling branch2 should not impact branch2] - expected: FAIL - - [ReadableStream teeing: canceling both branches should aggregate the cancel reasons into an array] - expected: FAIL - - [ReadableStream teeing: failing to cancel the original stream should cause cancel() to reject on branches] - expected: FAIL - - [ReadableStream teeing: closing the original should immediately close the branches] - expected: FAIL - - [ReadableStream teeing: erroring the original should immediately error the branches] - expected: FAIL - diff --git a/testing/web-platform/meta/streams/readable-streams/tee.sharedworker.html.ini b/testing/web-platform/meta/streams/readable-streams/tee.sharedworker.html.ini deleted file mode 100644 index cbe878fd04f5..000000000000 --- a/testing/web-platform/meta/streams/readable-streams/tee.sharedworker.html.ini +++ /dev/null @@ -1,32 +0,0 @@ -[tee.sharedworker.html] - type: testharness - [ReadableStream teeing: rs.tee() returns an array of two ReadableStreams] - expected: FAIL - - [ReadableStream teeing: should be able to read one branch to the end without affecting the other] - expected: FAIL - - [ReadableStream teeing: values should be equal across each branch] - expected: FAIL - - [ReadableStream teeing: errors in the source should propagate to both branches] - expected: FAIL - - [ReadableStream teeing: canceling branch1 should not impact branch2] - expected: FAIL - - [ReadableStream teeing: canceling branch2 should not impact branch2] - expected: FAIL - - [ReadableStream teeing: canceling both branches should aggregate the cancel reasons into an array] - expected: FAIL - - [ReadableStream teeing: failing to cancel the original stream should cause cancel() to reject on branches] - expected: FAIL - - [ReadableStream teeing: closing the original should immediately close the branches] - expected: FAIL - - [ReadableStream teeing: erroring the original should immediately error the branches] - expected: FAIL - diff --git a/testing/web-platform/meta/streams/readable-streams/templated.dedicatedworker.html.ini b/testing/web-platform/meta/streams/readable-streams/templated.dedicatedworker.html.ini index 74458f3da147..ea72339ad1f3 100644 --- a/testing/web-platform/meta/streams/readable-streams/templated.dedicatedworker.html.ini +++ b/testing/web-platform/meta/streams/readable-streams/templated.dedicatedworker.html.ini @@ -117,216 +117,3 @@ [reader's closed property always returns the same promise] expected: FAIL - [ReadableStream (empty): instances have the correct methods and properties] - expected: FAIL - - [ReadableStream (empty): calling getReader with invalid arguments should throw appropriate errors] - expected: FAIL - - [ReadableStream (empty) reader: instances have the correct methods and properties] - expected: FAIL - - [ReadableStream (empty) reader: locked should be true] - expected: FAIL - - [ReadableStream (empty) reader: read() should never settle] - expected: FAIL - - [ReadableStream (empty) reader: two read()s should both never settle] - expected: FAIL - - [ReadableStream (empty) reader: read() should return distinct promises each time] - expected: FAIL - - [ReadableStream (empty) reader: getReader() again on the stream should fail] - expected: FAIL - - [ReadableStream (empty) reader: releasing the lock with pending read requests should throw but the read requests should stay pending] - expected: FAIL - - [ReadableStream (empty) reader: releasing the lock should cause further read() calls to reject with a TypeError] - expected: FAIL - - [ReadableStream (empty) reader: releasing the lock should cause closed calls to reject with a TypeError] - expected: FAIL - - [ReadableStream (empty) reader: releasing the lock should cause locked to become false] - expected: FAIL - - [ReadableStream (empty) reader: canceling via the reader should cause the reader to act closed] - expected: FAIL - - [ReadableStream (empty) reader: canceling via the stream should fail] - expected: FAIL - - [ReadableStream (closed via call in start): cancel() should return a distinct fulfilled promise each time] - expected: FAIL - - [ReadableStream (closed via call in start): locked should be false] - expected: FAIL - - [ReadableStream (closed via call in start): getReader() should be OK] - expected: FAIL - - [ReadableStream (closed via call in start): should be able to acquire multiple readers if they are released in succession] - expected: FAIL - - [ReadableStream (closed via call in start): should not be able to acquire a second reader if we don't release the first one] - expected: FAIL - - [ReadableStream reader (closed before getting reader): read() should fulfill with { value: undefined, done: true }] - expected: FAIL - - [ReadableStream reader (closed before getting reader): read() multiple times should fulfill with { value: undefined, done: true }] - expected: FAIL - - [ReadableStream reader (closed before getting reader): read() should work when used within another read() fulfill callback] - expected: FAIL - - [ReadableStream reader (closed before getting reader): closed should fulfill with undefined] - expected: FAIL - - [ReadableStream reader (closed before getting reader): releasing the lock should cause closed to reject and change identity] - expected: FAIL - - [ReadableStream reader (closed before getting reader): cancel() should return a distinct fulfilled promise each time] - expected: FAIL - - [ReadableStream reader (closed after getting reader): read() should fulfill with { value: undefined, done: true }] - expected: FAIL - - [ReadableStream reader (closed after getting reader): read() multiple times should fulfill with { value: undefined, done: true }] - expected: FAIL - - [ReadableStream reader (closed after getting reader): read() should work when used within another read() fulfill callback] - expected: FAIL - - [ReadableStream reader (closed after getting reader): closed should fulfill with undefined] - expected: FAIL - - [ReadableStream reader (closed after getting reader): releasing the lock should cause closed to reject and change identity] - expected: FAIL - - [ReadableStream reader (closed after getting reader): cancel() should return a distinct fulfilled promise each time] - expected: FAIL - - [ReadableStream (closed via cancel): cancel() should return a distinct fulfilled promise each time] - expected: FAIL - - [ReadableStream (closed via cancel): locked should be false] - expected: FAIL - - [ReadableStream (closed via cancel): getReader() should be OK] - expected: FAIL - - [ReadableStream (closed via cancel): should be able to acquire multiple readers if they are released in succession] - expected: FAIL - - [ReadableStream (closed via cancel): should not be able to acquire a second reader if we don't release the first one] - expected: FAIL - - [ReadableStream reader (closed via cancel after getting reader): read() should fulfill with { value: undefined, done: true }] - expected: FAIL - - [ReadableStream reader (closed via cancel after getting reader): read() multiple times should fulfill with { value: undefined, done: true }] - expected: FAIL - - [ReadableStream reader (closed via cancel after getting reader): read() should work when used within another read() fulfill callback] - expected: FAIL - - [ReadableStream reader (closed via cancel after getting reader): closed should fulfill with undefined] - expected: FAIL - - [ReadableStream reader (closed via cancel after getting reader): releasing the lock should cause closed to reject and change identity] - expected: FAIL - - [ReadableStream reader (closed via cancel after getting reader): cancel() should return a distinct fulfilled promise each time] - expected: FAIL - - [ReadableStream (errored via call in start): getReader() should return a reader that acts errored] - expected: FAIL - - [ReadableStream (errored via call in start): read() twice should give the error each time] - expected: FAIL - - [ReadableStream (errored via call in start): locked should be false] - expected: FAIL - - [ReadableStream (errored via call in start): should be able to obtain a second reader, with the correct closed promise] - expected: FAIL - - [ReadableStream (errored via call in start): should not be able to obtain additional readers if we don't release the first lock] - expected: FAIL - - [ReadableStream (errored via call in start): cancel() should return a distinct rejected promise each time] - expected: FAIL - - [ReadableStream (errored via call in start): reader cancel() should return a distinct rejected promise each time] - expected: FAIL - - [ReadableStream (errored via returning a rejected promise in start): getReader() should return a reader that acts errored] - expected: FAIL - - [ReadableStream (errored via returning a rejected promise in start): read() twice should give the error each time] - expected: FAIL - - [ReadableStream (errored via returning a rejected promise in start): locked should be false] - expected: FAIL - - [ReadableStream (errored via returning a rejected promise in start) reader: closed should reject with the error] - expected: FAIL - - [ReadableStream (errored via returning a rejected promise in start) reader: releasing the lock should cause closed to reject and change identity] - expected: FAIL - - [ReadableStream (errored via returning a rejected promise in start) reader: read() should reject with the error] - expected: FAIL - - [ReadableStream reader (errored before getting reader): closed should reject with the error] - expected: FAIL - - [ReadableStream reader (errored before getting reader): releasing the lock should cause closed to reject and change identity] - expected: FAIL - - [ReadableStream reader (errored before getting reader): read() should reject with the error] - expected: FAIL - - [ReadableStream reader (errored after getting reader): closed should reject with the error] - expected: FAIL - - [ReadableStream reader (errored after getting reader): releasing the lock should cause closed to reject and change identity] - expected: FAIL - - [ReadableStream reader (errored after getting reader): read() should reject with the error] - expected: FAIL - - [ReadableStream (two chunks enqueued, still open) reader: calling read() twice without waiting will eventually give both chunks (sequential)] - expected: FAIL - - [ReadableStream (two chunks enqueued, still open) reader: calling read() twice without waiting will eventually give both chunks (nested)] - expected: FAIL - - [ReadableStream (two chunks enqueued, still open) reader: read() should return distinct promises each time] - expected: FAIL - - [ReadableStream (two chunks enqueued, still open) reader: cancel() after a read() should still give that single read result] - expected: FAIL - - [ReadableStream (two chunks enqueued, then closed) reader: third read(), without waiting, should give { value: undefined, done: true } (sequential)] - expected: FAIL - - [ReadableStream (two chunks enqueued, then closed) reader: third read(), without waiting, should give { value: undefined, done: true } (nested)] - expected: FAIL - - [ReadableStream (two chunks enqueued, then closed) reader: draining the stream via read() should cause the reader closed promise to fulfill, but locked stays true] - expected: FAIL - - [ReadableStream (two chunks enqueued, then closed) reader: releasing the lock after the stream is closed should cause locked to become false] - expected: FAIL - - [ReadableStream (two chunks enqueued, then closed) reader: releasing the lock should cause further read() calls to reject with a TypeError] - expected: FAIL - - [ReadableStream (two chunks enqueued, then closed) reader: reader's closed property always returns the same promise] - expected: FAIL - diff --git a/testing/web-platform/meta/streams/readable-streams/templated.html.ini b/testing/web-platform/meta/streams/readable-streams/templated.html.ini index 046885d2a458..e69de29bb2d1 100644 --- a/testing/web-platform/meta/streams/readable-streams/templated.html.ini +++ b/testing/web-platform/meta/streams/readable-streams/templated.html.ini @@ -1,332 +0,0 @@ -[templated.html] - type: testharness - [instances have the correct methods and properties] - expected: FAIL - - [calling getReader with invalid arguments should throw appropriate errors] - expected: FAIL - - [locked should be true] - expected: FAIL - - [read() should never settle] - expected: FAIL - - [two read()s should both never settle] - expected: FAIL - - [read() should return distinct promises each time] - expected: FAIL - - [getReader() again on the stream should fail] - expected: FAIL - - [releasing the lock with pending read requests should throw but the read requests should stay pending] - expected: FAIL - - [releasing the lock should cause further read() calls to reject with a TypeError] - expected: FAIL - - [releasing the lock should cause closed calls to reject with a TypeError] - expected: FAIL - - [releasing the lock should cause locked to become false] - expected: FAIL - - [canceling via the reader should cause the reader to act closed] - expected: FAIL - - [canceling via the stream should fail] - expected: FAIL - - [cancel() should return a distinct fulfilled promise each time] - expected: FAIL - - [locked should be false] - expected: FAIL - - [getReader() should be OK] - expected: FAIL - - [should be able to acquire multiple readers if they are released in succession] - expected: FAIL - - [should not be able to acquire a second reader if we don't release the first one] - expected: FAIL - - [read() should fulfill with { value: undefined, done: true }] - expected: FAIL - - [read() multiple times should fulfill with { value: undefined, done: true }] - expected: FAIL - - [read() should work when used within another read() fulfill callback] - expected: FAIL - - [closed should fulfill with undefined] - expected: FAIL - - [releasing the lock should cause closed to reject and change identity] - expected: FAIL - - [getReader() should return a reader that acts errored] - expected: FAIL - - [read() twice should give the error each time] - expected: FAIL - - [should be able to obtain a second reader, with the correct closed promise] - expected: FAIL - - [should not be able to obtain additional readers if we don't release the first lock] - expected: FAIL - - [cancel() should return a distinct rejected promise each time] - expected: FAIL - - [reader cancel() should return a distinct rejected promise each time] - expected: FAIL - - [closed should reject with the error] - expected: FAIL - - [read() should reject with the error] - expected: FAIL - - [calling read() twice without waiting will eventually give both chunks (sequential)] - expected: FAIL - - [calling read() twice without waiting will eventually give both chunks (nested)] - expected: FAIL - - [cancel() after a read() should still give that single read result] - expected: FAIL - - [third read(), without waiting, should give { value: undefined, done: true } (sequential)] - expected: FAIL - - [third read(), without waiting, should give { value: undefined, done: true } (nested)] - expected: FAIL - - [draining the stream via read() should cause the reader closed promise to fulfill, but locked stays true] - expected: FAIL - - [releasing the lock after the stream is closed should cause locked to become false] - expected: FAIL - - [reader's closed property always returns the same promise] - expected: FAIL - - [ReadableStream (empty): instances have the correct methods and properties] - expected: FAIL - - [ReadableStream (empty): calling getReader with invalid arguments should throw appropriate errors] - expected: FAIL - - [ReadableStream (empty) reader: instances have the correct methods and properties] - expected: FAIL - - [ReadableStream (empty) reader: locked should be true] - expected: FAIL - - [ReadableStream (empty) reader: read() should never settle] - expected: FAIL - - [ReadableStream (empty) reader: two read()s should both never settle] - expected: FAIL - - [ReadableStream (empty) reader: read() should return distinct promises each time] - expected: FAIL - - [ReadableStream (empty) reader: getReader() again on the stream should fail] - expected: FAIL - - [ReadableStream (empty) reader: releasing the lock with pending read requests should throw but the read requests should stay pending] - expected: FAIL - - [ReadableStream (empty) reader: releasing the lock should cause further read() calls to reject with a TypeError] - expected: FAIL - - [ReadableStream (empty) reader: releasing the lock should cause closed calls to reject with a TypeError] - expected: FAIL - - [ReadableStream (empty) reader: releasing the lock should cause locked to become false] - expected: FAIL - - [ReadableStream (empty) reader: canceling via the reader should cause the reader to act closed] - expected: FAIL - - [ReadableStream (empty) reader: canceling via the stream should fail] - expected: FAIL - - [ReadableStream (closed via call in start): cancel() should return a distinct fulfilled promise each time] - expected: FAIL - - [ReadableStream (closed via call in start): locked should be false] - expected: FAIL - - [ReadableStream (closed via call in start): getReader() should be OK] - expected: FAIL - - [ReadableStream (closed via call in start): should be able to acquire multiple readers if they are released in succession] - expected: FAIL - - [ReadableStream (closed via call in start): should not be able to acquire a second reader if we don't release the first one] - expected: FAIL - - [ReadableStream reader (closed before getting reader): read() should fulfill with { value: undefined, done: true }] - expected: FAIL - - [ReadableStream reader (closed before getting reader): read() multiple times should fulfill with { value: undefined, done: true }] - expected: FAIL - - [ReadableStream reader (closed before getting reader): read() should work when used within another read() fulfill callback] - expected: FAIL - - [ReadableStream reader (closed before getting reader): closed should fulfill with undefined] - expected: FAIL - - [ReadableStream reader (closed before getting reader): releasing the lock should cause closed to reject and change identity] - expected: FAIL - - [ReadableStream reader (closed before getting reader): cancel() should return a distinct fulfilled promise each time] - expected: FAIL - - [ReadableStream reader (closed after getting reader): read() should fulfill with { value: undefined, done: true }] - expected: FAIL - - [ReadableStream reader (closed after getting reader): read() multiple times should fulfill with { value: undefined, done: true }] - expected: FAIL - - [ReadableStream reader (closed after getting reader): read() should work when used within another read() fulfill callback] - expected: FAIL - - [ReadableStream reader (closed after getting reader): closed should fulfill with undefined] - expected: FAIL - - [ReadableStream reader (closed after getting reader): releasing the lock should cause closed to reject and change identity] - expected: FAIL - - [ReadableStream reader (closed after getting reader): cancel() should return a distinct fulfilled promise each time] - expected: FAIL - - [ReadableStream (closed via cancel): cancel() should return a distinct fulfilled promise each time] - expected: FAIL - - [ReadableStream (closed via cancel): locked should be false] - expected: FAIL - - [ReadableStream (closed via cancel): getReader() should be OK] - expected: FAIL - - [ReadableStream (closed via cancel): should be able to acquire multiple readers if they are released in succession] - expected: FAIL - - [ReadableStream (closed via cancel): should not be able to acquire a second reader if we don't release the first one] - expected: FAIL - - [ReadableStream reader (closed via cancel after getting reader): read() should fulfill with { value: undefined, done: true }] - expected: FAIL - - [ReadableStream reader (closed via cancel after getting reader): read() multiple times should fulfill with { value: undefined, done: true }] - expected: FAIL - - [ReadableStream reader (closed via cancel after getting reader): read() should work when used within another read() fulfill callback] - expected: FAIL - - [ReadableStream reader (closed via cancel after getting reader): closed should fulfill with undefined] - expected: FAIL - - [ReadableStream reader (closed via cancel after getting reader): releasing the lock should cause closed to reject and change identity] - expected: FAIL - - [ReadableStream reader (closed via cancel after getting reader): cancel() should return a distinct fulfilled promise each time] - expected: FAIL - - [ReadableStream (errored via call in start): getReader() should return a reader that acts errored] - expected: FAIL - - [ReadableStream (errored via call in start): read() twice should give the error each time] - expected: FAIL - - [ReadableStream (errored via call in start): locked should be false] - expected: FAIL - - [ReadableStream (errored via call in start): should be able to obtain a second reader, with the correct closed promise] - expected: FAIL - - [ReadableStream (errored via call in start): should not be able to obtain additional readers if we don't release the first lock] - expected: FAIL - - [ReadableStream (errored via call in start): cancel() should return a distinct rejected promise each time] - expected: FAIL - - [ReadableStream (errored via call in start): reader cancel() should return a distinct rejected promise each time] - expected: FAIL - - [ReadableStream (errored via returning a rejected promise in start): getReader() should return a reader that acts errored] - expected: FAIL - - [ReadableStream (errored via returning a rejected promise in start): read() twice should give the error each time] - expected: FAIL - - [ReadableStream (errored via returning a rejected promise in start): locked should be false] - expected: FAIL - - [ReadableStream (errored via returning a rejected promise in start) reader: closed should reject with the error] - expected: FAIL - - [ReadableStream (errored via returning a rejected promise in start) reader: releasing the lock should cause closed to reject and change identity] - expected: FAIL - - [ReadableStream (errored via returning a rejected promise in start) reader: read() should reject with the error] - expected: FAIL - - [ReadableStream reader (errored before getting reader): closed should reject with the error] - expected: FAIL - - [ReadableStream reader (errored before getting reader): releasing the lock should cause closed to reject and change identity] - expected: FAIL - - [ReadableStream reader (errored before getting reader): read() should reject with the error] - expected: FAIL - - [ReadableStream reader (errored after getting reader): closed should reject with the error] - expected: FAIL - - [ReadableStream reader (errored after getting reader): releasing the lock should cause closed to reject and change identity] - expected: FAIL - - [ReadableStream reader (errored after getting reader): read() should reject with the error] - expected: FAIL - - [ReadableStream (two chunks enqueued, still open) reader: calling read() twice without waiting will eventually give both chunks (sequential)] - expected: FAIL - - [ReadableStream (two chunks enqueued, still open) reader: calling read() twice without waiting will eventually give both chunks (nested)] - expected: FAIL - - [ReadableStream (two chunks enqueued, still open) reader: read() should return distinct promises each time] - expected: FAIL - - [ReadableStream (two chunks enqueued, still open) reader: cancel() after a read() should still give that single read result] - expected: FAIL - - [ReadableStream (two chunks enqueued, then closed) reader: third read(), without waiting, should give { value: undefined, done: true } (sequential)] - expected: FAIL - - [ReadableStream (two chunks enqueued, then closed) reader: third read(), without waiting, should give { value: undefined, done: true } (nested)] - expected: FAIL - - [ReadableStream (two chunks enqueued, then closed) reader: draining the stream via read() should cause the reader closed promise to fulfill, but locked stays true] - expected: FAIL - - [ReadableStream (two chunks enqueued, then closed) reader: releasing the lock after the stream is closed should cause locked to become false] - expected: FAIL - - [ReadableStream (two chunks enqueued, then closed) reader: releasing the lock should cause further read() calls to reject with a TypeError] - expected: FAIL - - [ReadableStream (two chunks enqueued, then closed) reader: reader's closed property always returns the same promise] - expected: FAIL - diff --git a/testing/web-platform/meta/streams/readable-streams/templated.serviceworker.https.html.ini b/testing/web-platform/meta/streams/readable-streams/templated.serviceworker.https.html.ini index 9ade2d44eabf..53e069a8edbd 100644 --- a/testing/web-platform/meta/streams/readable-streams/templated.serviceworker.https.html.ini +++ b/testing/web-platform/meta/streams/readable-streams/templated.serviceworker.https.html.ini @@ -117,216 +117,3 @@ [reader's closed property always returns the same promise] expected: FAIL - [ReadableStream (empty): instances have the correct methods and properties] - expected: FAIL - - [ReadableStream (empty): calling getReader with invalid arguments should throw appropriate errors] - expected: FAIL - - [ReadableStream (empty) reader: instances have the correct methods and properties] - expected: FAIL - - [ReadableStream (empty) reader: locked should be true] - expected: FAIL - - [ReadableStream (empty) reader: read() should never settle] - expected: FAIL - - [ReadableStream (empty) reader: two read()s should both never settle] - expected: FAIL - - [ReadableStream (empty) reader: read() should return distinct promises each time] - expected: FAIL - - [ReadableStream (empty) reader: getReader() again on the stream should fail] - expected: FAIL - - [ReadableStream (empty) reader: releasing the lock with pending read requests should throw but the read requests should stay pending] - expected: FAIL - - [ReadableStream (empty) reader: releasing the lock should cause further read() calls to reject with a TypeError] - expected: FAIL - - [ReadableStream (empty) reader: releasing the lock should cause closed calls to reject with a TypeError] - expected: FAIL - - [ReadableStream (empty) reader: releasing the lock should cause locked to become false] - expected: FAIL - - [ReadableStream (empty) reader: canceling via the reader should cause the reader to act closed] - expected: FAIL - - [ReadableStream (empty) reader: canceling via the stream should fail] - expected: FAIL - - [ReadableStream (closed via call in start): cancel() should return a distinct fulfilled promise each time] - expected: FAIL - - [ReadableStream (closed via call in start): locked should be false] - expected: FAIL - - [ReadableStream (closed via call in start): getReader() should be OK] - expected: FAIL - - [ReadableStream (closed via call in start): should be able to acquire multiple readers if they are released in succession] - expected: FAIL - - [ReadableStream (closed via call in start): should not be able to acquire a second reader if we don't release the first one] - expected: FAIL - - [ReadableStream reader (closed before getting reader): read() should fulfill with { value: undefined, done: true }] - expected: FAIL - - [ReadableStream reader (closed before getting reader): read() multiple times should fulfill with { value: undefined, done: true }] - expected: FAIL - - [ReadableStream reader (closed before getting reader): read() should work when used within another read() fulfill callback] - expected: FAIL - - [ReadableStream reader (closed before getting reader): closed should fulfill with undefined] - expected: FAIL - - [ReadableStream reader (closed before getting reader): releasing the lock should cause closed to reject and change identity] - expected: FAIL - - [ReadableStream reader (closed before getting reader): cancel() should return a distinct fulfilled promise each time] - expected: FAIL - - [ReadableStream reader (closed after getting reader): read() should fulfill with { value: undefined, done: true }] - expected: FAIL - - [ReadableStream reader (closed after getting reader): read() multiple times should fulfill with { value: undefined, done: true }] - expected: FAIL - - [ReadableStream reader (closed after getting reader): read() should work when used within another read() fulfill callback] - expected: FAIL - - [ReadableStream reader (closed after getting reader): closed should fulfill with undefined] - expected: FAIL - - [ReadableStream reader (closed after getting reader): releasing the lock should cause closed to reject and change identity] - expected: FAIL - - [ReadableStream reader (closed after getting reader): cancel() should return a distinct fulfilled promise each time] - expected: FAIL - - [ReadableStream (closed via cancel): cancel() should return a distinct fulfilled promise each time] - expected: FAIL - - [ReadableStream (closed via cancel): locked should be false] - expected: FAIL - - [ReadableStream (closed via cancel): getReader() should be OK] - expected: FAIL - - [ReadableStream (closed via cancel): should be able to acquire multiple readers if they are released in succession] - expected: FAIL - - [ReadableStream (closed via cancel): should not be able to acquire a second reader if we don't release the first one] - expected: FAIL - - [ReadableStream reader (closed via cancel after getting reader): read() should fulfill with { value: undefined, done: true }] - expected: FAIL - - [ReadableStream reader (closed via cancel after getting reader): read() multiple times should fulfill with { value: undefined, done: true }] - expected: FAIL - - [ReadableStream reader (closed via cancel after getting reader): read() should work when used within another read() fulfill callback] - expected: FAIL - - [ReadableStream reader (closed via cancel after getting reader): closed should fulfill with undefined] - expected: FAIL - - [ReadableStream reader (closed via cancel after getting reader): releasing the lock should cause closed to reject and change identity] - expected: FAIL - - [ReadableStream reader (closed via cancel after getting reader): cancel() should return a distinct fulfilled promise each time] - expected: FAIL - - [ReadableStream (errored via call in start): getReader() should return a reader that acts errored] - expected: FAIL - - [ReadableStream (errored via call in start): read() twice should give the error each time] - expected: FAIL - - [ReadableStream (errored via call in start): locked should be false] - expected: FAIL - - [ReadableStream (errored via call in start): should be able to obtain a second reader, with the correct closed promise] - expected: FAIL - - [ReadableStream (errored via call in start): should not be able to obtain additional readers if we don't release the first lock] - expected: FAIL - - [ReadableStream (errored via call in start): cancel() should return a distinct rejected promise each time] - expected: FAIL - - [ReadableStream (errored via call in start): reader cancel() should return a distinct rejected promise each time] - expected: FAIL - - [ReadableStream (errored via returning a rejected promise in start): getReader() should return a reader that acts errored] - expected: FAIL - - [ReadableStream (errored via returning a rejected promise in start): read() twice should give the error each time] - expected: FAIL - - [ReadableStream (errored via returning a rejected promise in start): locked should be false] - expected: FAIL - - [ReadableStream (errored via returning a rejected promise in start) reader: closed should reject with the error] - expected: FAIL - - [ReadableStream (errored via returning a rejected promise in start) reader: releasing the lock should cause closed to reject and change identity] - expected: FAIL - - [ReadableStream (errored via returning a rejected promise in start) reader: read() should reject with the error] - expected: FAIL - - [ReadableStream reader (errored before getting reader): closed should reject with the error] - expected: FAIL - - [ReadableStream reader (errored before getting reader): releasing the lock should cause closed to reject and change identity] - expected: FAIL - - [ReadableStream reader (errored before getting reader): read() should reject with the error] - expected: FAIL - - [ReadableStream reader (errored after getting reader): closed should reject with the error] - expected: FAIL - - [ReadableStream reader (errored after getting reader): releasing the lock should cause closed to reject and change identity] - expected: FAIL - - [ReadableStream reader (errored after getting reader): read() should reject with the error] - expected: FAIL - - [ReadableStream (two chunks enqueued, still open) reader: calling read() twice without waiting will eventually give both chunks (sequential)] - expected: FAIL - - [ReadableStream (two chunks enqueued, still open) reader: calling read() twice without waiting will eventually give both chunks (nested)] - expected: FAIL - - [ReadableStream (two chunks enqueued, still open) reader: read() should return distinct promises each time] - expected: FAIL - - [ReadableStream (two chunks enqueued, still open) reader: cancel() after a read() should still give that single read result] - expected: FAIL - - [ReadableStream (two chunks enqueued, then closed) reader: third read(), without waiting, should give { value: undefined, done: true } (sequential)] - expected: FAIL - - [ReadableStream (two chunks enqueued, then closed) reader: third read(), without waiting, should give { value: undefined, done: true } (nested)] - expected: FAIL - - [ReadableStream (two chunks enqueued, then closed) reader: draining the stream via read() should cause the reader closed promise to fulfill, but locked stays true] - expected: FAIL - - [ReadableStream (two chunks enqueued, then closed) reader: releasing the lock after the stream is closed should cause locked to become false] - expected: FAIL - - [ReadableStream (two chunks enqueued, then closed) reader: releasing the lock should cause further read() calls to reject with a TypeError] - expected: FAIL - - [ReadableStream (two chunks enqueued, then closed) reader: reader's closed property always returns the same promise] - expected: FAIL - diff --git a/testing/web-platform/meta/streams/readable-streams/templated.sharedworker.html.ini b/testing/web-platform/meta/streams/readable-streams/templated.sharedworker.html.ini index 37ea2788d330..0c967a1dedd0 100644 --- a/testing/web-platform/meta/streams/readable-streams/templated.sharedworker.html.ini +++ b/testing/web-platform/meta/streams/readable-streams/templated.sharedworker.html.ini @@ -117,216 +117,3 @@ [reader's closed property always returns the same promise] expected: FAIL - [ReadableStream (empty): instances have the correct methods and properties] - expected: FAIL - - [ReadableStream (empty): calling getReader with invalid arguments should throw appropriate errors] - expected: FAIL - - [ReadableStream (empty) reader: instances have the correct methods and properties] - expected: FAIL - - [ReadableStream (empty) reader: locked should be true] - expected: FAIL - - [ReadableStream (empty) reader: read() should never settle] - expected: FAIL - - [ReadableStream (empty) reader: two read()s should both never settle] - expected: FAIL - - [ReadableStream (empty) reader: read() should return distinct promises each time] - expected: FAIL - - [ReadableStream (empty) reader: getReader() again on the stream should fail] - expected: FAIL - - [ReadableStream (empty) reader: releasing the lock with pending read requests should throw but the read requests should stay pending] - expected: FAIL - - [ReadableStream (empty) reader: releasing the lock should cause further read() calls to reject with a TypeError] - expected: FAIL - - [ReadableStream (empty) reader: releasing the lock should cause closed calls to reject with a TypeError] - expected: FAIL - - [ReadableStream (empty) reader: releasing the lock should cause locked to become false] - expected: FAIL - - [ReadableStream (empty) reader: canceling via the reader should cause the reader to act closed] - expected: FAIL - - [ReadableStream (empty) reader: canceling via the stream should fail] - expected: FAIL - - [ReadableStream (closed via call in start): cancel() should return a distinct fulfilled promise each time] - expected: FAIL - - [ReadableStream (closed via call in start): locked should be false] - expected: FAIL - - [ReadableStream (closed via call in start): getReader() should be OK] - expected: FAIL - - [ReadableStream (closed via call in start): should be able to acquire multiple readers if they are released in succession] - expected: FAIL - - [ReadableStream (closed via call in start): should not be able to acquire a second reader if we don't release the first one] - expected: FAIL - - [ReadableStream reader (closed before getting reader): read() should fulfill with { value: undefined, done: true }] - expected: FAIL - - [ReadableStream reader (closed before getting reader): read() multiple times should fulfill with { value: undefined, done: true }] - expected: FAIL - - [ReadableStream reader (closed before getting reader): read() should work when used within another read() fulfill callback] - expected: FAIL - - [ReadableStream reader (closed before getting reader): closed should fulfill with undefined] - expected: FAIL - - [ReadableStream reader (closed before getting reader): releasing the lock should cause closed to reject and change identity] - expected: FAIL - - [ReadableStream reader (closed before getting reader): cancel() should return a distinct fulfilled promise each time] - expected: FAIL - - [ReadableStream reader (closed after getting reader): read() should fulfill with { value: undefined, done: true }] - expected: FAIL - - [ReadableStream reader (closed after getting reader): read() multiple times should fulfill with { value: undefined, done: true }] - expected: FAIL - - [ReadableStream reader (closed after getting reader): read() should work when used within another read() fulfill callback] - expected: FAIL - - [ReadableStream reader (closed after getting reader): closed should fulfill with undefined] - expected: FAIL - - [ReadableStream reader (closed after getting reader): releasing the lock should cause closed to reject and change identity] - expected: FAIL - - [ReadableStream reader (closed after getting reader): cancel() should return a distinct fulfilled promise each time] - expected: FAIL - - [ReadableStream (closed via cancel): cancel() should return a distinct fulfilled promise each time] - expected: FAIL - - [ReadableStream (closed via cancel): locked should be false] - expected: FAIL - - [ReadableStream (closed via cancel): getReader() should be OK] - expected: FAIL - - [ReadableStream (closed via cancel): should be able to acquire multiple readers if they are released in succession] - expected: FAIL - - [ReadableStream (closed via cancel): should not be able to acquire a second reader if we don't release the first one] - expected: FAIL - - [ReadableStream reader (closed via cancel after getting reader): read() should fulfill with { value: undefined, done: true }] - expected: FAIL - - [ReadableStream reader (closed via cancel after getting reader): read() multiple times should fulfill with { value: undefined, done: true }] - expected: FAIL - - [ReadableStream reader (closed via cancel after getting reader): read() should work when used within another read() fulfill callback] - expected: FAIL - - [ReadableStream reader (closed via cancel after getting reader): closed should fulfill with undefined] - expected: FAIL - - [ReadableStream reader (closed via cancel after getting reader): releasing the lock should cause closed to reject and change identity] - expected: FAIL - - [ReadableStream reader (closed via cancel after getting reader): cancel() should return a distinct fulfilled promise each time] - expected: FAIL - - [ReadableStream (errored via call in start): getReader() should return a reader that acts errored] - expected: FAIL - - [ReadableStream (errored via call in start): read() twice should give the error each time] - expected: FAIL - - [ReadableStream (errored via call in start): locked should be false] - expected: FAIL - - [ReadableStream (errored via call in start): should be able to obtain a second reader, with the correct closed promise] - expected: FAIL - - [ReadableStream (errored via call in start): should not be able to obtain additional readers if we don't release the first lock] - expected: FAIL - - [ReadableStream (errored via call in start): cancel() should return a distinct rejected promise each time] - expected: FAIL - - [ReadableStream (errored via call in start): reader cancel() should return a distinct rejected promise each time] - expected: FAIL - - [ReadableStream (errored via returning a rejected promise in start): getReader() should return a reader that acts errored] - expected: FAIL - - [ReadableStream (errored via returning a rejected promise in start): read() twice should give the error each time] - expected: FAIL - - [ReadableStream (errored via returning a rejected promise in start): locked should be false] - expected: FAIL - - [ReadableStream (errored via returning a rejected promise in start) reader: closed should reject with the error] - expected: FAIL - - [ReadableStream (errored via returning a rejected promise in start) reader: releasing the lock should cause closed to reject and change identity] - expected: FAIL - - [ReadableStream (errored via returning a rejected promise in start) reader: read() should reject with the error] - expected: FAIL - - [ReadableStream reader (errored before getting reader): closed should reject with the error] - expected: FAIL - - [ReadableStream reader (errored before getting reader): releasing the lock should cause closed to reject and change identity] - expected: FAIL - - [ReadableStream reader (errored before getting reader): read() should reject with the error] - expected: FAIL - - [ReadableStream reader (errored after getting reader): closed should reject with the error] - expected: FAIL - - [ReadableStream reader (errored after getting reader): releasing the lock should cause closed to reject and change identity] - expected: FAIL - - [ReadableStream reader (errored after getting reader): read() should reject with the error] - expected: FAIL - - [ReadableStream (two chunks enqueued, still open) reader: calling read() twice without waiting will eventually give both chunks (sequential)] - expected: FAIL - - [ReadableStream (two chunks enqueued, still open) reader: calling read() twice without waiting will eventually give both chunks (nested)] - expected: FAIL - - [ReadableStream (two chunks enqueued, still open) reader: read() should return distinct promises each time] - expected: FAIL - - [ReadableStream (two chunks enqueued, still open) reader: cancel() after a read() should still give that single read result] - expected: FAIL - - [ReadableStream (two chunks enqueued, then closed) reader: third read(), without waiting, should give { value: undefined, done: true } (sequential)] - expected: FAIL - - [ReadableStream (two chunks enqueued, then closed) reader: third read(), without waiting, should give { value: undefined, done: true } (nested)] - expected: FAIL - - [ReadableStream (two chunks enqueued, then closed) reader: draining the stream via read() should cause the reader closed promise to fulfill, but locked stays true] - expected: FAIL - - [ReadableStream (two chunks enqueued, then closed) reader: releasing the lock after the stream is closed should cause locked to become false] - expected: FAIL - - [ReadableStream (two chunks enqueued, then closed) reader: releasing the lock should cause further read() calls to reject with a TypeError] - expected: FAIL - - [ReadableStream (two chunks enqueued, then closed) reader: reader's closed property always returns the same promise] - expected: FAIL - diff --git a/testing/web-platform/meta/web-animations/animation-model/animation-types/accumulation-per-property.html.ini b/testing/web-platform/meta/web-animations/animation-model/animation-types/accumulation-per-property.html.ini index 9317975fe89f..cfaa933ee0d8 100644 --- a/testing/web-platform/meta/web-animations/animation-model/animation-types/accumulation-per-property.html.ini +++ b/testing/web-platform/meta/web-animations/animation-model/animation-types/accumulation-per-property.html.ini @@ -66,3 +66,4 @@ [stroke-dasharray: dasharray] expected: if stylo: FAIL + diff --git a/testing/web-platform/meta/web-animations/animation-model/animation-types/addition-per-property.html.ini b/testing/web-platform/meta/web-animations/animation-model/animation-types/addition-per-property.html.ini index 3df6fe513657..b37766822a5a 100644 --- a/testing/web-platform/meta/web-animations/animation-model/animation-types/addition-per-property.html.ini +++ b/testing/web-platform/meta/web-animations/animation-model/animation-types/addition-per-property.html.ini @@ -64,3 +64,4 @@ prefs: [layout.css.contain.enabled:true, layout.css.initial-letter.enabled:true, [stroke-dasharray: dasharray] expected: if stylo: FAIL + diff --git a/testing/web-platform/meta/web-animations/animation-model/animation-types/interpolation-per-property.html.ini b/testing/web-platform/meta/web-animations/animation-model/animation-types/interpolation-per-property.html.ini index 6fb84d11975c..136fa0b2e237 100644 --- a/testing/web-platform/meta/web-animations/animation-model/animation-types/interpolation-per-property.html.ini +++ b/testing/web-platform/meta/web-animations/animation-model/animation-types/interpolation-per-property.html.ini @@ -112,3 +112,4 @@ prefs: [layout.css.contain.enabled:true, layout.css.initial-letter.enabled:true, [shape-outside uses discrete animation when animating between "url("http://localhost/test-1")" and "url("http://localhost/test-2")" with keyframe easing] expected: if stylo: FAIL + diff --git a/testing/web-platform/meta/webrtc/RTCPeerConnection-addIceCandidate.html.ini b/testing/web-platform/meta/webrtc/RTCPeerConnection-addIceCandidate.html.ini index ef6cb0303b76..62887d04eeda 100644 --- a/testing/web-platform/meta/webrtc/RTCPeerConnection-addIceCandidate.html.ini +++ b/testing/web-platform/meta/webrtc/RTCPeerConnection-addIceCandidate.html.ini @@ -32,3 +32,4 @@ [Add valid candidate should never resolve when pc is closed] disabled: https://bugzilla.mozilla.org/show_bug.cgi?id=1382972 + diff --git a/testing/web-platform/meta/webrtc/RTCPeerConnection-generateCertificate.html.ini b/testing/web-platform/meta/webrtc/RTCPeerConnection-generateCertificate.html.ini index dc989e145d45..8179e00f3c7a 100644 --- a/testing/web-platform/meta/webrtc/RTCPeerConnection-generateCertificate.html.ini +++ b/testing/web-platform/meta/webrtc/RTCPeerConnection-generateCertificate.html.ini @@ -8,3 +8,4 @@ [generateCertificate() with 0 expires parameter should generate expired cert] disabled: https://bugzilla.mozilla.org/show_bug.cgi?id=1383137 + diff --git a/testing/web-platform/meta/webvtt/rendering/cues-with-video/processing-model/align_middle_position_lt_50.html.ini b/testing/web-platform/meta/webvtt/rendering/cues-with-video/processing-model/align_middle_position_lt_50.html.ini index 0375a6ca4fe8..21493ed85aba 100644 --- a/testing/web-platform/meta/webvtt/rendering/cues-with-video/processing-model/align_middle_position_lt_50.html.ini +++ b/testing/web-platform/meta/webvtt/rendering/cues-with-video/processing-model/align_middle_position_lt_50.html.ini @@ -1,3 +1,3 @@ [align_middle_position_lt_50.html] type: reftest - expected: FAIL \ No newline at end of file + expected: FAIL diff --git a/testing/web-platform/meta/workers/semantics/interface-objects/001.worker.js.ini b/testing/web-platform/meta/workers/semantics/interface-objects/001.worker.js.ini index 119b82581b42..98889dd67a4d 100644 --- a/testing/web-platform/meta/workers/semantics/interface-objects/001.worker.js.ini +++ b/testing/web-platform/meta/workers/semantics/interface-objects/001.worker.js.ini @@ -60,15 +60,6 @@ [The PromiseRejectionEvent interface object should be exposed.] expected: FAIL - [The ReadableStream interface object should be exposed.] - expected: FAIL - [The WritableStream interface object should be exposed.] expected: FAIL - [The ByteLengthQueuingStrategy interface object should be exposed.] - expected: FAIL - - [The CountQueuingStrategy interface object should be exposed.] - expected: FAIL - diff --git a/testing/web-platform/meta/workers/semantics/interface-objects/003.html.ini b/testing/web-platform/meta/workers/semantics/interface-objects/003.html.ini index 63b4b942b397..1f640922338b 100644 --- a/testing/web-platform/meta/workers/semantics/interface-objects/003.html.ini +++ b/testing/web-platform/meta/workers/semantics/interface-objects/003.html.ini @@ -18,15 +18,6 @@ [The PromiseRejectionEvent interface object should be exposed] expected: FAIL - [The ReadableStream interface object should be exposed] - expected: FAIL - [The WritableStream interface object should be exposed] expected: FAIL - [The ByteLengthQueuingStrategy interface object should be exposed] - expected: FAIL - - [The CountQueuingStrategy interface object should be exposed] - expected: FAIL -