3 <script src=
"../../../resources/js-test.js"></script>
4 <script src=
"resources/webgl-test.js"></script>
5 <script src=
"resources/webgl-test-utils.js"></script>
8 <div id=
"description"></div>
9 <div id=
"console"></div>
13 description("Verifies that WebGLRenderingContext::getAttachedShaders doesn't crash when an accessor property is defined on Array.prototype.");
16 window
.internals
.settings
.setWebGLErrorsToConsoleEnabled(false);
18 context
= create3DContext();
19 program
= context
.createProgram();
21 shader1
= context
.createShader(context
.VERTEX_SHADER
);
22 context
.attachShader(program
, shader1
);
24 for (var i
= 0; i
< 10; ++i
) {
25 shader2
= context
.createShader(context
.FRAGMENT_SHADER
);
26 context
.attachShader(program
, shader2
);
28 Array
.prototype.__defineSetter__(0, function() {
29 context
.detachShader(program
, shader2
);
30 context
.deleteShader(shader2
);
35 shaders
= context
.getAttachedShaders(program
);
36 context
.getShaderParameter(shaders
[1], 0);