Closed Bug 1528981 Opened 7 years ago Closed 7 years ago

[wpt-sync] Sync PR 15463 - Add missing tests for ReadableStream

Categories

(Core :: DOM: Core & HTML, enhancement, P4)

enhancement

Tracking

()

RESOLVED FIXED
mozilla68
Tracking Status
firefox68 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 15463 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/15463
Details from upstream follow.

Adam Rice <ricea@chromium.org> wrote:

Add missing tests for ReadableStream

  • Test the specific rejection returned by calling it.return() twice (to avoid
    being confused by assertions).
  • Verify that it.next() after it.return() fails.
  • Add brand checks for getIterator(), locked and desiredSize.
  • Verify that canceling tee branches in reverse order works.
  • Test that erroring a teed stream errors both branches, even when they
    are not waiting for chunks.
  • Verify that controller.close() clears the list of pending reads
PR 15463 applied with additional changes from upstream: de6f8fcf9b87e80811e9267a886cf891f6f864e0
Component: web-platform-tests → DOM
Product: Testing → Core
Ran 20 tests and 352 subtests OK : 16 PASS : 240 FAIL : 112 New tests that have failures or other problems: /streams/readable-streams/async-iterator.any.html Acquiring a reader after exhaustively async-iterating a stream: FAIL Acquiring a reader after partially async-iterating a stream: FAIL Acquiring a reader and reading the remaining chunks after partially async-iterating a stream with preventCancel = true: FAIL Async iterator instances should have the correct list of properties: FAIL Async-iterating a closed stream never executes the loop body, but works fine: FAIL Async-iterating a partially consumed stream: FAIL Async-iterating a pull source: FAIL Async-iterating a pull source manually: FAIL Async-iterating a push source: FAIL Async-iterating an empty but not closed/errored stream never executes the loop body and stalls the async function: FAIL Async-iterating an errored stream throws: FAIL Calling return() twice rejects: FAIL Cancellation behavior when breaking inside loop body; preventCancel = false: FAIL Cancellation behavior when breaking inside loop body; preventCancel = true: FAIL Cancellation behavior when manually calling return(); preventCancel = false: FAIL Cancellation behavior when manually calling return(); preventCancel = true: FAIL Cancellation behavior when returning inside loop body; preventCancel = false: FAIL Cancellation behavior when returning inside loop body; preventCancel = true: FAIL Cancellation behavior when throwing inside loop body; preventCancel = false: FAIL Cancellation behavior when throwing inside loop body; preventCancel = true: FAIL calling next() after return() should reject: FAIL calling return() while there are pending reads rejects: FAIL getIterator() throws if there's already a lock: FAIL next()'s fulfillment value has the right shape: FAIL /streams/readable-streams/async-iterator.any.js: SKIP /streams/readable-streams/async-iterator.any.serviceworker.html Acquiring a reader after exhaustively async-iterating a stream: FAIL Acquiring a reader after partially async-iterating a stream: FAIL Acquiring a reader and reading the remaining chunks after partially async-iterating a stream with preventCancel = true: FAIL Async iterator instances should have the correct list of properties: FAIL Async-iterating a closed stream never executes the loop body, but works fine: FAIL Async-iterating a partially consumed stream: FAIL Async-iterating a pull source: FAIL Async-iterating a pull source manually: FAIL Async-iterating a push source: FAIL Async-iterating an empty but not closed/errored stream never executes the loop body and stalls the async function: FAIL Async-iterating an errored stream throws: FAIL Calling return() twice rejects: FAIL Cancellation behavior when breaking inside loop body; preventCancel = false: FAIL Cancellation behavior when breaking inside loop body; preventCancel = true: FAIL Cancellation behavior when manually calling return(); preventCancel = false: FAIL Cancellation behavior when manually calling return(); preventCancel = true: FAIL Cancellation behavior when returning inside loop body; preventCancel = false: FAIL Cancellation behavior when returning inside loop body; preventCancel = true: FAIL Cancellation behavior when throwing inside loop body; preventCancel = false: FAIL Cancellation behavior when throwing inside loop body; preventCancel = true: FAIL calling next() after return() should reject: FAIL calling return() while there are pending reads rejects: FAIL getIterator() throws if there's already a lock: FAIL next()'s fulfillment value has the right shape: FAIL /streams/readable-streams/async-iterator.any.sharedworker.html Acquiring a reader after exhaustively async-iterating a stream: FAIL Acquiring a reader after partially async-iterating a stream: FAIL Acquiring a reader and reading the remaining chunks after partially async-iterating a stream with preventCancel = true: FAIL Async iterator instances should have the correct list of properties: FAIL Async-iterating a closed stream never executes the loop body, but works fine: FAIL Async-iterating a partially consumed stream: FAIL Async-iterating a pull source: FAIL Async-iterating a pull source manually: FAIL Async-iterating a push source: FAIL Async-iterating an empty but not closed/errored stream never executes the loop body and stalls the async function: FAIL Async-iterating an errored stream throws: FAIL Calling return() twice rejects: FAIL Cancellation behavior when breaking inside loop body; preventCancel = false: FAIL Cancellation behavior when breaking inside loop body; preventCancel = true: FAIL Cancellation behavior when manually calling return(); preventCancel = false: FAIL Cancellation behavior when manually calling return(); preventCancel = true: FAIL Cancellation behavior when returning inside loop body; preventCancel = false: FAIL Cancellation behavior when returning inside loop body; preventCancel = true: FAIL Cancellation behavior when throwing inside loop body; preventCancel = false: FAIL Cancellation behavior when throwing inside loop body; preventCancel = true: FAIL calling next() after return() should reject: FAIL calling return() while there are pending reads rejects: FAIL getIterator() throws if there's already a lock: FAIL next()'s fulfillment value has the right shape: FAIL /streams/readable-streams/async-iterator.any.worker.html Acquiring a reader after exhaustively async-iterating a stream: FAIL Acquiring a reader after partially async-iterating a stream: FAIL Acquiring a reader and reading the remaining chunks after partially async-iterating a stream with preventCancel = true: FAIL Async iterator instances should have the correct list of properties: FAIL Async-iterating a closed stream never executes the loop body, but works fine: FAIL Async-iterating a partially consumed stream: FAIL Async-iterating a pull source: FAIL Async-iterating a pull source manually: FAIL Async-iterating a push source: FAIL Async-iterating an empty but not closed/errored stream never executes the loop body and stalls the async function: FAIL Async-iterating an errored stream throws: FAIL Calling return() twice rejects: FAIL Cancellation behavior when breaking inside loop body; preventCancel = false: FAIL Cancellation behavior when breaking inside loop body; preventCancel = true: FAIL Cancellation behavior when manually calling return(); preventCancel = false: FAIL Cancellation behavior when manually calling return(); preventCancel = true: FAIL Cancellation behavior when returning inside loop body; preventCancel = false: FAIL Cancellation behavior when returning inside loop body; preventCancel = true: FAIL Cancellation behavior when throwing inside loop body; preventCancel = false: FAIL Cancellation behavior when throwing inside loop body; preventCancel = true: FAIL calling next() after return() should reject: FAIL calling return() while there are pending reads rejects: FAIL getIterator() throws if there's already a lock: FAIL next()'s fulfillment value has the right shape: FAIL /streams/readable-streams/brand-checks.any.html Can get ReadableStreamAsyncIteratorPrototype object indirectly: FAIL ReadableStream.prototype.getIterator enforces a brand check: FAIL ReadableStreamAsyncIteratorPrototype.next enforces a brand check: FAIL ReadableStreamAsyncIteratorPrototype.return enforces a brand check: FAIL /streams/readable-streams/brand-checks.any.serviceworker.html Can get ReadableStreamAsyncIteratorPrototype object indirectly: FAIL ReadableStream.prototype.getIterator enforces a brand check: FAIL ReadableStreamAsyncIteratorPrototype.next enforces a brand check: FAIL ReadableStreamAsyncIteratorPrototype.return enforces a brand check: FAIL /streams/readable-streams/brand-checks.any.sharedworker.html Can get ReadableStreamAsyncIteratorPrototype object indirectly: FAIL ReadableStream.prototype.getIterator enforces a brand check: FAIL ReadableStreamAsyncIteratorPrototype.next enforces a brand check: FAIL ReadableStreamAsyncIteratorPrototype.return enforces a brand check: FAIL /streams/readable-streams/brand-checks.any.worker.html Can get ReadableStreamAsyncIteratorPrototype object indirectly: FAIL ReadableStream.prototype.getIterator enforces a brand check: FAIL ReadableStreamAsyncIteratorPrototype.next enforces a brand check: FAIL ReadableStreamAsyncIteratorPrototype.return enforces a brand check: FAIL Tests that are disabled for instability: /streams/readable-streams/brand-checks.any.js /streams/readable-streams/default-reader.any.js /streams/readable-streams/tee.any.js
Component: DOM → DOM: Core & HTML
Pushed by james@hoppipolla.co.uk: https://hg.mozilla.org/integration/mozilla-inbound/rev/098230ae6287 [wpt PR 15463] - Add missing tests for ReadableStream, a=testonly
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
You need to log in before you can comment on or make changes to this bug.