mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Update web-platform-tests to revision 765a5cba3fd8477f430cbd8bc3489b474097ee0e
This commit is contained in:
parent
8b7e9b2157
commit
244e6ca8c2
1319 changed files with 2020 additions and 24030 deletions
|
@ -9,7 +9,7 @@
|
|||
|
||||
<body>
|
||||
<dialog id="favDialog">
|
||||
<form method="dialog">
|
||||
<form id="dialogForm" method="dialog">
|
||||
<button id="confirmBtn" value="default">Confirm</button>
|
||||
<input id="confirmImgBtn" src="./resources/submit.jpg" width="41"
|
||||
height="41" type="image" alt="Hello">
|
||||
|
@ -78,5 +78,25 @@ promise_test(async () => {
|
|||
assert_false(dialog.open, "dialog should be closed now");
|
||||
}, "formmethod attribute should use dialog form submission");
|
||||
|
||||
promise_test(async () => {
|
||||
const dialog = document.querySelector('dialog');
|
||||
dialog.returnValue = "";
|
||||
dialog.showModal();
|
||||
|
||||
const button = document.querySelector('button');
|
||||
button.value = "sushi";
|
||||
|
||||
const dialogForm = document.getElementById('dialogForm');
|
||||
dialogForm.onsubmit = function() {
|
||||
dialog.close();
|
||||
}
|
||||
|
||||
button.click();
|
||||
assert_false(dialog.open, "dialog should be closed now");
|
||||
// If the submission request got processed, the returnValue should change
|
||||
// to "sushi" because that's the value of the submitter
|
||||
assert_equals(dialog.returnValue, "", "dialog's returnValue remains the same");
|
||||
}, "closing the dialog while submitting should stop the submission");
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue