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

Side by Side Diff: LayoutTests/fast/canvas/draw-system-focus-ring-dirty-rect.html

Issue 200283003: drawFocusRing() function in CRC2D draws invalid focus ring. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: layout test Created 6 years, 9 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
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <title>drawSystemFocusRing() dirty rect test</title>
5 <script src="../../resources/js-test.js"></script>
6 </head>
7 <body>
8 <canvas id="canvas" class="output" width="300" height="300">
9 <button id="button"></button>
10 </canvas>
11 <script>
12 if (window.testRunner) {
13 testRunner.dumpAsTextWithPixelResults();
14 testRunner.waitUntilDone();
15 }
16
17 var canvas = document.getElementById("canvas");
18 var context = canvas.getContext("2d");
19
20 context.beginPath();
21 context.rect(0, 0, 300, 300);
22 context.fillStyle = "black";
23 context.fill();
24
25 context.beginPath();
26 context.rect(50, 50, 200, 100);
27 context.fillStyle = "blue";
28 context.fill();
29
30 var button = document.getElementById("button");
31
32 button.addEventListener("focus", function() {
33 context.drawSystemFocusRing(button);
34 });
35
36 // avoid painting of creating canvas
37 setTimeout(function() {
38 button.focus();
39
40 if (window.testRunner)
41 testRunner.notifyDone();
42 }, 500);
43
44 </script>
45 </body>
46 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698