2 <title>Shadow parts are invalidated correctly when only a pseudo-class state to the right of the part matches
</title>
3 <script src=
"/tests/SimpleTest/SimpleTest.js"></script>
4 <script src=
"/tests/SimpleTest/EventUtils.js"></script>
11 background-color: red;
13 #host::part(p):hover {
14 background-color: lime;
18 <div id=
"random-element-to-force-change"></div>
20 SimpleTest
.waitForExplicitFinish();
22 let host
= document
.getElementById("host");
23 host
.attachShadow({ mode
: "open" }).innerHTML
= `
33 let part
= host
.shadowRoot
.querySelector("div");
34 let other
= document
.getElementById("random-element-to-force-change");
36 SimpleTest
.waitForFocus(function() {
37 synthesizeMouseAtCenter(other
, {type
: "mousemove"});
39 getComputedStyle(part
).backgroundColor
,
44 synthesizeMouseAtCenter(part
, {type
: "mousemove"});
46 getComputedStyle(part
).backgroundColor
,