blob: 91ea2d3376b8283c8de65164d9aec37793be3b3a [file] [log] [blame]
<!doctype html>
<html style="font: 16px/1.25 monospace;">
<script type="text/javascript">
function onBodyLoad() {
if (window.testRunner) {
var selection = window.getSelection();
// Test selection on the overflow below the last region.
var region = document.getElementById("region2");
var startPositionX = region.offsetLeft + 20;
var startPositionY = region.offsetTop + 40 + 35;
var endPositionX = startPositionX + 60;
var endPositionY = startPositionY + 20;
eventSender.mouseMoveTo(startPositionX, startPositionY);
eventSender.mouseDown();
eventSender.mouseMoveTo(endPositionX, endPositionY);
eventSender.mouseUp();
var elemResult = document.getElementById("result1");
var result = "FAIL";
if (selection.toString() == "verflow2_1\nOverflo")
result = "PASS";
elemResult.className = result;
elemResult.innerHTML = "1st automated selection test: " + result;
// Test selection on the overflow above the first region.
region = document.getElementById("region1");
startPositionX = region.offsetLeft + 20;
startPositionY = region.offsetTop - 45;
endPositionX = startPositionX + 60;
endPositionY = startPositionY + 20;
eventSender.mouseMoveTo(startPositionX, startPositionY);
eventSender.mouseDown();
eventSender.mouseMoveTo(endPositionX, endPositionY);
eventSender.mouseUp();
elemResult = document.getElementById("result2");
result = "FAIL";
if (selection.toString() == "verflow1_1\nOverflo")
result = "PASS";
elemResult.className = result;
elemResult.innerHTML = "2nd automated selection test: " + result;
eventSender.mouseMoveTo(startPositionX + 200, startPositionY);
eventSender.mouseDown();
eventSender.mouseUp();
}
}
</script>
<head>
<style>
#content {
-webkit-flow-into: flow;
margin-top: -60px;
}
.overflow {
color: orange;
}
.region {
-webkit-flow-from: flow;
width: 100px;
height: 40px;
border-width: 5px;
border-style: solid;
position: absolute;
}
#region1 {
top: 360px;
left: 100px;
border-color: green;
}
#region2 {
top: 415px;
left: 100px;
border-color: blue;
}
.PASS {
color: green;
font-weight: bold;
}
.FAIL {
color: red;
font-weight: bold;
}
.notrun {
color: red;
font-weight: bold;
}
</style>
</head>
<body onload="onBodyLoad();">
<p>Test that overflow content for the first and last regions in the chain is correctly displayed in different situations.</p>
<p>On success, the following should be true:</p>
<ul>
<li>Four <span style="color: orange;"><b>orange</b></span> overflow lines should be visible above and below the <span style="color: blue;"><b>blue</b></span> region (the 4th line overflows into a different tile)</li>
<li>All <span style="color: orange;"><b>orange</b></span> overflow lines should be selectable</li>
</ul>
<div id="content">
<div class="overflow">Overflow1_1</div>
<div class="overflow">Overflow1_2</div>
<br/>
<div>flow1_1</div>
<div>flow1_2</div>
<div>flow1_3</div>
<div>flow1_4</div>
<br/>
<div class="overflow">Overflow2_1</div>
<div class="overflow">Overflow2_2</div>
</div>
<div class="region" id="region1"></div>
<div class="region" id="region2"></div>
<div id="result1" class="notrun">1st automated selection test: NOT RUN</div>
<div id="result2" class="notrun">2nd automated selection test: NOT RUN</div>
</body>
</html>