| <!DOCTYPE HTML> |
| <title>Canvas test: filling a pattern with an empty image should not crash.</title> |
| <div id="console"></div> |
| <canvas id="canvas" class="output" width="100" height="100"><p class="fallback">FAIL (fallback content)</p></canvas> |
| <script> |
| if (window.testRunner) |
| testRunner.dumpAsText(true); |
| |
| var canvas = document.getElementById("canvas").getContext("2d"); |
| var pattern = canvas.createPattern(new Image, "repeat") |
| if (pattern) |
| document.getElementById("console").innerHTML = "TEST FAILED"; |
| else |
| document.getElementById("console").innerHTML = "TEST PASSED"; |
| </script> |