2 <title>Test for bug
1489139: Unbound generated content in the active chain
</title>
3 <script src=
"/tests/SimpleTest/EventUtils.js"></script>
4 <script src=
"/tests/SimpleTest/SimpleTest.js"></script>
6 #target, #target::before {
17 #target:active::before {
22 Should see a green square after clicking.
23 <div id=
"target"></div>
25 SimpleTest
.waitForExplicitFinish();
27 let target
= document
.getElementById("target");
28 requestAnimationFrame(() => {
29 synthesizeMouseAtPoint(100, 100, { type
: "mousedown" })
30 ok(target
.matches(":active"), "Should have been clicked");
31 requestAnimationFrame(() => {
32 synthesizeMouseAtPoint(100, 100, { type
: "mouseup" })
33 ok(!target
.matches(':active'), "Should stop matching :active afterwards");