tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

index-validation-crash-with-buffer-sub-data.html (1067B)


      1 <!--
      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.
      5 -->
      6 
      7 <!DOCTYPE html>
      8 <html>
      9 <head>
     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>
     14 </head>
     15 <body>
     16 <div id="description"></div>
     17 <div id="console"></div>
     18 
     19 <script>
     20 "use strict";
     21 description('Verifies that the index validation code which is within bufferSubData does not crash.')
     22 
     23 var wtu = WebGLTestUtils;
     24 var gl = wtu.create3DContext();
     25 
     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");
     32 
     33 var successfullyParsed = true;
     34 </script>
     35 
     36 <script src="../../js/js-test-post.js"></script>
     37 </body>
     38 </html>