blob: 14d3595c733cad849e3e0acfca3105a4e124b26c [file] [log] [blame]
<!DOCTYPE html>
<!-- This test has a 16px tall div with overflow:hidden set and a child image. When the test loads the div is scrolled out of view.
The test is a pass if the image does not appear. -->
<body style="overflow:hidden">
<canvas style="position: absolute;"></canvas>
<script>
document.querySelector("canvas").getContext("2d");
</script>
<div style="top:0px; height: 16px; overflow: hidden; position: relative;">
<img style="position: absolute; left: -16px;" id="i"></img>
</div>
<br>
<div style="height:2000px"></div>
<script>
var can = document.createElement("canvas");
can.width = can.height = 500;
var ctx = can.getContext("2d");
ctx.fillStyle = "red";
ctx.fillRect(0, 0, 500, 500);
document.getElementById("i").src = can.toDataURL();
document.body.scrollTop = 50;
if (window.testRunner)
testRunner.dumpAsText(true);
</script>