summaryrefslogtreecommitdiffstats
path: root/dom/canvas/crashtests/0px-size-font-667225.html
blob: 9de65f8f59de44d41a7c7524b34df90360409320 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<html xmlns="http://www.w3.org/1999/xhtml" >
<script language=javascript>

function draw() {
  var canv = document.getElementById("canv");
  var ctx = canv.getContext("2d");

  ctx.fillStyle = "red";
  // 0 size font shouldn't crash!
  ctx.font = "0px Arial";
  ctx.fillText("A", 0, 0);
  document.documentElement.className = "";
}

</script>
<body onload="draw()">
<canvas id="canv" width="5" height="5"></canvas>
</body>
</html>