| background-color: rgba(0, 0, 0, 1); |
| testRunner.dumpAsText(true); |
| testRunner.overridePreference("WebKitWebGLEnabled", "1"); |
| function drawCanvas(canvasID, clearColor) |
| var theCanvas = document.getElementById(canvasID); |
| var glContext = theCanvas.getContext("experimental-webgl"); |
| glContext.clearColor(clearColor[0], clearColor[1], clearColor[2], clearColor[3]); |
| glContext.clear(glContext.COLOR_BUFFER_BIT); |
| drawCanvas("topGL", [0, 0.5, 0, 1]); |
| drawCanvas("bottomGL", [1, 0, 0, 1]); |
| <!-- Tests CSS visibility flag for WebGL layers. --> |
| <!-- Pixel test only. Only the green webGL canvas should be visible. The red one should be hidden. --> |
| <div><canvas id="topGL" class="visible" width="150" height="150"></canvas></div> |
| <div><canvas id="bottomGL" class="hidden" width="150" height="150"></canvas></div> |