blob: ef2c1c13d074dda127a4f80dcde953d23ce18cf2 [file] [log] [blame]
<!DOCTYPE html><!-- webkit-test-runner [ useFlexibleViewport=true ] -->
<html>
<head>
<title>This tests the case when visible content change happens on mouseover but the newly visible (and clickable) content is too small.</title>
<script src="../../../../../resources/ui-helper.js"></script>
<style>
#tapThis {
width: 400px;
height: 400px;
border: 1px solid green;
}
#becomesVisible {
display: none;
width: 1px;
height: 10px;
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();
await UIHelper.activateElement(tapThis);
}
</script>
</head>
<body onload="test()">
<div id=tapThis>PASS if 'clicked' text is shown below.</div>
<div id=becomesVisible></div>
<pre id=result></pre>
<script>
tapThis.addEventListener("mouseover", function( event ) {
becomesVisible.style.display = "block";
}, false);
becomesVisible.addEventListener("click", function( event ) {
result.innerHTML = "clicked hidden";
}, false);
tapThis.addEventListener("click", function( event ) {
result.innerHTML = "clicked";
if (window.testRunner)
testRunner.notifyDone();
}, false);
</script>
</body>
</html>