rwlbuis | abbef99 | 2007-05-23 11:04:14 +0000 | [diff] [blame] | 1 | <body> |
| 2 | <p> |
| 3 | The canvas below should show a gradient with zero stops, which according to the specification is filled with transparant black, ie. not visible. This tests <a href="http://bugs.webkit.org/show_bug.cgi?id=13784">Bug 13784, REGRESSION (r13744-13750): Crash with empty gradient when drawing to canvas</a></p> |
| 4 | <canvas id="c"></canvas> |
| 5 | <script> |
rniwa@webkit.org | 38608af | 2012-06-19 07:23:13 +0000 | [diff] [blame] | 6 | if (window.testRunner) |
| 7 | testRunner.dumpAsText(true); |
mdelaney@apple.com | 52b87e2 | 2011-03-31 00:00:59 +0000 | [diff] [blame] | 8 | |
rwlbuis | abbef99 | 2007-05-23 11:04:14 +0000 | [diff] [blame] | 9 | window.onload = function () { |
| 10 | var ctx = document.getElementById('c').getContext('2d'); |
| 11 | ctx.fillStyle = ctx.createLinearGradient(0, 0, 0, 50); |
| 12 | ctx.fillRect(0, 0, 300, 150); |
| 13 | ctx.strokeRect(0, 0, 300, 150); |
| 14 | } |
| 15 | </script> |
| 16 | </body> |