-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Add tests for transferable streams #24546
Add tests for transferable streams #24546
Conversation
The Streams Standard change whatwg/streams#1053 adds the ability to transfer streams to a different realm using postMessage(). Add tests for this feature.
When a TransformStream fails to be transferred because one side is locked, the other side should remain unlocked. Verify this.
@domenic Could you take a look at this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
@@ -0,0 +1,121 @@ | |||
'use strict'; | |||
|
|||
// Create a ReadableStream that will pass the tests in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: in other helper files I've preferred to use self.X = ...
to make it clearer what is exported. Possibly even hiding non-exported values inside a closure, like https://github.com/web-platform-tests/wpt/blob/master/streams/resources/rs-utils.js does.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will fix this in a follow-up change.
The Streams Standard change whatwg/streams#1053
adds the ability to transfer streams to a different realm using
postMessage(). Add tests for this feature.