blob: 7ed1cd47d19571463b8a7d8f45b35edc9104c8ea [file] [log] [blame]
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Mouse selection in visible overflow of a region</title>
<style>
body, p, ol {
margin: 0;
padding: 0;
}
input {
width: 100px;
}
#content {
font-family: monospace;
font-size: 20px;
line-height: 1em;
-webkit-flow-into: f;
}
.spacer {
width: 100%;
height: 80px;
display: block;
}
.highlite {
color: deepskyblue;
}
.highlite:hover {
background-color: green;
color: white;
}
#region {
border: 2px solid black;
background-color: lightgray;
width: 100px;
height: 100px;
-webkit-flow-from: f;
}
#parent {
float: left;
height: 200px;
}
#region p {
background-color: red;
width: 100%;
height: 50%;
}
#result {
color: green;
font-weight: bold;
}
</style>
</head>
<script type="text/javascript">
if (window.testRunner)
testRunner.waitUntilDone();
function beginTest() {
if (window.eventSender) {
var obj = document.querySelector(".highlite");
// move mouse on the hover test object
eventSender.mouseMoveTo(obj.offsetLeft + 5, obj.offsetTop + 5);
eventSender.mouseDown(0);
testRunner.notifyDone();
}
}
</script>
<body onload="beginTest()">
<div id="parent">
<div id="region">
<p></p>
</div>
</div>
<ol>
<li>You should not see any red before or during this test.</li>
<li>Move the mouse over the blue word (<em>overflow</em>) outside the gray square.</li>
<li>The word should become white on a green background.</li>
<li>You should see the word "PASS" displayed below, in green.</li>
</ol>
<div id="content"><span class="spacer"></span>This text has <span class="highlite">overflow</span></div>
<div id="result">&nbsp;</div>
<script>
var word = document.querySelector(".highlite");
word.addEventListener("mouseover", function(evt)
{
document.getElementById("result").innerHTML = "PASS";
});
</script>
</body>
</html>