blob: 0d4e0cd2968519668513c55c06d0f382081762f0 [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: 10px;
height: 1px;
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>