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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

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.

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.
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.

3 participants