-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Enable structuredClone testing in ShadowRealm #49282
Open
ptomato
wants to merge
3
commits into
web-platform-tests:master
Choose a base branch
from
ptomato:shadowrealm-structuredClone
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Enable structuredClone testing in ShadowRealm #49282
ptomato
wants to merge
3
commits into
web-platform-tests:master
from
ptomato:shadowrealm-structuredClone
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wpt-pr-bot
requested review from
annevk,
deniak,
domenic,
foolip,
jdm and
jgraham
November 20, 2024 01:10
49 tasks
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 modulo the proposed changes. I would also appreciate @domenic's review though.
html/webappapis/structured-clone/structured-clone-battery-of-tests-with-transferables.js
Outdated
Show resolved
Hide resolved
We would like these tests to be run inside ShadowRealm as well. However, there are few platform objects that are [Exposed=*, Transferable] (only streams, of which the transferability is not widely implemented yet) and also few platform objects that are [Exposed=*, Serializable] (only DOMException). Add feature detection to structured-clone-battery-of-tests-with-transferables.js to try to use the most appropriate transferable platform object for the environment running the test. If MessagePort is available, use it; otherwise ReadableStream if it is transferable; otherwise skip the test. (To be clear, streams are specified to be transferable; but this test is not specifically about that.) As a non-transferable or non-serializable platform object, use AbortController, which is [Exposed=*], instead of Blob or Response, which are not. Use DOMException where a serializable platform object is needed, instead of Blob or File.
We would like these tests to be run inside ShadowRealm as well. Blob is not annotated with [Exposed=*]. Similar to the mechanism used to skip Document-specific tests in workers, skip Blob-specific tests if there is no Blob.
Run the "structuredClone battery of tests" in the various ShadowRealm environments. This includes making sure the various harness exports are added as global properties.
ptomato
force-pushed
the
shadowrealm-structuredClone
branch
from
November 20, 2024 18:15
8a4d6ef
to
968a9ef
Compare
Thanks for the review! I've made those changes you suggested. |
andreubotella
approved these changes
Nov 20, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Run the "structuredClone battery of tests" in the various ShadowRealm scopes. This requires using different objects in some cases where an example of a transferable or serializable object is needed. It also requires adding a mechanism to skip the
Blob
-specific tests.