blob: 858de431bbbe10a6b3ed4ea2c636501e3475bf6c [file] [edit]
<!DOCTYPE html>
<!--The test makes four canvases. The first never receives a getContext. The
second is rendered into immediately. The third and fourth are rendered
into with from nested setTimeout callbacks. We don't expect any of them
to get render layers.-->
<html>
<body style="line-height: 0;">
<canvas id="A" width=100 height=100></canvas><canvas id="B" width=100 height=100></canvas><canvas id="C" width=100 height=100></canvas><canvas id="D" width=100 height=100></canvas>
<script type="text/javascript" charset="utf-8">
if (window.testRunner)
testRunner.waitUntilDone();
function doTest() {
var contextB = document.getElementById("B").getContext("2d");
contextB.fillStyle = "#00C000";
contextB.fillRect(0, 0, 100, 100);
window.setTimeout(function() {
var contextD = document.getElementById("D").getContext("2d");
contextD.fillStyle = "#00C000";
contextD.fillRect(0, 0, 100, 100);
window.setTimeout(function() {
var contextC = document.getElementById("C").getContext("2d");
contextC.fillStyle = "#00C000";
contextC.fillRect(0, 0, 100, 100);
if (window.testRunner)
testRunner.notifyDone();
}, 0);
}, 0);
}
window.addEventListener('load', doTest, false);
</script>
</body>
</html>