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

Permissions: add missing tests #50850

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

Permissions: add missing tests #50850

wants to merge 2 commits into from

Conversation

marcoscaceres
Copy link
Contributor

@marcoscaceres marcoscaceres commented Feb 20, 2025

Add tests for edge cases, event model, revocation, and worker permissions.

Closes w3c/permissions#460

Add tests for edge cases, event model, revocation, and worker permissions.
@marcoscaceres
Copy link
Contributor Author

Get Gemini to do the review 😂

Copy link
Member

@miketaylr miketaylr left a comment

Choose a reason for hiding this comment

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

LGTM w/ nits and fixing ERROR:lint:permissions/revocation.https.html:32: Whitespace at EOL (TRAILING WHITESPACE)

await Promise.resolve();

// If we got no event, pass
// Cleanup
Copy link
Member

Choose a reason for hiding this comment

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

nit: This // Cleanup seems out of place.

assert_equals(status.state, 'granted', 'State should now be "granted"');
assert_array_equals(
results,
['.onchange-fired', 'addEventListener-fired'].sort(),
Copy link
Member

Choose a reason for hiding this comment

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

nit: why does .onchange-fired start with . but addEventListener-fired doesn't?

Copy link
Member

Choose a reason for hiding this comment

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

Oh, is it a sort hack?

);

// Cleanup
status.onchange = null;
Copy link
Member

Choose a reason for hiding this comment

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

nit: if you're doing this, do you want to removeEventListener as well?

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.

Proposed Testing Plan for Geolocation Permission
3 participants