Skip to content

Test that TransformStream does not use global constructors#852

Merged
ricea merged 2 commits intowhatwg:masterfrom
ricea:transform-stream-test-avoid-global-constructors
Nov 6, 2017
Merged

Test that TransformStream does not use global constructors#852
ricea merged 2 commits intowhatwg:masterfrom
ricea:transform-stream-test-avoid-global-constructors

Conversation

@ricea
Copy link
Collaborator

@ricea ricea commented Nov 2, 2017

The TransformStream constructor constructs a ReadableStream and
WritableStream. It should use the original constructors rather than what
currently exists on the global object.

Add tests to verify that it does.

Related to issue #850.

The TransformStream constructor constructs a ReadableStream and
WritableStream. It should use the original constructors rather than what
currently exists on the global object.

Add tests to verify that it does.

Related to issue whatwg#850.
@ricea
Copy link
Collaborator Author

ricea commented Nov 2, 2017

I can move this to w3c if #851 happens first.

Copy link
Member

@domenic domenic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with minor suggestion.

assert_not_equals(getWriter.call(ts.writable), undefined,
'getWriter should work when called on ts.writable');

ReadableStream = oldReadableStream;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These should probably be in a t.cleanup(() => { ... }) at the top, just to be safe.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's better, thanks.

@ricea ricea merged commit c303a28 into whatwg:master Nov 6, 2017
@ricea ricea deleted the transform-stream-test-avoid-global-constructors branch November 6, 2017 07:10
ricea added a commit to ricea/web-platform-tests that referenced this pull request Nov 7, 2017
The test added in whatwg/streams#852 was missing
from the previous commit. Add it.
ricea added a commit to ricea/web-platform-tests that referenced this pull request Nov 9, 2017
The test added in whatwg/streams#852 was missing
from the previous commit. Add it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants