4 <title>WebGL Scissor with context of preserveDrawingBuffer=true
</title>
5 <style type=
"text/css">
14 var canvas
= document
.getElementById("c");
17 domAutomationController
.setAutomationId(1);
18 domAutomationController
.send("FAILURE");
21 gl
.clearColor(1, 0, 0, 1);
22 gl
.clear(gl
.COLOR_BUFFER_BIT
);
23 window
.requestAnimationFrame(scissorAndClear
);
26 function initGL(canvas
) {
29 gl
= canvas
.getContext(
30 "webgl", {preserveDrawingBuffer
: true, alpha
: false});
35 function scissorAndClear() {
36 gl
.scissor(0, 0, 10, 10);
37 gl
.enable(gl
.SCISSOR_TEST
);
38 gl
.clearColor(0, 1, 0, 1);
39 gl
.clear(gl
.COLOR_BUFFER_BIT
);
41 domAutomationController
.setAutomationId(1);
42 domAutomationController
.send("SUCCESS");
47 <div style=
"position:absolute; top:0px; left:0px">
48 <canvas id=
"c" width=
"200" height=
"200" class=
"nomargin"></canvas>