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

A "no-op" policy to support feature-agnostic testing #475

Open
mustaqahmed opened this issue Jun 9, 2022 · 2 comments
Open

A "no-op" policy to support feature-agnostic testing #475

mustaqahmed opened this issue Jun 9, 2022 · 2 comments

Comments

@mustaqahmed
Copy link
Member

While trying to write a (tentative) web-platform-test for Capability delegation, it seemed to me that adding a "no-op" feature to this list could be handy for testing. More precisely, this "no-op" feature would have an "always supported" state in the user agent, so a WPT could test a code path related to a passing policy without relying on a specific feature's state in the browser or Window.

One particular case I am trying to resolve: I want to test all errors in Step 8 of this proposed modification to HTML post-message algorithm. Now assume that "browser1" supports delegating only one feature, say "feature1", and "browser2" supports delegating only "feature2". In that case, I don't see a way to test all sub-steps of Step 8 in both these browsers. Note that the proposed Step 8 is feature-agnostic.

Any chance there is an known solution in the Permissions world already? @clelland

@flackr
Copy link

flackr commented Jun 15, 2022

If needed, couldn't a WPT test loop through features until it found one that was supported? I feel like it's not a good idea to add a "no-op" feature just for testing and try to ensure it behaves the same in browsers as delegating regular features.

@mustaqahmed
Copy link
Member Author

@clelland: assuming this is a standard "list" we can loop through in tests, do we have an exposed data structure to find them? Otherwise we will have to hardcode them in tests for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants