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

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

Issue 299823003: Enable canvas.drawFocusIfNeeded() by default. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: remove test Created 6 years, 7 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
« no previous file with comments | « no previous file | LayoutTests/accessibility/draw-custom-focus-ring-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE HTML>
2 <head>
3 <title>Canvas test: drawSystemFocusRing</title>
4 <script src="../resources/js-test.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 <div id="container">
10 <button id="button2"></button>
11 </div>
12 </canvas>
13 <script>
14 if (window.testRunner)
15 testRunner.dumpAsText();
16
17 if (window.accessibilityController) {
18 window.axButton1 = window.accessibilityController.accessibleElementById("but ton1");
19 window.axContainer = window.accessibilityController.accessibleElementById("c ontainer");
20 window.axButton2 = window.accessibilityController.accessibleElementById("but ton2");
21 }
22
23 var canvas = document.getElementById("canvas").getContext("2d");
24 canvas.save();
25 canvas.translate(50, 50);
26
27 canvas.beginPath();
28 canvas.rect(0, 0, 200, 100);
29 canvas.fillStyle = '#ccf';
30 canvas.fill();
31 canvas.drawCustomFocusRing(document.getElementById('button1'));
32
33 canvas.beginPath();
34 canvas.rect(0, 150, 200, 100);
35 canvas.fillStyle = '#cfc';
36 canvas.fill();
37 canvas.drawCustomFocusRing(document.getElementById('button2'));
38
39 canvas.restore();
40
41 shouldBe("axButton1.x", "50");
42 shouldBe("axButton1.y", "50");
43 shouldBe("axButton1.width", "200");
44 shouldBe("axButton1.height", "100");
45
46 shouldBe("axContainer.x", "50");
47 shouldBe("axContainer.y", "200");
48 shouldBe("axContainer.width", "200");
49 shouldBe("axContainer.height", "100");
50
51 shouldBe("axButton2.x", "50");
52 shouldBe("axButton2.y", "200");
53 shouldBe("axButton2.width", "200");
54 shouldBe("axButton2.height", "100");
55 </script>
56 </body>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/accessibility/draw-custom-focus-ring-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698