summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/css-generated-content/hover-inline.html
blob: 3938d2e177ac08f322859025515d5e67a20cf3a6 (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
<!DOCTYPE html>

<style>
    * { margin: 0; padding: 0; }
    span:before { content: "Hover this text."; }
</style>

<span></span>

<p>Hovering the generated text should hover the span: </p>

<script>
if (window.testRunner)
    testRunner.dumpAsText();

onload = function() {
    // Need to cause a layout before hover will work.
    document.body.offsetLeft;
    document.querySelector('span').onmouseover = function() {
        document.body.appendChild(document.createElement('p')).textContent = 'PASS';
    };
    if (window.eventSender)
        eventSender.mouseMoveTo(5, 5);
}
</script>