diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 17:32:43 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 17:32:43 +0000 |
commit | 6bf0a5cb5034a7e684dcc3500e841785237ce2dd (patch) | |
tree | a68f146d7fa01f0134297619fbe7e33db084e0aa /dom/events/test/test_unbound_before_in_active_chain.html | |
parent | Initial commit. (diff) | |
download | thunderbird-6bf0a5cb5034a7e684dcc3500e841785237ce2dd.tar.xz thunderbird-6bf0a5cb5034a7e684dcc3500e841785237ce2dd.zip |
Adding upstream version 1:115.7.0.upstream/1%115.7.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/events/test/test_unbound_before_in_active_chain.html')
-rw-r--r-- | dom/events/test/test_unbound_before_in_active_chain.html | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/dom/events/test/test_unbound_before_in_active_chain.html b/dom/events/test/test_unbound_before_in_active_chain.html new file mode 100644 index 0000000000..b62d44bb31 --- /dev/null +++ b/dom/events/test/test_unbound_before_in_active_chain.html @@ -0,0 +1,38 @@ +<!doctype html> +<title>Test for bug 1489139: Unbound generated content in the active chain</title> +<script src="/tests/SimpleTest/EventUtils.js"></script> +<script src="/tests/SimpleTest/SimpleTest.js"></script> +<style> +#target, #target::before { + width: 200px; + height: 200px; +} + +#target::before { + content: " "; + display: block; + background: green; +} + +#target:active::before { + content: ""; + background: red; +} +</style> +Should see a green square after clicking. +<div id="target"></div> +<script> +SimpleTest.waitForExplicitFinish(); +onload = function() { + let target = document.getElementById("target"); + requestAnimationFrame(() => { + synthesizeMouseAtPoint(100, 100, { type: "mousedown" }) + ok(target.matches(":active"), "Should have been clicked"); + requestAnimationFrame(() => { + synthesizeMouseAtPoint(100, 100, { type: "mouseup" }) + ok(!target.matches(':active'), "Should stop matching :active afterwards"); + SimpleTest.finish(); + }); + }); +} +</script> |