summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/obsolete/requirements-for-implementations/the-marquee-element-0/marquee-events-historical.html
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/html/obsolete/requirements-for-implementations/the-marquee-element-0/marquee-events-historical.html')
-rw-r--r--testing/web-platform/tests/html/obsolete/requirements-for-implementations/the-marquee-element-0/marquee-events-historical.html32
1 files changed, 32 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/obsolete/requirements-for-implementations/the-marquee-element-0/marquee-events-historical.html b/testing/web-platform/tests/html/obsolete/requirements-for-implementations/the-marquee-element-0/marquee-events-historical.html
new file mode 100644
index 0000000000..5780b90f04
--- /dev/null
+++ b/testing/web-platform/tests/html/obsolete/requirements-for-implementations/the-marquee-element-0/marquee-events-historical.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>Marquee events must not be implemented</title>
+<link rel="help" href="https://html.spec.whatwg.org/multipage/multipage/obsolete.html#the-marquee-element">
+<link rel="help" href="https://github.com/whatwg/html/pull/6343">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+
+<div id="log"></div>
+<marquee width="1" behavior="alternate">&nbsp;</marquee>
+<marquee width="1">&nbsp;</marquee>
+<marquee width="1" loop="2" behavior="alternate">&nbsp;</marquee>
+<marquee width="1" loop="2">&nbsp;</marquee>
+
+<script>
+test(() => {
+ assert_false("onstart" in HTMLMarqueeElement.prototype, "onstart");
+ assert_false("onfinish" in HTMLMarqueeElement.prototype, "onfinish");
+ assert_false("onbounce" in HTMLMarqueeElement.prototype, "onbounce");
+}, "Event handler IDL attributes must not be implemented");
+
+// Because we use width="1" they will bounce and finish really fast
+async_test(t => {
+ for (const m of document.querySelectorAll("marquee")) {
+ m.addEventListener("start", t.unreached_func(`start: ${m.outerHTML}`));
+ m.addEventListener("finish", t.unreached_func(`finish: ${m.outerHTML}`));
+ m.addEventListener("bounce", t.unreached_func(`bounce: ${m.outerHTML}`));
+ }
+
+ t.step_timeout(() => t.done(), 100);
+}, "No events must be fired, at least during the first 100 ms");
+</script>