5 div { width:
100px; height:
100px;}
6 div#outsideDiv:before { content:
"> "; }
7 div#outsideDiv:hover:before { content:
"< "; }
10 Test for
<a href=
"https://bugs.webkit.org/show_bug.cgi?id=56401">https://bugs.webkit.org/show_bug.cgi?id=
56401</a>
11 Hover the mouse over the
"Inline" text. The test passes if
"Inline" is not placed on a new line.
15 <div id=
"console"></div>
16 <div id=
"outsideDiv" onmouseover=
"checkTestResult()">
18 <div id=
"insideDiv">Block
</p>
21 function getElementTop(elementId
)
23 var elem
= document
.getElementById(elementId
);
24 return elem
.getBoundingClientRect().top
;
27 function simulateMouseMove()
29 var outsideDivTop
= getElementTop("outsideDiv");
30 if (window
.eventSender
)
31 eventSender
.mouseMoveTo(50, outsideDivTop
);
34 function checkTestResult()
36 var outsideDivTop
= getElementTop("outsideDiv");
37 var insideDivTop
= getElementTop("insideDiv");
38 document
.getElementById("console").innerText
= (insideDivOriginalTop
!= insideDivTop
) ? "FAIL" : "PASS";
39 if (window
.testRunner
)
40 document
.getElementById("outsideDiv").style
.visibility
= 'hidden';
43 if (window
.testRunner
)
44 testRunner
.dumpAsText();
46 document
.body
.offsetTop
;
47 // Capture the initial values for inside div top
48 var insideDivOriginalTop
= getElementTop("insideDiv");
50 if (window
.testRunner
) {