1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/content/canvas/crashtests/360293-1.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,35 @@ 1.4 +<html> 1.5 + 1.6 + 1.7 +<body> 1.8 + Firefox: <a href="javascript:noCrash()">no crash</a> | <a href="javascript:crash()">crash</a><br/> 1.9 + <canvas id="foo" width="200" height="200"> 1.10 + </canvas> 1.11 + <script> 1.12 + function d(lineWidth){ 1.13 + var c = document.getElementById("foo").getContext("2d") 1.14 + c.clearRect(0,0,200,200) 1.15 + c.lineWidth = lineWidth 1.16 + c.beginPath() 1.17 + c.arc(100,100,80, Math.PI, 2*Math.PI, 1) 1.18 + c.stroke() 1.19 + c.beginPath() 1.20 + c.arc(50,50, 20, 0, 2*Math.PI, 1) 1.21 + c.stroke() 1.22 + c.beginPath() 1.23 + c.arc(150,50, 20, 0, 2*Math.PI, 1) 1.24 + c.stroke() 1.25 + } 1.26 + function noCrash() { 1.27 + d(Math.random()*20+5) 1.28 + } 1.29 + function crash() { 1.30 + d( '_' ) 1.31 + } 1.32 + 1.33 + crash(); 1.34 + </script> 1.35 + 1.36 +</body> 1.37 + 1.38 +</html>