1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/dom/imptests/html/webgl/test_uniformMatrixNfv.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,33 @@ 1.4 +<!doctype html> 1.5 +<title>uniformMatrix*fv</title> 1.6 +<link rel=author href=mailto:Ms2ger@gmail.com title=Ms2ger> 1.7 +<link rel=help href=https://www.khronos.org/registry/webgl/specs/latest/#WebGLRenderingContext> 1.8 +<link rel=help href=http://dev.w3.org/2006/webapi/WebIDL/#es-boolean> 1.9 +<link rel=help href=http://es5.github.com/#x9.2> 1.10 +<script src=/resources/testharness.js></script> 1.11 +<script src=/resources/testharnessreport.js></script> 1.12 +<script src=common.js></script> 1.13 + 1.14 +<div id=log></div> 1.15 +<script id="vshader" type="x-shader/x-vertex"> 1.16 +uniform mat2 m2; 1.17 +uniform mat3 m3; 1.18 +uniform mat4 m4; 1.19 +</script> 1.20 +<script> 1.21 +var floatArray = function(n) { 1.22 + var a = []; 1.23 + for (var i = 0; i < n; ++i) { 1.24 + a.push(1); 1.25 + } 1.26 + return a; 1.27 +}; 1.28 +[2, 3, 4].forEach(function(n) { 1.29 + test(function() { 1.30 + var gl = getGl(); 1.31 + var f = "uniformMatrix" + n + "fv"; 1.32 + var loc = gl.getUniformLocation(gl.createProgram(), "m" + n); 1.33 + gl[f](loc, { valueOf: function() { throw "Error"; } }, floatArray(n)); 1.34 + }, "Should not throw for " + n); 1.35 +}); 1.36 +</script>