6 background-color: rgba(
0,
0,
0,
1);
19 if (window
.testRunner
) {
20 testRunner
.dumpAsTextWithPixelResults();
21 testRunner
.overridePreference("WebKitWebGLEnabled", "1");
24 function drawCanvas(canvasID
, clearColor
)
26 var theCanvas
= document
.getElementById(canvasID
);
27 var glContext
= theCanvas
.getContext("webgl");
28 glContext
.clearColor(clearColor
[0], clearColor
[1], clearColor
[2], clearColor
[3]);
29 glContext
.clear(glContext
.COLOR_BUFFER_BIT
);
34 drawCanvas("topGL", [0, 0.5, 0, 1]);
35 drawCanvas("bottomGL", [1, 0, 0, 1]);
40 <body onload=
"init()">
41 <!-- Tests CSS visibility flag for WebGL layers. -->
42 <!-- Pixel test only. Only the green webGL canvas should be visible. The red one should be hidden. -->
43 <div><canvas id=
"topGL" class=
"visible" width=
"150" height=
"150"></canvas></div>
44 <div><canvas id=
"bottomGL" class=
"hidden" width=
"150" height=
"150"></canvas></div>