3 <script src=
"../../../resources/js-test.js"></script>
4 <script src=
"resources/webgl-test.js"></script>
7 <div id=
"description"></div>
8 <div id=
"console"></div>
11 description('Verifies that the index validation code which is within bufferSubData does not crash.')
13 var gl
= create3DContext();
15 var elementBuffer
= gl
.createBuffer();
16 gl
.bindBuffer(gl
.ELEMENT_ARRAY_BUFFER
, elementBuffer
);
17 gl
.bufferData(gl
.ELEMENT_ARRAY_BUFFER
, 256, gl
.STATIC_DRAW
);
18 var data
= new Uint8Array(127);
19 gl
.bufferSubData(gl
.ELEMENT_ARRAY_BUFFER
, 63, data
);
20 testPassed("bufferSubData, when buffer object was initialized with null, did not crash");