OLD | NEW |
1 <!DOCTYPE HTML> | 1 <!DOCTYPE HTML> |
2 <head> | 2 <head> |
3 <title>Canvas test: drawCustomFocusRing</title> | 3 <title>Canvas test: drawCustomFocusRing</title> |
4 <script src="../js/resources/js-test-pre.js"></script> | 4 <script src="../js/resources/js-test-pre.js"></script> |
5 </head> | 5 </head> |
6 <body style="padding: 0; margin: 0"> | 6 <body style="padding: 0; margin: 0"> |
7 <canvas id="canvas" class="output" width="300" height="350"> | 7 <canvas id="canvas" class="output" width="300" height="350"> |
8 <button id="button1"></button> | 8 <button id="button1"></button> |
9 <button id="button2"></button> | 9 <button id="button2"></button> |
10 </canvas> | 10 </canvas> |
11 <script> | 11 <script> |
12 if (window.testRunner) | 12 if (window.testRunner) |
13 testRunner.dumpAsText(false); | 13 testRunner.dumpAsText(); |
14 | 14 |
15 window.button1 = document.getElementById("button1"); | 15 window.button1 = document.getElementById("button1"); |
16 window.button2 = document.getElementById("button2"); | 16 window.button2 = document.getElementById("button2"); |
17 | 17 |
18 var canvas = document.getElementById("canvas").getContext("2d"); | 18 var canvas = document.getElementById("canvas").getContext("2d"); |
19 canvas.beginPath(); | 19 canvas.beginPath(); |
20 canvas.rect(50, 50, 200, 100); | 20 canvas.rect(50, 50, 200, 100); |
21 canvas.fill(); | 21 canvas.fill(); |
22 shouldBe("canvas.drawCustomFocusRing(button1)", "false"); | 22 shouldBe("canvas.drawCustomFocusRing(button1)", "false"); |
23 shouldBe("canvas.drawCustomFocusRing(button2)", "false"); | 23 shouldBe("canvas.drawCustomFocusRing(button2)", "false"); |
24 shouldBe("button1.focus(); canvas.drawCustomFocusRing(button1)", "true"); | 24 shouldBe("button1.focus(); canvas.drawCustomFocusRing(button1)", "true"); |
25 </script> | 25 </script> |
26 <script src="../js/resources/js-test-post.js"></script> | 26 <script src="../js/resources/js-test-post.js"></script> |
27 </body> | 27 </body> |
OLD | NEW |