summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/css/affected-by-hover-after-style-change.html
blob: cc73cb10e5a7eb83c7aabc431e6020d0d93f0aa5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<style>
    .bar { width: 100px; height: 100px; background-color: red; }
    .foo:hover .bar { background-color: green; }
</style>
<div class="foo" id="target">
    <div class="bar"></div>
</div>
<div id="result">This test runs in DumpRenderTree</div>
<script>
    document.body.offsetLeft;
    document.getElementById("target").style.left = "0";
    if (window.eventSender) {
        eventSender.mouseMoveTo(200, 50);
        eventSender.mouseMoveTo(210, 50);
        testRunner.dumpAsText();
        document.getElementById("result").innerText = getComputedStyle(document.getElementById("target").firstElementChild).backgroundColor === "rgb(0, 128, 0)" ? "PASS" : "FAIL";
    }
</script>