Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Writable streams: test changes to abort() under error conditions #9917

Merged
merged 2 commits into from Mar 8, 2018

Conversation

Projects
None yet
4 participants
@domenic
Copy link
Member

domenic commented Mar 8, 2018

@ricea

ricea approved these changes Mar 8, 2018

Copy link
Contributor

ricea left a comment

lgtm with polite request.

promise_rejects(t, error1, writer.abort(undefined), 'first abort() must have matching rejection'),
promise_rejects(t, error1, writer.abort(undefined), 'second abort() must have matching rejection')
]);
}, 'WritableStream if sink\'s abort throws, the promise returned by multiple writer.abort()s reject');

This comment has been minimized.

Copy link
@ricea

ricea Mar 8, 2018

Contributor

I think it would also be good to have a check that the Promises returned are actually the same object. In fact, combining it into this test would probably be okay.

@ricea

This comment has been minimized.

Copy link
Contributor

ricea commented Mar 8, 2018

Nice.

@w3c-bots

This comment has been minimized.

Copy link

w3c-bots commented Mar 8, 2018

Build PASSED

Started: 2018-03-08 14:00:38
Finished: 2018-03-08 14:15:17

Failing Jobs

  • MicrosoftEdge:16.16299

Unstable Results

Browser: "Microsoftedge 16.16299" (failures allowed)

View in: WPT PR Status | TravisCI

Test Subtest Results Messages
/streams/writable-streams/aborting.html   TIMEOUT: 7
OK: 3
  Aborting a WritableStream after it is closed is a no-op PASS: 3
  Aborting a WritableStream before it starts should cause the writer's unsettled ready promise to reject PASS: 3
  Aborting a WritableStream causes any outstanding write() promises to be rejected with a TypeError PASS: 3
  Aborting a WritableStream immediately prevents future writes PASS: 3
  Aborting a WritableStream passes through the given reason PASS: 3
  Aborting a WritableStream prevents further writes after any that are in progress PASS: 3
  Aborting a WritableStream puts it in an errored state, with a TypeError as the stored error PASS: 3
  Aborting a WritableStream should cause the writer's fulfilled ready promise to reset to a rejected one PASS: 3
  abort() on a released writer rejects PASS: 3
  abort() should be rejected with the rejection returned from close() PASS: 3
  abort() should succeed despite rejection from write PASS: 3
  an abort() that happens during a write() should trigger the underlying abort() even with a close() queued PASS: 3
  a rejecting sink.write() should not prevent sink.abort() from being called PASS: 3
  calling abort() on an errored stream should fulfill with undefined FAIL: 3
promise_test: Unhandled rejection with value: object "error1: error1"
  .closed should not resolve before fulfilled write() PASS: 3
  .closed should not resolve before rejected write(); write() error should not overwrite abort() error PASS: 3
  close() should reject with TypeError when abort() is first error PASS: 3
  Closing a WritableStream and aborting it while it closes causes the stream to ignore the abort attempt PASS: 3
  Closing but then immediately aborting a WritableStream causes the stream to error PASS: 3
  controller.error(), writer.abort() while there is an in-flight close, and then finish the close PASS: 3
  controller.error(), writer.abort() while there is an in-flight write, and then finish the write PASS: 3
  Fulfillment value of ws.abort() call must be undefined even if the underlying sink returns a non-undefined value PASS: 3
  if a writer is created for a stream with a pending abort, its ready should be rejected with a TypeError PASS: 3
  if start attempts to error the controller after abort() has been called, then it should lose PASS: 3
  if underlying close() has started and then rejects, the abort() and close() promises should reject with the underlying close rejection reason PASS: 3
  promises returned from other writer methods should be rejected when writer abort() happens during sink start() PASS: 3
  releaseLock() during delayed async abort() should reject the writer.closed promise PASS: 3
  releaseLock() while aborting should reject the original closed promise FAIL: 3
promise_test: Unhandled rejection with value: object "TypeError: Failed to write."
  returning a thenable from abort() should work PASS: 3
  sink abort() should not be called if stream was erroring due to bad strategy before abort() was called FAIL: 3
assert_unreached: Should have rejected: abort() should reject Reached unreachable code
  sink abort() should not be called if stream was erroring due to controller.error() before abort() was called PASS: 3
  sink abort() should not be called until sink start() is done PASS: 3
  stream abort() promise should still resolve if sink start() rejects PASS: 3
  underlying abort() should not be called if underlying close() has started PASS: 3
  underlying abort() should not be called until underlying write() completes PASS: 3
  when calling abort() twice on the same stream, both should give the same promise that fulfills with undefined FAIL: 3
assert_equals: the promises must be the same expected object "[object Promise]" but got object "[object Promise]"
  when calling abort() twice on the same stream, but sequentially so so there's no pending abort the second time, both should fulfill with undefined FAIL: 3
promise_test: Unhandled rejection with value: object "TypeError: UnderlyingSink abort() threw an exception."
  when start errors after stream abort(), underlying sink abort() should be called anyway PASS: 3
  WritableStream if sink's abort throws, for an abort performed during a write, the promise returned by ws.abort() rejects PASS: 3
  WritableStream if sink's abort throws, the promise returned by multiple writer.abort()s is the same and rejects FAIL: 3
assert_equals: the promises must be the same expected object "[object Promise]" but got object "[object Promise]"
  WritableStream if sink's abort throws, the promise returned by writer.abort() rejects PASS: 3
  WritableStream if sink's abort throws, the promise returned by ws.abort() rejects PASS: 3
  WritableStream should NOT call underlying sink's close if no abort is supplied (historical) PASS: 3
  writer.abort(), controller.error() while there is an in-flight close, and then finish the close PASS: 3
  writer.abort(), controller.error() while there is an in-flight write, and then finish the write PASS: 3
  writer abort() during sink start() should replace the writer.ready promise synchronously PASS: 3
  writer.abort() while there is an in-flight write, and then finish the write with rejection PASS: 3
  writer close() promise should resolve before abort() promise PASS: 3
  writer.ready should reject on controller error without waiting for underlying write PASS: 3
  writes should be satisfied in order after rejected write when aborting PASS: 3
  writes should be satisfied in order when aborting PASS: 3
/streams/writable-streams/aborting.serviceworker.https.html   TIMEOUT: 1
OK: 9
  Service worker test setup FAIL: 9
Unable to get property 'getRegistration' of undefined or null reference

@ricea ricea merged commit 7949111 into master Mar 8, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@sideshowbarker sideshowbarker deleted the streams-abort-no-reject branch Nov 22, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.