blob: 48d1532bf5806288e9e6edb264eb7a490832a98a [file] [log] [blame]
<!doctype html>
<html>
<head>
<style>
.content {
-webkit-transform: translateZ(1px);
display: block;
width: 100px;
height: 30px;
background-color: green;
}
</style>
</head>
<body>
<!-- This test passes if it doesn't trigger an ASSERT in debug mode. It makes sure that the timer
used to update the marquee will not run before the layout is done. -->
<div id="container">
<marquee behavior="scroll" direction="left" scrolldelay="1" truespeed="true" scrollamount="1"><span class="content"></span></marquee>
<marquee behavior="scroll" direction="left" scrolldelay="2" truespeed="true" scrollamount="1"><span class="content"></span></marquee>
<marquee behavior="scroll" direction="left" scrolldelay="3" truespeed="true" scrollamount="1"><span class="content"></span></marquee>
<marquee behavior="scroll" direction="left" scrolldelay="4" truespeed="true" scrollamount="1"><span class="content"></span></marquee>
<marquee behavior="scroll" direction="left" scrolldelay="5" truespeed="true" scrollamount="1"><span class="content"></span></marquee>
<marquee behavior="scroll" direction="left" scrolldelay="6" truespeed="true" scrollamount="1"><span class="content"></span></marquee>
<marquee behavior="scroll" direction="left" scrolldelay="7" truespeed="true" scrollamount="1"><span class="content"></span></marquee>
<marquee behavior="scroll" direction="left" scrolldelay="8" truespeed="true" scrollamount="1"><span class="content"></span></marquee>
</div>
<p>Counter: <span id="counter"></span></p>
<script>
if (window.testRunner) {
testRunner.waitUntilDone();
testRunner.dumpAsText(false);
}
var times = 0;
// Trigger "pending layouts", that might run after the marquee timer is fired.
var counter = document.getElementById("counter");
var textNode = document.createTextNode("test");
counter.appendChild(textNode);
var interval = setInterval(function() {
textNode.nodeValue = Math.random();
if ((++times) >= 10) {
document.getElementById("container").remove();
textNode.nodeValue = "";
clearInterval(interval);
if (window.testRunner)
testRunner.notifyDone();
}
}, 10);
</script>
</body>
</html>