blob: c801e824b615059f82c443c399f3347fa2f3408b [file] [log] [blame]
<!DOCTYPE html><!-- webkit-test-runner [ useFlexibleViewport=true ] -->
<html>
<head>
<title>This tests the case when visible content change happens through transition and there's a pending style update.</title>
<script src="../../../../../resources/ui-helper.js"></script>
<style>
#tapThis {
width: 400px;
height: 400px;
border: 1px solid green;
-webkit-user-modify: read-write;
}
#becomesVisible {
visibility: hidden;
opacity: 0.8;
width: 100px;
height: 100px;
background-color: green;
transition: opacity 1ms;
}
</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 no crash or assert.</div>
<div id=becomesVisible></div>
<script>
tapThis.addEventListener("touchstart", function( event ) {
becomesVisible.style.visibility = "visible";
becomesVisible.style.opacity = "1";
}, false);
tapThis.addEventListener("click", function( event ) {
if (window.testRunner)
testRunner.notifyDone();
}, false);
</script>
</body>
</html>