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

Unified Diff: LayoutTests/fast/canvas/draw-system-focus-ring.html

Issue 208003003: Rename drawSystemFocusRing() to drawFocusIfNeeded() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase 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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/fast/canvas/draw-system-focus-ring.html
diff --git a/LayoutTests/fast/canvas/draw-system-focus-ring.html b/LayoutTests/fast/canvas/draw-system-focus-ring.html
deleted file mode 100644
index 5204f5c336ebf3ebe08eaae184918a919b8bb29b..0000000000000000000000000000000000000000
--- a/LayoutTests/fast/canvas/draw-system-focus-ring.html
+++ /dev/null
@@ -1,47 +0,0 @@
-<!DOCTYPE HTML>
-<head>
-<title>Canvas test: drawSystemFocusRing</title>
-<script src="../../resources/js-test.js"></script>
-</head>
-<body style="padding: 0; margin: 0">
-<canvas id="canvas" class="output" width="300" height="350">
- <button id="button1"></button>
- <button id="button2"></button>
-</canvas>
-<script>
-if (window.testRunner)
- testRunner.dumpAsText();
-
-document.getElementById("button1").focus();
-
-var canvas = document.getElementById("canvas").getContext("2d");
-
-shouldNotThrow('canvas.drawSystemFocusRing(null);');
-shouldThrow('canvas.drawSystemFocusRing();');
-
-canvas.beginPath();
-canvas.rect(50, 50, 200, 100);
-canvas.fillStyle = "#ccf";
-canvas.fill();
-// re-test null case after having defined a path (regression test for crbug.com/353248)
-shouldNotThrow('canvas.drawSystemFocusRing(null);');
-canvas.drawSystemFocusRing(document.getElementById("button1"));
-
-canvas.beginPath();
-canvas.rect(50, 200, 200, 100);
-canvas.fillStyle = "#cfc";
-canvas.fill();
-canvas.drawSystemFocusRing(document.getElementById("button2"));
-
-// The top rect"s focus ring is tied to button1, which is focused.
-// It should have an outline in some color other than the background color.
-var imageData = canvas.getImageData(49, 50, 1, 1);
-var data = imageData.data;
-shouldBe("data[0] != 0 || data[1] != 0 || data[2] != 0", "true");
-
-// The bottom rect"s focus ring is tied to button2, which is not focused.
-imageData = canvas.getImageData(49, 200, 1, 1);
-data = imageData.data;
-shouldBe("data[0] == 0 && data[1] == 0 && data[2] == 0", "true");
-</script>
-</body>

Powered by Google App Engine
This is Rietveld 408576698