-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
base: master
Are you sure you want to change the base?
Conversation
Add tests for edge cases, event model, revocation, and worker permissions.
Get Gemini to do the review 😂 |
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 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 |
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.
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(), |
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.
nit: why does .onchange-fired
start with .
but addEventListener-fired
doesn't?
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.
Oh, is it a sort hack?
); | ||
|
||
// Cleanup | ||
status.onchange = null; |
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.
nit: if you're doing this, do you want to removeEventListener as well?
Add tests for edge cases, event model, revocation, and worker permissions.
Closes w3c/permissions#460