Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / canvas / draw-focus-if-needed-invisible-crash.html
blob314268f6376fb61554aea63846ad36bb26a0e858
1 <!DOCTYPE HTML>
2 <p>This test passes by not crashing.</p>
3 <canvas id="canvas">
4 <button id="button"></button>
5 </canvas>
6 <script>
7 if (window.testRunner)
8 testRunner.dumpAsText();
10 var button = document.getElementById("button");
11 button.focus();
12 var canvas = document.getElementById("canvas")
13 var ctx = canvas.getContext("2d");
14 ctx.rect(0, 0, 10, 10);
15 canvas.style.display = "none";
16 ctx.drawFocusIfNeeded(button);
17 </script>