diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 14:29:10 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 14:29:10 +0000 |
commit | 2aa4a82499d4becd2284cdb482213d541b8804dd (patch) | |
tree | b80bf8bf13c3766139fbacc530efd0dd9d54394c /dom/events/test/test_marquee_events.html | |
parent | Initial commit. (diff) | |
download | firefox-2aa4a82499d4becd2284cdb482213d541b8804dd.tar.xz firefox-2aa4a82499d4becd2284cdb482213d541b8804dd.zip |
Adding upstream version 86.0.1.upstream/86.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/events/test/test_marquee_events.html')
-rw-r--r-- | dom/events/test/test_marquee_events.html | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/dom/events/test/test_marquee_events.html b/dom/events/test/test_marquee_events.html new file mode 100644 index 0000000000..22d0eafdf1 --- /dev/null +++ b/dom/events/test/test_marquee_events.html @@ -0,0 +1,31 @@ +<html> +<head> + <meta charset="utf-8"> + <title>Test for bug 1425874</title> + <link rel="stylesheet" href="/tests/SimpleTest/test.css"> + <script src="/tests/SimpleTest/SimpleTest.js"></script> + <script src="/tests/SimpleTest/EventUtils.js"></script> +</head> +<body> + <script> + var wasEventCalled; + function callEventWithAttributeHandler(element, evt) { + wasEventCalled = false; + let el = document.createElement(element); + el.setAttribute(`on${evt}`, "wasEventCalled = true"); + el.dispatchEvent(new Event(evt)); + return wasEventCalled; + } + + info("Make sure the EventNameType_HTMLMarqueeOnly events only compile for marquee"); + + ok(!callEventWithAttributeHandler("div", "bounce"), "no onbounce for div"); + ok(!callEventWithAttributeHandler("div", "finish"), "no onfinish for div"); + ok(!callEventWithAttributeHandler("div", "start"), "no onstart for div"); + + ok(callEventWithAttributeHandler("marquee", "bounce"), "onbounce for marquee"); + ok(callEventWithAttributeHandler("marquee", "finish"), "onfinish for marquee"); + ok(callEventWithAttributeHandler("marquee", "start"), "onstart for marquee"); + </script> +</body> +</html> |