2 Copyright (c) 2019 The Khronos Group Inc.
3 Use of this source code is governed by an MIT-style license that can be
4 found in the LICENSE.txt file.
10 <meta charset=
"utf-8">
11 <link rel=
"stylesheet" href=
"../../resources/js-test-style.css"/>
12 <script src=
"../../js/js-test-pre.js"></script>
13 <script src=
"../../js/webgl-test-utils.js"></script>
16 <div id=
"description"></div>
17 <div id=
"console"></div>
21 description('Verifies that the index validation code which is within bufferSubData does not crash.')
23 var wtu
= WebGLTestUtils
;
24 var gl
= wtu
.create3DContext();
26 var elementBuffer
= gl
.createBuffer();
27 gl
.bindBuffer(gl
.ELEMENT_ARRAY_BUFFER
, elementBuffer
);
28 gl
.bufferData(gl
.ELEMENT_ARRAY_BUFFER
, 256, gl
.STATIC_DRAW
);
29 var data
= new Uint8Array(127);
30 gl
.bufferSubData(gl
.ELEMENT_ARRAY_BUFFER
, 63, data
);
31 testPassed("bufferSubData, when buffer object was initialized with null, did not crash");
33 var successfullyParsed
= true;
36 <script src=
"../../js/js-test-post.js"></script>