Skip to content

Commit

Permalink
Add a test that implicit submission is not allowed when the first sub…
Browse files Browse the repository at this point in the history
…mit button is disabled. (#35385)
  • Loading branch information
rniwa authored Aug 9, 2022
1 parent e4148ca commit 0fe3d1b
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,13 @@
assert_equals(event.submitter, null);
assert_true(event instanceof SubmitEvent);
}, 'Submit event with no submit button');

promise_test(async (test) => {
let form = populateForm('<input name=text value=abc><input name=submitButton type=submit disabled>');
form.text.focus();
form.addEventListener('submit', test.unreached_func('submit event should not be dispatched'));
await test_driver.send_keys(form.text, ENTER);
}, 'Submit event with disabled submit button');

</script>
</body>

0 comments on commit 0fe3d1b

Please sign in to comment.