blob: 2c098c8154834263221764fd29a93c319de3f62c [file] [log] [blame]
<!DOCTYPE html><!-- webkit-test-runner [ useFlexibleViewport=true ] -->
<html>
<head>
<title>This tests the case when visible content has anonymous renderers.</title>
<script src="../../../../../resources/basic-gestures.js"></script>
<style>
#tapthis {
width: 400px;
height: 400px;
border: 1px solid green;
}
#becomesVisible {
position: absolute;
left: -1000px;
width: 100px;
height: 100px;
background-color: green;
}
</style>
<script>
async function test() {
if (!window.testRunner || !testRunner.runUIScript)
return;
if (window.internals)
internals.settings.setContentChangeObserverEnabled(true);
testRunner.waitUntilDone();
testRunner.dumpAsText();
let rect = tapthis.getBoundingClientRect();
let x = rect.left + rect.width / 2;
let y = rect.top + rect.height / 2;
await tapAtPoint(x, y);
}
</script>
</head>
<body onload="test()">
<div id=tapthis>PASS if no crash.</div>
<div id=becomesVisible>inline text with <div>text inside block</div></div>
<script>
tapthis.addEventListener("mousemove", function( event ) {
becomesVisible.style.left = "100px";
document.body.offsetHeight;
if (window.testRunner)
testRunner.notifyDone();
}, false);
tapthis.addEventListener("click", function( event ) {
result.innerHTML = "clicked";
}, false);
</script>
</body>
</html>