content/canvas/test/webgl-conformance/conformance/buffers/index-validation-crash-with-buffer-sub-data.html

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 <!--
     2 Copyright (c) 2011 The Chromium Authors. All rights reserved.
     3 Use of this source code is governed by a BSD-style license that can be
     4 found in the LICENSE file.
     5  -->
     6 <!DOCTYPE html>
     7 <html>
     8 <head>
     9 <meta charset="utf-8">
    10 <link rel="stylesheet" href="../../resources/js-test-style.css"/>
    11 <script src="../../resources/js-test-pre.js"></script>
    12 <script src="../resources/webgl-test.js"></script>
    13 </head>
    14 <body>
    15 <div id="description"></div>
    16 <div id="console"></div>
    18 <script>
    19 description('Verifies that the index validation code which is within bufferSubData does not crash.')
    21 var gl = create3DContext();
    23 var elementBuffer = gl.createBuffer();
    24 gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, elementBuffer);
    25 gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, 256, gl.STATIC_DRAW);
    26 var data = new Uint8Array(127);
    27 gl.bufferSubData(gl.ELEMENT_ARRAY_BUFFER, 63, data);
    28 testPassed("bufferSubData, when buffer object was initialized with null, did not crash");
    30 successfullyParsed = true;
    31 </script>
    33 <script>finishTest();</script>
    34 </body>
    35 </html>

mercurial