3 <script src=
"../../../resources/run-after-layout-and-paint.js"></script>
7 runAfterLayoutAndPaint(function() {
8 document
.getElementsByTagName('canvas')[0].style
.top
= "60px";
10 testRunner
.notifyDone();
14 <body onload=
"init()">
16 if (window
.testRunner
)
17 testRunner
.waitUntilDone();
19 <span id=
"description" style=
"color: white">
20 This test is only useful as a pixel test. You should see red canvas of size
100x100.
25 outline:
1px solid blue;
28 background-color: darkblue;
33 if (window
.testRunner
) {
34 testRunner
.overridePreference("WebKitWebGLEnabled", "1");
35 testRunner
.dumpAsTextWithPixelResults();
36 document
.getElementById("description").style
.position
= "absolute";
37 document
.getElementById("description").style
.top
= "-5000px";
40 var can
= document
.createElement('canvas');
41 can
.width
= can
.height
= 100;
42 can
.style
.position
= "absolute";
43 can
.style
.left
= "40px";
44 can
.style
.top
= "40px";
45 document
.body
.appendChild(can
);
46 var ctx
= can
.getContext("webgl");
47 ctx
.clearColor(1, 0, 0, 1);
48 ctx
.clear(ctx
.COLOR_BUFFER_BIT
);