diff --git a/testing/web-platform/tests/dom/events/Event-dispatch-click.html b/testing/web-platform/tests/dom/events/Event-dispatch-click.html index 2241d57e5118..7690f753d9cd 100644 --- a/testing/web-platform/tests/dom/events/Event-dispatch-click.html +++ b/testing/web-platform/tests/dom/events/Event-dispatch-click.html @@ -191,6 +191,24 @@ async_test(function(t) { input.click() }, "disconnected radio should be checked") +async_test(t => { + const input = document.createElement('input'); + input.type = 'checkbox'; + input.onclick = t.step_func_done(() => { + assert_true(input.checked); + }); + input.dispatchEvent(new MouseEvent('click')); +}, `disconnected checkbox should be checked from dispatchEvent(new MouseEvent('click'))`); + +async_test(t => { + const input = document.createElement('input'); + input.type = 'radio'; + input.onclick = t.step_func_done(() => { + assert_true(input.checked); + }); + input.dispatchEvent(new MouseEvent('click')); +}, `disconnected radio should be checked from dispatchEvent(new MouseEvent('click'))`); + async_test(function(t) { var form = document.createElement("form") var didSubmit = false diff --git a/testing/web-platform/tests/dom/events/Event-dispatch-detached-input-and-change.html b/testing/web-platform/tests/dom/events/Event-dispatch-detached-input-and-change.html new file mode 100644 index 000000000000..a53ae71ac2a0 --- /dev/null +++ b/testing/web-platform/tests/dom/events/Event-dispatch-detached-input-and-change.html @@ -0,0 +1,190 @@ + + + +