| Index: LayoutTests/fast/canvas/ellipse-crash.html
|
| diff --git a/LayoutTests/fast/canvas/ellipse-crash.html b/LayoutTests/fast/canvas/ellipse-crash.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..952d1d33f04141a6c97733261f957588734954fc
|
| --- /dev/null
|
| +++ b/LayoutTests/fast/canvas/ellipse-crash.html
|
| @@ -0,0 +1,50 @@
|
| +<html>
|
| +<head>
|
| +<script type="text/javascript">
|
| +function debug(str) {
|
| + var c = document.getElementById('console')
|
| + c.appendChild(document.createTextNode(str + '\n'));
|
| +}
|
| +
|
| +function runTests() {
|
| + debug("This tests that we don't crash when passing inf as a parameter to ellipse");
|
| + var canvas = document.getElementById("test");
|
| + var context = canvas.getContext("2d");
|
| + context.fillStyle = '#f00';
|
| + context.fillRect(0, 0, canvas.width, canvas.height);
|
| + try {
|
| + context.ellipse(10, 10, 20, 20, 0, 20, Math.Infinite, true);
|
| + context.ellipse(10, 10, 20, 20, 0, 20, Math.Infinite, true);
|
| + context.ellipse(10, 10, Math.Infinite, 0, 0, 20, 20, true);
|
| + context.ellipse(10, 10, 0, Math.Infinite, 0, 20, 20, true);
|
| + context.ellipse(10, 10, 20, 20, Math.Infinite, 20, 20, true);
|
| + context.ellipse(10, 10, 20, 20, 0, Math.Infinite, 20, true);
|
| + context.ellipse(10, Math.Infinite, 10, 10, 0, 20, 20, true);
|
| + context.ellipse(Math.Infinite, 10, 10, 10, 0, 20, 20, true);
|
| + context.ellipse(10, 10, 20, 20, 0, 20, Math.Infinite, false);
|
| + context.ellipse(10, 10, Math.Infinite, 0, 0, 20, 20, false);
|
| + context.ellipse(10, 10, 0, Math.Infinite, 0, 20, 20, false);
|
| + context.ellipse(10, 10, 20, 20, Math.Infinite, 20, 20, false);
|
| + context.ellipse(10, 10, 20, 20, 0, Math.Infinite, 20, false);
|
| + context.ellipse(10, Math.Infinite, 10, 10, 0, 20, 20, false);
|
| + context.ellipse(Math.Infinite, 10, 10, 10, 0, 20, 20, false);
|
| + } catch (e) {
|
| + }
|
| + context.fillStyle = '#0f0';
|
| + context.fillRect(0, 0, canvas.width, canvas.height);
|
| + debug("Test passed.");
|
| + if (window.testRunner)
|
| + testRunner.dumpAsText();
|
| +}
|
| +</script>
|
| +<title>borkedness</title>
|
| +</head>
|
| +<body>
|
| + <canvas id="test" width="100" height="100"></canvas><br/>
|
| + <pre id="console"></pre>
|
| + <script>
|
| + runTests();
|
| + </script>
|
| +</body>
|
| +</html>
|
| +
|
|
|