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

Improve idlharness-ShadowRealm integration #49342

Conversation

ptomato
Copy link
Contributor

@ptomato ptomato commented Nov 23, 2024

By defining globalThis.fetch_spec() in testharness-shadowrealm-inner.js, we no longer need to have IDL tests in separate files for ShadowRealm, as the regular idlharness.js will now just run there.

This allows consolidating the idlharness-shadowrealm.window.js tests back into their neighbouring idlharness.any.js files.

resources/idlharness.js Outdated Show resolved Hide resolved
resources/idlharness.js Show resolved Hide resolved
By exposing a fetch_spec() on globalThis in testharness-shadowrealm-inner,
we no longer need to have IDL tests in separate files for ShadowRealm, as
the regular idlharness.js will just run there.

Delete all existing idlharness-shadowrealm.window.js files and incorporate
them into their neighbouring idlharness.any.js files.

It seems sufficient to run the IDL tests only in shadowrealm-in-window;
repeating them in every ShadowRealm scope seems like overkill.
This gets me every time. If we are testing that an interface is not
exposed, we should be clear about that in the test message.
Instead, if a namespace is not exposed, test that there is no global
property of that name, similar to what we do with interfaces.
@ptomato ptomato force-pushed the improve-idlharness-shadowrealm-integration branch from 529810f to f47170b Compare November 25, 2024 20:09
@ptomato ptomato requested a review from Ms2ger November 25, 2024 20:11
Copy link
Member

@inexorabletash inexorabletash left a comment

Choose a reason for hiding this comment

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

LGTM, for what it's worth.

@Ms2ger Ms2ger merged commit 4998019 into web-platform-tests:master Nov 26, 2024
25 checks passed
@ptomato ptomato deleted the improve-idlharness-shadowrealm-integration branch November 26, 2024 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants