blob: 04f99f02eece9377b6cfea093cab9431f45dd3c1 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<style type="text/css" media="screen">
body {
overflow: hidden;
height: 100%;
width: 100%;
padding: 0;
margin: 0;
}
iframe {
border: 1px solid black;
height: 100px;
width: 100px;
}
.name {
overflow: hidden;
}
.overlay {
position: absolute;
width: 80px;
height: 50px;
top: 0;
left: 0;
background-color: rgba(0, 0, 0, 0.2);
}
#test.bigger {
font-size: 13pt;
}
.tester {
cursor: pointer;
height: 100px;
width: 10px;
background-color: green;
font-size: 24pt;
display: inline;
}
</style>
<script type="text/javascript">
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
}
// Called from subframe.
function testDone()
{
if (window.eventSender) {
eventSender.mouseMoveTo(82, 52);
eventSender.mouseDown();
eventSender.mouseUp();
}
if (window.testRunner)
testRunner.notifyDone();
}
function nodeClicked(node)
{
var result = document.getElementById('result');
if (node.id == 'target')
result.innerHTML = 'PASS: hit target node in iframe';
else
result.innerHTML = 'FAIL: hit some other node in iframe';
}
function doTest()
{
// Make a layout happen while the iframe is composited.
window.setTimeout(function() {
document.getElementById('test').className = 'bigger';
}, 0);
}
window.addEventListener('load', doTest, false);
</script>
</head>
<body>
<span id="test">Text</span>
<iframe id="iframe" src="resources/leave-compositing-subframe-click.html" scrolling="no"></iframe>
<div class="overlay"></div>
<div id="result">FAIL: did not get clicked callback from iframe. (This test must be run in DRT.)</div>
</body>
</html>