summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/dynamic/hovered-detach.html
blob: 0a295314788270f0e21109ca01d06163b85f2c24 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<head>
<script type="text/javascript">
function test()
{
    if (!window.testRunner)
        return;
    testRunner.dumpAsText();
    eventSender.mouseMoveTo(0, 0);      // outside span
    var a = document.getElementById('a');
    document.body.offsetTop;            // force layout
    eventSender.mouseMoveTo(12, 12);    // inside span
    eventSender.mouseDown();            // required to get noticed?
    eventSender.mouseUp();
    a.style.display = 'none';
    document.body.offsetTop;
    eventSender.mouseMoveTo(0, 0);
    a.style.display = 'inline';
    document.body.offsetTop;
    a.style.display = 'inline';
    var r = document.getElementById('result');
    var col = document.defaultView.getComputedStyle(a).color;
    r.innerText = col == "rgb(0, 0, 0)" ? "PASS" : "FAIL: "+col;
}
</script>
<style>
    #a:hover { color: red; }
</style>
</head>
<body onload="test()">
<span id="a">This should not be red.</span>
<hr>
<p>
This tests for a regression against
<i><a href="https://bugs.webkit.org/show_bug.cgi?id=5983">https://bugs.webkit.org/show_bug.cgi?id=5983</a>
REGRESSION: onmouseover-powered navbar at MacNN renders incorrectly</i>.
</p>
<p>
Test result: <span id="result">didn't run</span>
</p>
</body>