-
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
Add tests for legacy-activation-behaviors #25020
Conversation
ev.preventDefault(); | ||
input.dispatchEvent(ev); | ||
setTimeout(t.step_func_done(() => assert_false(input.checked))); | ||
}, `disabled checkbox should get legacy-canceled-activation behavior 2`); |
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.
This fails on Firefox but passes when input.onclick = () => {}
is added. The spec does not require such thing, right?
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.
Right. Nice find.
dom/events/Event-dispatch-click.html
Outdated
input.onclick = t.step_func(ev => { | ||
assert_true(input.checked); | ||
ev.preventDefault(); | ||
setTimeout(t.step_func_done(() => { |
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.
I think lint will fail on setTimeout usage. queueMicrotask() should suffice, right? Otherwise t.step_timeout()
would work.
Corresponds to whatwg/html#5827