dom/imptests/html/webgl/test_bufferSubData.html

Tue, 06 Jan 2015 21:39:09 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 06 Jan 2015 21:39:09 +0100
branch
TOR_BUG_9701
changeset 8
97036ab72558
permissions
-rw-r--r--

Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

     1 <!doctype html>
     2 <title>bufferSubData</title>
     3 <link rel=author href=mailto:Ms2ger@gmail.com title=Ms2ger>
     4 <link rel=help href=https://www.khronos.org/registry/webgl/specs/latest/#5.14.5>
     5 <script src=/resources/testharness.js></script>
     6 <script src=/resources/testharnessreport.js></script>
     7 <script src=common.js></script>
     9 <div id=log></div>
    10 <script>
    11 test(function() {
    12   var gl = getGl();
    13   assert_equals(gl.getError(), WebGLRenderingContext.NO_ERROR);
    15   var b = gl.createBuffer();
    16   gl.bindBuffer(gl.ARRAY_BUFFER, b);
    18   var a = new Float32Array(1);
    19   gl.bufferData(gl.ARRAY_BUFFER, a, gl.STATIC_DRAW);
    21   var nan = 0 / 0;
    22   gl.bufferSubData(gl.ARRAY_BUFFER, nan, a);
    24   assert_equals(gl.getError(), WebGLRenderingContext.NO_ERROR);
    25 });
    26 </script>

mercurial