Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(280)

Side by Side Diff: LayoutTests/accessibility/draw-custom-focus-ring.html

Issue 19786002: Implement canvas focus ring methods. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Remove unused IntRect array Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 <!DOCTYPE HTML>
2 <head>
3 <title>Canvas test: drawSystemFocusRing</title>
4 <script src="../fast/js/resources/js-test-pre.js"></script>
5 </head>
6 <body style="padding: 0; margin: 0">
7 <canvas id="canvas" class="output" width="300" height="350">
8 <button id="button1"></button>
9 <button id="button2"></button>
10 </canvas>
11 <script>
12 if (window.testRunner)
13 testRunner.dumpAsText();
14
15 if (window.accessibilityController) {
16 window.axButton1 = window.accessibilityController.accessibleElementById("but ton1");
17 window.axButton2 = window.accessibilityController.accessibleElementById("but ton2");
18 }
19
20 var canvas = document.getElementById("canvas").getContext("2d");
21 canvas.beginPath();
22 canvas.rect(50, 50, 200, 100);
23 canvas.fillStyle = '#ccf';
24 canvas.fill();
25 canvas.drawCustomFocusRing(document.getElementById('button1'));
26
27 canvas.beginPath();
28 canvas.rect(50, 200, 200, 100);
29 canvas.fillStyle = '#cfc';
30 canvas.fill();
31 canvas.drawCustomFocusRing(document.getElementById('button2'));
32
33 shouldBe("axButton1.x", "50");
34 shouldBe("axButton1.y", "50");
35 shouldBe("axButton1.width", "200");
36 shouldBe("axButton1.height", "100");
37
38 shouldBe("axButton2.x", "50");
39 shouldBe("axButton2.y", "200");
40 shouldBe("axButton2.width", "200");
41 shouldBe("axButton2.height", "100");
42 </script>
43 <script src="../fast/js/resources/js-test-post.js"></script>
44 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698