| Index: LayoutTests/fast/canvas/draw-system-focus-ring-dirty-rect.html
|
| diff --git a/LayoutTests/fast/canvas/draw-system-focus-ring-dirty-rect.html b/LayoutTests/fast/canvas/draw-system-focus-ring-dirty-rect.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..588d861cc00c049b6a3c6c8952717cdfa46e7fb9
|
| --- /dev/null
|
| +++ b/LayoutTests/fast/canvas/draw-system-focus-ring-dirty-rect.html
|
| @@ -0,0 +1,46 @@
|
| +<!DOCTYPE html>
|
| +<html>
|
| +<head>
|
| + <title>drawSystemFocusRing() dirty rect test</title>
|
| + <script src="../../resources/js-test.js"></script>
|
| +</head>
|
| +<body>
|
| +<canvas id="canvas" class="output" width="300" height="300">
|
| + <button id="button"></button>
|
| +</canvas>
|
| +<script>
|
| + if (window.testRunner) {
|
| + testRunner.dumpAsTextWithPixelResults();
|
| + testRunner.waitUntilDone();
|
| + }
|
| +
|
| + var canvas = document.getElementById("canvas");
|
| + var context = canvas.getContext("2d");
|
| +
|
| + context.beginPath();
|
| + context.rect(0, 0, 300, 300);
|
| + context.fillStyle = "black";
|
| + context.fill();
|
| +
|
| + context.beginPath();
|
| + context.rect(50, 50, 200, 100);
|
| + context.fillStyle = "blue";
|
| + context.fill();
|
| +
|
| + var button = document.getElementById("button");
|
| +
|
| + button.addEventListener("focus", function() {
|
| + context.drawSystemFocusRing(button);
|
| + });
|
| +
|
| + // avoid painting of creating canvas
|
| + setTimeout(function() {
|
| + button.focus();
|
| +
|
| + if (window.testRunner)
|
| + testRunner.notifyDone();
|
| + }, 500);
|
| +
|
| +</script>
|
| +</body>
|
| +</html>
|
|
|