summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/dom/events/legacy-pre-activation-behavior.window.js
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/dom/events/legacy-pre-activation-behavior.window.js')
-rw-r--r--testing/web-platform/tests/dom/events/legacy-pre-activation-behavior.window.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/testing/web-platform/tests/dom/events/legacy-pre-activation-behavior.window.js b/testing/web-platform/tests/dom/events/legacy-pre-activation-behavior.window.js
new file mode 100644
index 0000000000..e9e84bfad1
--- /dev/null
+++ b/testing/web-platform/tests/dom/events/legacy-pre-activation-behavior.window.js
@@ -0,0 +1,10 @@
+test(t => {
+ const input = document.body.appendChild(document.createElement('input'));
+ input.type = "radio";
+ t.add_cleanup(() => input.remove());
+ const clickEvent = new MouseEvent('click', { button: 0, which: 1 });
+ input.addEventListener('change', t.step_func(() => {
+ assert_equals(clickEvent.eventPhase, Event.NONE);
+ }));
+ input.dispatchEvent(clickEvent);
+}, "Use NONE phase during legacy-pre-activation behavior");