Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / canvas / canvas-empty-image-pattern.html
blob943905018fb50cbfea04207a5d287676b7bc0057
1 <!DOCTYPE HTML>
2 <title>Canvas test: filling a pattern with an empty image should not crash and should return a null pattern.</title>
3 <div id="console"></div>
4 <canvas id="canvas" class="output" width="100" height="100"><p class="fallback">FAIL (fallback content)</p></canvas>
5 <script>
6 if (window.testRunner)
7 testRunner.dumpAsText();
9 var canvas = document.getElementById("canvas").getContext("2d");
10 var pattern = canvas.createPattern(new Image, "repeat")
11 if (pattern)
12 document.getElementById("console").innerHTML = "TEST FAILED";
13 else
14 document.getElementById("console").innerHTML = "TEST PASSED";
15 </script>