blob: a5f1bc88485dce3acab22809808e1f2c1f095de2 [file] [log] [blame]
<!DOCTYPE html>
<html>
<body>
<script>
if (window.testRunner)
testRunner.dumpAsText();
function newCanvasContext() {
canvas = document.createElement("canvas");
canvas.width = 100;
canvas.height = 100;
return canvas.getContext("2d");
}
window.onload = function () {
ctx = newCanvasContext();
ctx.fillStyle = '#0f0';
ctx.fillRect(0, 0, 100, 50);
ctx.moveTo(10500000000, 10500000000);
ctx.lineTo(110, -10);
ctx.lineTo(-10, 60);
ctx.fill();
ctx.getImageData(50, 25, 1, 1);
ctx = newCanvasContext();
ctx.fillStyle = '#0f0';
ctx.scale(4500000000, 4500000000);
ctx.moveTo(0, 0.5);
ctx.lineTo(2, 0.5);
ctx.stroke();
ctx.getImageData(50, 25, 1, 1);
ctx = newCanvasContext();
ctx.fillStyle = '#0f0';
ctx.fillRect(0, 0, 100, 50);
ctx.scale(2, -4500000000);
ctx.arc(25, 50, 56, 0, 2*Math.PI, false);
ctx.fill();
ctx.arc(105000000005, -105000000005, 105000000004, 0, 10500000000*Math.PI, false);
ctx.fill();
ctx.getImageData(50, 25, 1, 1);
}
</script>
PASS: Draw commands with big numbers cause no problems.
</body>
</html>