mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 07:13:20 +00:00
1baf74c1d9
Differential Revision: https://phabricator.services.mozilla.com/D9970 --HG-- extra : moz-landing-system : lando
32 lines
1.2 KiB
HTML
32 lines
1.2 KiB
HTML
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>Test for bug 1425874</title>
|
|
<link rel="stylesheet" href="/tests/SimpleTest/test.css">
|
|
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
|
<script type="text/javascript" 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>
|