Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / canvas / arc-crash.html
blobd5ac97d0aff315c209762b04bcd35f7b8f6df733
1 <html>
2 <head>
3 <script type="text/javascript">
4 function debug(str) {
5 var c = document.getElementById('console')
6 c.appendChild(document.createTextNode(str + '\n'));
9 function runTests() {
10 debug("This tests that we don't crash when passing inf as a parameter to arc");
11 var canvas = document.getElementById("test");
12 var context = canvas.getContext("2d");
13 context.fillStyle = '#f00';
14 context.fillRect(0, 0, canvas.width, canvas.height);
15 try {
16 context.arc(10, 10, 20, 20, 1.0/0.0, true);
17 context.arc(10, 10, 20, 20, 1.0/0.0, true);
18 context.arc(10, 10, 1.0/0.0, 20, 20, true);
19 context.arc(10, 10, 20, 1.0/0.0, 20, true);
20 context.arc(10, 1.0/0.0, 10, 20, 20, true);
21 context.arc(1.0/0.0, 10, 10, 20, 20, true);
22 context.arc(10, 10, 20, 20, 1.0/0.0, false);
23 context.arc(10, 10, 1.0/0.0, 20, 20, false);
24 context.arc(10, 10, 20, 1.0/0.0, 20, false);
25 context.arc(10, 1.0/0.0, 10, 20, 20, false);
26 context.arc(1.0/0.0, 10, 10, 20, 20, false);
27 } catch (e) {
29 context.fillStyle = '#0f0';
30 context.fillRect(0, 0, canvas.width, canvas.height);
31 debug("Test passed.");
32 if (window.testRunner)
33 testRunner.dumpAsText();
35 </script>
36 <title>borkedness</title>
37 </head>
38 <body>
39 <canvas id="test" width="100" height="100"></canvas><br />
40 <pre id="console"></pre>
41 <script>
42 runTests();
43 </script>
44 </body>
45 </html>