3 <!-- READ BEFORE UPDATING:
4 If this test is updated make sure to increment the "revision" value of the
5 associated test in content/test/gpu/page_sets/pixel_tests.json. This will ensure
6 that the baseline images are regenerated on the next run.
11 <title>Canvas
2D Test: Red Box over Black Background
</title>
12 <style type=
"text/css">
18 var g_swapsBeforeAck
= 15;
28 var canvas
= document
.getElementById("c");
29 var c2d
= canvas
.getContext("2d");
30 c2d
.clearRect(0, 0, canvas
.width
, canvas
.height
);
31 c2d
.fillStyle
= "rgba(255, 0, 0, 0.5)";
32 c2d
.fillRect(50, 50, 100, 100);
35 function waitForFinish()
37 if (g_swapsBeforeAck
== 0) {
38 domAutomationController
.setAutomationId(1);
39 domAutomationController
.send("SUCCESS");
42 document
.getElementById('container').style
.zIndex
= g_swapsBeforeAck
+ 1;
43 window
.webkitRequestAnimationFrame(waitForFinish
);
48 <body onload=
"main()">
49 <div style=
"position:relative; width:200px; height:200px; background-color:black">
51 <div id=
"container" style=
"position:absolute; top:0px; left:0px">
52 <canvas id=
"c" width=
"200" height=
"200" class=
"nomargin"></canvas>