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

Add tests for legacy-activation-behaviors #25020

Merged
merged 3 commits into from Aug 17, 2020
Merged

Add tests for legacy-activation-behaviors #25020

merged 3 commits into from Aug 17, 2020

Conversation

saschanaz
Copy link
Member

Corresponds to whatwg/html#5827

ev.preventDefault();
input.dispatchEvent(ev);
setTimeout(t.step_func_done(() => assert_false(input.checked)));
}, `disabled checkbox should get legacy-canceled-activation behavior 2`);
Copy link
Member Author

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?

Copy link
Member

Choose a reason for hiding this comment

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

Right. Nice find.

input.onclick = t.step_func(ev => {
assert_true(input.checked);
ev.preventDefault();
setTimeout(t.step_func_done(() => {
Copy link
Member

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.

@wpt-pr-bot wpt-pr-bot temporarily deployed to wpt-preview-25020 August 14, 2020 20:51 Inactive
@domenic domenic merged commit a7a7d48 into master Aug 17, 2020
@domenic domenic deleted the input-disabled-2 branch August 17, 2020 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants