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

Minor fixes to readable-streams tests for ShadowRealm #48653

Merged

Conversation

ptomato
Copy link
Contributor

@ptomato ptomato commented Oct 16, 2024

A few fixes for readable-streams tests with incorrect expectations for ShadowRealms:

  • Don't execute the test that depends on VideoFrame in ShadowRealm, since VideoFrame isn't exposed there.
  • For the test resource file that depends on setInterval, provide a "fake" implementation if setInterval/clearInterval aren't present on the global object, which is the case in ShadowRealm.

Reported by @mgaudet in tc39/proposal-shadowrealm#396

…video-frame.any.js

VideoFrame is not exposed in ShadowRealm, so there's no point in running
this test there.

See: tc39/proposal-shadowrealm#396
streams/resources/rs-utils.js Outdated Show resolved Hide resolved
streams/resources/rs-utils.js Outdated Show resolved Hide resolved
streams/resources/rs-utils.js Outdated Show resolved Hide resolved
In order for tests using this resource to run properly in a ShadowRealm,
we need to make a fake setInterval()/clearInterval() if both are not
present on the global object.

See: tc39/proposal-shadowrealm#396
@ptomato ptomato force-pushed the shadowrealm-readable-streams branch from 5718b7f to b803572 Compare October 17, 2024 19:43
@ptomato ptomato requested a review from ricea October 17, 2024 19:44
@ptomato
Copy link
Contributor Author

ptomato commented Oct 17, 2024

Thanks for the review! Should have all of the feedback incorporated now.

Copy link
Contributor

@ricea ricea left a comment

Choose a reason for hiding this comment

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

Great, thanks.

@ptomato
Copy link
Contributor Author

ptomato commented Oct 21, 2024

Appreciate the reviews!

@ptomato ptomato merged commit 17cb5f2 into web-platform-tests:master Oct 21, 2024
19 checks passed
@ptomato ptomato deleted the shadowrealm-readable-streams branch October 21, 2024 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants