4 <title>drawSystemFocusRing() dirty rect test
</title>
5 <script src=
"../../resources/js-test.js"></script>
8 <p>This test is passed if result1 is exactly the same with result2.
</p>
10 <button id=
"result1">Result1
</button>
11 <button id=
"result2">Result2
</button>
13 <canvas id=
"canvas" class=
"output" width=
"300" height=
"300">
14 <button id=
"button"></button>
18 var canvas
= document
.getElementById("canvas");
19 var context
= canvas
.getContext("2d");
20 var button
= document
.getElementById("button");
21 var result1
= document
.getElementById("result1");
22 var result2
= document
.getElementById("result2");
24 function drawResult(separateFrame
) {
28 requestAnimationFrame(function() {
30 context
.rect(0, 0, 300, 300);
34 context
.rect(50, 50, 200, 100);
37 requestAnimationFrame(function() {
38 context
.drawSystemFocusRing(button
);
41 context
.drawSystemFocusRing(button
);
45 result1
.addEventListener("click", function() {
49 result2
.addEventListener("click", function() {