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

html: Add a testcase for submit event reentrancy protection #16811

Merged
merged 3 commits into from May 15, 2019

Conversation

tkent-google
Copy link
Contributor

Specification: whatwg/html#4621

Copy link
Member

@domenic domenic left a comment

Choose a reason for hiding this comment

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

LGTM with minor question/nit

let test10 = async_test('Cannot navigate (after constructing the entry list)');
test10.step(() => {

async_test(t => {
Copy link
Member

Choose a reason for hiding this comment

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

Do you think this style of test is better than the counter style used above? If so, maybe add a comment?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'd like to test which one of two click()s submits the form. I'll add a comment.

domenic pushed a commit to whatwg/html that referenced this pull request May 15, 2019
Fixes #4620. This flag prevents reentrancy into the submission algorithm
during submit or invalid events. Blink and Gecko implement this for
submit only; WebKit implements it for both. The specification chooses
WebKit's behavior.

Tests: web-platform-tests/wpt#16811
Copy link
Member

@domenic domenic left a comment

Choose a reason for hiding this comment

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

New test LGTM with nit, although still unclear why one test uses navigation and the others use counters.

@tkent-google tkent-google merged commit 7ffd31b into master May 15, 2019
@tkent-google tkent-google deleted the tkent-submit-event-protection branch May 15, 2019 23:32
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