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

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/content/canvas/test/webgl-conformance/conformance/buffers/index-validation-crash-with-buffer-sub-data.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,35 @@
     1.4 +<!--
     1.5 +Copyright (c) 2011 The Chromium Authors. All rights reserved.
     1.6 +Use of this source code is governed by a BSD-style license that can be
     1.7 +found in the LICENSE file.
     1.8 + -->
     1.9 +<!DOCTYPE html>
    1.10 +<html>
    1.11 +<head>
    1.12 +<meta charset="utf-8">
    1.13 +<link rel="stylesheet" href="../../resources/js-test-style.css"/>
    1.14 +<script src="../../resources/js-test-pre.js"></script>
    1.15 +<script src="../resources/webgl-test.js"></script>
    1.16 +</head>
    1.17 +<body>
    1.18 +<div id="description"></div>
    1.19 +<div id="console"></div>
    1.20 +
    1.21 +<script>
    1.22 +description('Verifies that the index validation code which is within bufferSubData does not crash.')
    1.23 +
    1.24 +var gl = create3DContext();
    1.25 +
    1.26 +var elementBuffer = gl.createBuffer();
    1.27 +gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, elementBuffer);
    1.28 +gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, 256, gl.STATIC_DRAW);
    1.29 +var data = new Uint8Array(127);
    1.30 +gl.bufferSubData(gl.ELEMENT_ARRAY_BUFFER, 63, data);
    1.31 +testPassed("bufferSubData, when buffer object was initialized with null, did not crash");
    1.32 +
    1.33 +successfullyParsed = true;
    1.34 +</script>
    1.35 +
    1.36 +<script>finishTest();</script>
    1.37 +</body>
    1.38 +</html>

mercurial