Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(66)

Side by Side Diff: LayoutTests/fast/canvas/ellipse-crash.html

Issue 14298022: Add support for new canvas ellipse method. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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'));
7 }
8
9 function runTests() {
10 debug("This tests that we don't crash when passing inf as a parameter to ell ipse");
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.ellipse(10, 10, 20, 20, 0, 20, 1.0/0.0, true);
17 context.ellipse(10, 10, 20, 20, 0, 20, 1.0/0.0, true);
18 context.ellipse(10, 10, 1.0/0.0, 0, 0, 20, 20, true);
19 context.ellipse(10, 10, 0, 1.0/0.0, 0, 20, 20, true);
20 context.ellipse(10, 10, 20, 20, 1.0/0.0, 20, 20, true);
21 context.ellipse(10, 10, 20, 20, 0, 1.0/0.0, 20, true);
22 context.ellipse(10, 1.0/0.0, 10, 10, 0, 20, 20, true);
23 context.ellipse(1.0/0.0, 10, 10, 10, 0, 20, 20, true);
24 context.ellipse(10, 10, 20, 20, 0, 20, 1.0/0.0, false);
25 context.ellipse(10, 10, 1.0/0.0, 0, 0, 20, 20, false);
26 context.ellipse(10, 10, 0, 1.0/0.0, 0, 20, 20, false);
27 context.ellipse(10, 10, 20, 20, 1.0/0.0, 20, 20, false);
28 context.ellipse(10, 10, 20, 20, 0, 1.0/0.0, 20, false);
29 context.ellipse(10, 1.0/0.0, 10, 10, 0, 20, 20, false);
30 context.ellipse(1.0/0.0, 10, 10, 10, 0, 20, 20, false);
31 } catch (e) {
32 }
33 context.fillStyle = '#0f0';
34 context.fillRect(0, 0, canvas.width, canvas.height);
35 debug("Test passed.");
36 if (window.testRunner)
37 testRunner.dumpAsText();
38 }
39 </script>
40 <title>borkedness</title>
41 </head>
42 <body>
43 <canvas id="test" width="100" height="100"></canvas><br/>
44 <pre id="console"></pre>
45 <script>
46 runTests();
47 </script>
48 </body>
49 </html>
50
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698