Bug 1318507 - Cherry-pick affected tests from top-of-tree.

MozReview-Commit-ID: 29K4NZKdkfy
This commit is contained in:
Jeff Gilbert (:jgilbert) 2016-11-21 18:17:45 -08:00
parent 43dafdd33c
commit 072776ecb4
7 changed files with 84 additions and 99 deletions

View File

@ -51,7 +51,7 @@ if (!gl) {
testPassed("WebGL context exists");
bufferDataTest();
bufferDataSizesTest();
bufferDataSizesTest();
bufferSubDataTest();
}
@ -163,12 +163,6 @@ function bufferSubDataTest() {
wtu.glErrorShouldBe(gl, gl.NO_ERROR,
"calling bufferSubData with ArrayBuffer should succeed");
gl.bufferSubData(gl.ARRAY_BUFFER, 10, null);
wtu.glErrorShouldBe(gl, gl.INVALID_VALUE,
"calling bufferSubData when BufferDataSource is null should generate INVALID_VALUE");
wtu.shouldGenerateGLError(gl, gl.INVALID_VALUE, "gl.bufferSubData(gl.ARRAY_BUFFER, 10, undefined)");
gl.bufferSubData(gl.ARRAY_BUFFER, 10, new Float32Array(0));
wtu.glErrorShouldBe(gl, gl.NO_ERROR,
"calling bufferSubData with zero-sized ArrayBufferView should succeed");
@ -179,6 +173,9 @@ function bufferSubDataTest() {
shouldThrow("gl.bufferSubData(gl.ARRAY_BUFFER, 0, \"5.5\");");
shouldThrow("gl.bufferSubData(gl.ARRAY_BUFFER, 0, [4]);");
shouldThrow("gl.bufferSubData(gl.ARRAY_BUFFER, 0, { mynumber: 42});");
shouldThrow("gl.bufferSubData(gl.ARRAY_BUFFER, 10, null)");
shouldThrow("gl.bufferSubData(gl.ARRAY_BUFFER, 10, undefined)");
wtu.glErrorShouldBe(gl, gl.NO_ERROR, "should generate no GL error");
gl.bindBuffer(gl.ARRAY_BUFFER, null);
}

View File

@ -85,6 +85,9 @@ function init()
canvas.addEventListener("webglcontextlost", testLostContext, false);
// We need to initialize |uniformLocation| before losing context.
// Otherwise gl.getUniform() when context is lost will throw.
uniformLocation = gl.getUniformLocation(program, "tex");
loseContext();
}
@ -243,14 +246,14 @@ function testLostContext()
"gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 0, 0, 0, gl.RGBA, gl.UNSIGNED_BYTE, arrayBufferView)",
"gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, imageData)",
"gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, image)",
"gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, canvas)",
"gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, canvas2d)",
"gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, video)",
"gl.texParameterf(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST)",
"gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST)",
"gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, 0, 0, gl.RGBA, gl.UNSIGNED_BYTE, arrayBufferView)",
"gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, gl.RGBA, gl.UNSIGNED_BYTE, imageData)",
"gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, gl.RGBA, gl.UNSIGNED_BYTE, image)",
"gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, gl.RGBA, gl.UNSIGNED_BYTE, canvas)",
"gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, gl.RGBA, gl.UNSIGNED_BYTE, canvas2d)",
"gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, gl.RGBA, gl.UNSIGNED_BYTE, video)",
"gl.uniform1f(uniformLocation, 0)",
"gl.uniform1fv(uniformLocation, float32array)",

View File

@ -51,9 +51,8 @@ var program = wtu.loadStandardProgram(context);
wtu.glErrorShouldBe(context, context.NO_ERROR);
debug("Testing getActiveAttrib");
// Synthetic OpenGL error
shouldBeNull("context.getActiveAttrib(null, 2)");
wtu.glErrorShouldBe(context, context.INVALID_VALUE);
shouldThrow("context.getActiveAttrib(null, 2)");
wtu.glErrorShouldBe(context, context.NO_ERROR);
// Error state should be clear by this point
wtu.glErrorShouldBe(context, context.NO_ERROR);
// Real OpenGL error
@ -63,9 +62,8 @@ wtu.glErrorShouldBe(context, context.INVALID_VALUE);
wtu.glErrorShouldBe(context, context.NO_ERROR);
debug("Testing getActiveUniform");
// Synthetic OpenGL error
shouldBeNull("context.getActiveUniform(null, 0)");
wtu.glErrorShouldBe(context, context.INVALID_VALUE);
shouldThrow("context.getActiveUniform(null, 0)");
wtu.glErrorShouldBe(context, context.NO_ERROR);
// Error state should be clear by this point
wtu.glErrorShouldBe(context, context.NO_ERROR);
// Real OpenGL error

View File

@ -49,16 +49,16 @@ var shouldGenerateGLError = wtu.shouldGenerateGLError;
assertMsg(program != null, "Program Compiled");
assertMsg(shader != null, "Shader Compiled");
shouldGenerateGLError(context, context.INVALID_VALUE, "context.compileShader(undefined)");
shouldGenerateGLError(context, context.INVALID_VALUE, "context.linkProgram(undefined)");
shouldGenerateGLError(context, context.INVALID_VALUE, "context.attachShader(undefined, undefined)");
shouldGenerateGLError(context, context.INVALID_VALUE, "context.attachShader(program, undefined)");
shouldGenerateGLError(context, context.INVALID_VALUE, "context.attachShader(undefined, shader)");
shouldGenerateGLError(context, context.INVALID_VALUE, "context.detachShader(program, undefined)");
shouldGenerateGLError(context, context.INVALID_VALUE, "context.detachShader(undefined, shader)");
shouldGenerateGLError(context, context.INVALID_VALUE, "context.shaderSource(undefined, undefined)");
shouldGenerateGLError(context, context.INVALID_VALUE, "context.shaderSource(undefined, 'foo')");
shouldGenerateGLError(context, context.INVALID_VALUE, "context.bindAttribLocation(undefined, 0, 'foo')");
shouldThrow("context.compileShader(undefined)");
shouldThrow("context.linkProgram(undefined)");
shouldThrow("context.attachShader(undefined, undefined)");
shouldThrow("context.attachShader(program, undefined)");
shouldThrow("context.attachShader(undefined, shader)");
shouldThrow("context.detachShader(program, undefined)");
shouldThrow("context.detachShader(undefined, shader)");
shouldThrow("context.shaderSource(undefined, undefined)");
shouldThrow("context.shaderSource(undefined, 'foo')");
shouldThrow("context.bindAttribLocation(undefined, 0, 'foo')");
shouldThrow("context.bindBuffer(context.ARRAY_BUFFER, 0)");
shouldThrow("context.bindFramebuffer(context.FRAMEBUFFER, 0)");
shouldThrow("context.bindRenderbuffer(context.RENDERBUFFER, 0)");
@ -73,13 +73,13 @@ shouldGenerateGLError(context, context.NO_ERROR, "context.bindRenderbuffer(conte
shouldGenerateGLError(context, context.NO_ERROR, "context.bindTexture(context.TEXTURE_2D, undefined)");
shouldGenerateGLError(context, context.INVALID_OPERATION, "context.framebufferRenderbuffer(context.FRAMEBUFFER, context.DEPTH_ATTACHMENT, context.RENDERBUFFER, null)");
shouldGenerateGLError(context, context.INVALID_OPERATION, "context.framebufferTexture2D(context.FRAMEBUFFER, context.COLOR_ATTACHMENT0, context.TEXTURE_2D, null, 0)");
shouldGenerateGLError(context, context.INVALID_VALUE, "context.getProgramParameter(undefined, 0)");
shouldGenerateGLError(context, context.INVALID_VALUE, "context.getProgramInfoLog(undefined, 0)");
shouldGenerateGLError(context, context.INVALID_VALUE, "context.getShaderParameter(undefined, 0)");
shouldGenerateGLError(context, context.INVALID_VALUE, "context.getShaderInfoLog(undefined, 0)");
shouldGenerateGLError(context, context.INVALID_VALUE, "context.getShaderSource(undefined)");
shouldGenerateGLError(context, context.INVALID_VALUE, "context.getUniform(undefined, null)");
shouldGenerateGLError(context, context.INVALID_VALUE, "context.getUniformLocation(undefined, 'foo')");
shouldThrow("context.getProgramParameter(undefined, 0)");
shouldThrow("context.getProgramInfoLog(undefined, 0)");
shouldThrow("context.getShaderParameter(undefined, 0)");
shouldThrow("context.getShaderInfoLog(undefined, 0)");
shouldThrow("context.getShaderSource(undefined)");
shouldThrow("context.getUniform(undefined, null)");
shouldThrow("context.getUniformLocation(undefined, 'foo')");
debug("");
debug("check with bindings");

View File

@ -57,8 +57,8 @@ shouldBeNull("context.getActiveUniform(program, 1)");
wtu.glErrorShouldBe(context, context.INVALID_VALUE);
shouldBeNull("context.getActiveUniform(program, -1)");
wtu.glErrorShouldBe(context, context.INVALID_VALUE);
shouldBeNull("context.getActiveUniform(null, 0)");
wtu.glErrorShouldBe(context, context.INVALID_VALUE);
shouldThrow("context.getActiveUniform(null, 0)");
wtu.glErrorShouldBe(context, context.NO_ERROR);
// we don't know the order the attribs will appear.
var info = [
@ -114,8 +114,8 @@ shouldBeNull("context.getActiveAttrib(program, 2)");
wtu.glErrorShouldBe(context, context.INVALID_VALUE);
shouldBeNull("context.getActiveAttrib(program, -1)");
wtu.glErrorShouldBe(context, context.INVALID_VALUE);
shouldBeNull("context.getActiveAttrib(null, 0)");
wtu.glErrorShouldBe(context, context.INVALID_VALUE);
shouldThrow("context.getActiveAttrib(null, 0)");
wtu.glErrorShouldBe(context, context.NO_ERROR);
wtu.glErrorShouldBe(context2, context.NO_ERROR);

View File

@ -46,7 +46,7 @@ var constants = {
DEPTH_BUFFER_BIT : 0x00000100,
STENCIL_BUFFER_BIT : 0x00000400,
COLOR_BUFFER_BIT : 0x00004000,
/* BeginMode */
POINTS : 0x0000,
LINES : 0x0001,
@ -55,7 +55,7 @@ LINE_STRIP : 0x0003,
TRIANGLES : 0x0004,
TRIANGLE_STRIP : 0x0005,
TRIANGLE_FAN : 0x0006,
/* AlphaFunction (not supported in ES20) */
/* NEVER */
/* LESS */
@ -65,7 +65,7 @@ TRIANGLE_FAN : 0x0006,
/* NOTEQUAL */
/* GEQUAL */
/* ALWAYS */
/* BlendingFactorDest */
ZERO : 0,
ONE : 1,
@ -75,7 +75,7 @@ SRC_ALPHA : 0x0302,
ONE_MINUS_SRC_ALPHA : 0x0303,
DST_ALPHA : 0x0304,
ONE_MINUS_DST_ALPHA : 0x0305,
/* BlendingFactorSrc */
/* ZERO */
/* ONE */
@ -86,17 +86,17 @@ SRC_ALPHA_SATURATE : 0x0308,
/* ONE_MINUS_SRC_ALPHA */
/* DST_ALPHA */
/* ONE_MINUS_DST_ALPHA */
/* BlendEquationSeparate */
FUNC_ADD : 0x8006,
BLEND_EQUATION : 0x8009,
BLEND_EQUATION_RGB : 0x8009, /* same as BLEND_EQUATION */
BLEND_EQUATION_ALPHA : 0x883D,
/* BlendSubtract */
FUNC_SUBTRACT : 0x800A,
FUNC_REVERSE_SUBTRACT : 0x800B,
/* Separate Blend Functions */
BLEND_DST_RGB : 0x80C8,
BLEND_SRC_RGB : 0x80C9,
@ -107,27 +107,27 @@ ONE_MINUS_CONSTANT_COLOR : 0x8002,
CONSTANT_ALPHA : 0x8003,
ONE_MINUS_CONSTANT_ALPHA : 0x8004,
BLEND_COLOR : 0x8005,
/* Buffer Objects */
ARRAY_BUFFER : 0x8892,
ELEMENT_ARRAY_BUFFER : 0x8893,
ARRAY_BUFFER_BINDING : 0x8894,
ELEMENT_ARRAY_BUFFER_BINDING : 0x8895,
STREAM_DRAW : 0x88E0,
STATIC_DRAW : 0x88E4,
DYNAMIC_DRAW : 0x88E8,
BUFFER_SIZE : 0x8764,
BUFFER_USAGE : 0x8765,
CURRENT_VERTEX_ATTRIB : 0x8626,
/* CullFaceMode */
FRONT : 0x0404,
BACK : 0x0405,
FRONT_AND_BACK : 0x0408,
/* DepthFunction */
/* NEVER */
/* LESS */
@ -137,7 +137,7 @@ FRONT_AND_BACK : 0x0408,
/* NOTEQUAL */
/* GEQUAL */
/* ALWAYS */
/* EnableCap */
/* TEXTURE_2D */
CULL_FACE : 0x0B44,
@ -149,18 +149,18 @@ SCISSOR_TEST : 0x0C11,
POLYGON_OFFSET_FILL : 0x8037,
SAMPLE_ALPHA_TO_COVERAGE : 0x809E,
SAMPLE_COVERAGE : 0x80A0,
/* ErrorCode */
NO_ERROR : 0,
INVALID_ENUM : 0x0500,
INVALID_VALUE : 0x0501,
INVALID_OPERATION : 0x0502,
OUT_OF_MEMORY : 0x0505,
/* FrontFaceDirection */
CW : 0x0900,
CCW : 0x0901,
/* GetPName */
LINE_WIDTH : 0x0B21,
ALIASED_POINT_SIZE_RANGE : 0x846D,
@ -210,23 +210,23 @@ SAMPLE_BUFFERS : 0x80A8,
SAMPLES : 0x80A9,
SAMPLE_COVERAGE_VALUE : 0x80AA,
SAMPLE_COVERAGE_INVERT : 0x80AB,
/* GetTextureParameter */
/* TEXTURE_MAG_FILTER */
/* TEXTURE_MIN_FILTER */
/* TEXTURE_WRAP_S */
/* TEXTURE_WRAP_T */
COMPRESSED_TEXTURE_FORMATS : 0x86A3,
/* HintMode */
DONT_CARE : 0x1100,
FASTEST : 0x1101,
NICEST : 0x1102,
/* HintTarget */
GENERATE_MIPMAP_HINT : 0x8192,
/* DataType */
BYTE : 0x1400,
UNSIGNED_BYTE : 0x1401,
@ -235,7 +235,7 @@ UNSIGNED_SHORT : 0x1403,
INT : 0x1404,
UNSIGNED_INT : 0x1405,
FLOAT : 0x1406,
/* PixelFormat */
DEPTH_COMPONENT : 0x1902,
ALPHA : 0x1906,
@ -243,13 +243,13 @@ RGB : 0x1907,
RGBA : 0x1908,
LUMINANCE : 0x1909,
LUMINANCE_ALPHA : 0x190A,
/* PixelType */
/* UNSIGNED_BYTE */
UNSIGNED_SHORT_4_4_4_4 : 0x8033,
UNSIGNED_SHORT_5_5_5_1 : 0x8034,
UNSIGNED_SHORT_5_6_5 : 0x8363,
/* Shaders */
FRAGMENT_SHADER : 0x8B30,
VERTEX_SHADER : 0x8B31,
@ -269,7 +269,7 @@ ACTIVE_UNIFORMS : 0x8B86,
ACTIVE_ATTRIBUTES : 0x8B89,
SHADING_LANGUAGE_VERSION : 0x8B8C,
CURRENT_PROGRAM : 0x8B8D,
/* StencilFunction */
NEVER : 0x0200,
LESS : 0x0201,
@ -279,7 +279,7 @@ GREATER : 0x0204,
NOTEQUAL : 0x0205,
GEQUAL : 0x0206,
ALWAYS : 0x0207,
/* StencilOp */
/* ZERO */
KEEP : 0x1E00,
@ -289,16 +289,16 @@ DECR : 0x1E03,
INVERT : 0x150A,
INCR_WRAP : 0x8507,
DECR_WRAP : 0x8508,
/* StringName */
VENDOR : 0x1F00,
RENDERER : 0x1F01,
VERSION : 0x1F02,
/* TextureMagFilter */
NEAREST : 0x2600,
LINEAR : 0x2601,
/* TextureMinFilter */
/* NEAREST */
/* LINEAR */
@ -306,17 +306,17 @@ NEAREST_MIPMAP_NEAREST : 0x2700,
LINEAR_MIPMAP_NEAREST : 0x2701,
NEAREST_MIPMAP_LINEAR : 0x2702,
LINEAR_MIPMAP_LINEAR : 0x2703,
/* TextureParameterName */
TEXTURE_MAG_FILTER : 0x2800,
TEXTURE_MIN_FILTER : 0x2801,
TEXTURE_WRAP_S : 0x2802,
TEXTURE_WRAP_T : 0x2803,
/* TextureTarget */
TEXTURE_2D : 0x0DE1,
TEXTURE : 0x1702,
TEXTURE_CUBE_MAP : 0x8513,
TEXTURE_BINDING_CUBE_MAP : 0x8514,
TEXTURE_CUBE_MAP_POSITIVE_X : 0x8515,
@ -326,7 +326,7 @@ TEXTURE_CUBE_MAP_NEGATIVE_Y : 0x8518,
TEXTURE_CUBE_MAP_POSITIVE_Z : 0x8519,
TEXTURE_CUBE_MAP_NEGATIVE_Z : 0x851A,
MAX_CUBE_MAP_TEXTURE_SIZE : 0x851C,
/* TextureUnit */
TEXTURE0 : 0x84C0,
TEXTURE1 : 0x84C1,
@ -361,12 +361,12 @@ TEXTURE29 : 0x84DD,
TEXTURE30 : 0x84DE,
TEXTURE31 : 0x84DF,
ACTIVE_TEXTURE : 0x84E0,
/* TextureWrapMode */
REPEAT : 0x2901,
CLAMP_TO_EDGE : 0x812F,
MIRRORED_REPEAT : 0x8370,
/* Uniform Types */
FLOAT_VEC2 : 0x8B50,
FLOAT_VEC3 : 0x8B51,
@ -383,7 +383,7 @@ FLOAT_MAT3 : 0x8B5B,
FLOAT_MAT4 : 0x8B5C,
SAMPLER_2D : 0x8B5E,
SAMPLER_CUBE : 0x8B60,
/* Vertex Arrays */
VERTEX_ATTRIB_ARRAY_ENABLED : 0x8622,
VERTEX_ATTRIB_ARRAY_SIZE : 0x8623,
@ -392,10 +392,10 @@ VERTEX_ATTRIB_ARRAY_TYPE : 0x8625,
VERTEX_ATTRIB_ARRAY_NORMALIZED : 0x886A,
VERTEX_ATTRIB_ARRAY_POINTER : 0x8645,
VERTEX_ATTRIB_ARRAY_BUFFER_BINDING : 0x889F,
/* Shader Source */
COMPILE_STATUS : 0x8B81,
/* Shader Precision-Specified Types */
LOW_FLOAT : 0x8DF0,
MEDIUM_FLOAT : 0x8DF1,
@ -403,11 +403,11 @@ HIGH_FLOAT : 0x8DF2,
LOW_INT : 0x8DF3,
MEDIUM_INT : 0x8DF4,
HIGH_INT : 0x8DF5,
/* Framebuffer Object. */
FRAMEBUFFER : 0x8D40,
RENDERBUFFER : 0x8D41,
RGBA4 : 0x8056,
RGB5_A1 : 0x8057,
RGB565 : 0x8D62,
@ -415,7 +415,7 @@ DEPTH_COMPONENT16 : 0x81A5,
STENCIL_INDEX : 0x1901,
STENCIL_INDEX8 : 0x8D48,
DEPTH_STENCIL : 0x84F9,
RENDERBUFFER_WIDTH : 0x8D42,
RENDERBUFFER_HEIGHT : 0x8D43,
RENDERBUFFER_INTERNAL_FORMAT : 0x8D44,
@ -425,29 +425,29 @@ RENDERBUFFER_BLUE_SIZE : 0x8D52,
RENDERBUFFER_ALPHA_SIZE : 0x8D53,
RENDERBUFFER_DEPTH_SIZE : 0x8D54,
RENDERBUFFER_STENCIL_SIZE : 0x8D55,
FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE : 0x8CD0,
FRAMEBUFFER_ATTACHMENT_OBJECT_NAME : 0x8CD1,
FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL : 0x8CD2,
FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE : 0x8CD3,
COLOR_ATTACHMENT0 : 0x8CE0,
DEPTH_ATTACHMENT : 0x8D00,
STENCIL_ATTACHMENT : 0x8D20,
DEPTH_STENCIL_ATTACHMENT : 0x821A,
NONE : 0,
FRAMEBUFFER_COMPLETE : 0x8CD5,
FRAMEBUFFER_INCOMPLETE_ATTACHMENT : 0x8CD6,
FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT : 0x8CD7,
FRAMEBUFFER_INCOMPLETE_DIMENSIONS : 0x8CD9,
FRAMEBUFFER_UNSUPPORTED : 0x8CDD,
FRAMEBUFFER_BINDING : 0x8CA6,
RENDERBUFFER_BINDING : 0x8CA7,
MAX_RENDERBUFFER_SIZE : 0x84E8,
INVALID_FRAMEBUFFER_OPERATION : 0x0506,
IMPLEMENTATION_COLOR_READ_TYPE : 0x8B9A,
@ -715,26 +715,13 @@ ANY_SAMPLES_PASSED : 0x8C2F,
ANY_SAMPLES_PASSED_CONSERVATIVE : 0x8D6A,
SAMPLER_BINDING : 0x8919,
RGB10_A2UI : 0x906F,
GREEN : 0x1904,
BLUE : 0x1905,
INT_2_10_10_10_REV : 0x8D9F,
TRANSFORM_FEEDBACK : 0x8E22,
TRANSFORM_FEEDBACK_PAUSED : 0x8E23,
TRANSFORM_FEEDBACK_ACTIVE : 0x8E24,
TRANSFORM_FEEDBACK_BINDING : 0x8E25,
COMPRESSED_R11_EAC : 0x9270,
COMPRESSED_SIGNED_R11_EAC : 0x9271,
COMPRESSED_RG11_EAC : 0x9272,
COMPRESSED_SIGNED_RG11_EAC : 0x9273,
COMPRESSED_RGB8_ETC2 : 0x9274,
COMPRESSED_SRGB8_ETC2 : 0x9275,
COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 : 0x9276,
COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 : 0x9277,
COMPRESSED_RGBA8_ETC2_EAC : 0x9278,
COMPRESSED_SRGB8_ALPHA8_ETC2_EAC : 0x9279,
TEXTURE_IMMUTABLE_FORMAT : 0x912F,
MAX_ELEMENT_INDEX : 0x8D6B,
NUM_SAMPLE_COUNTS : 0x9380,
TEXTURE_IMMUTABLE_LEVELS : 0x82DF,
/* WebGL-specific enums */

View File

@ -315,8 +315,8 @@ var shaders = gl.getAttachedShaders(standardProgram);
shouldBe('shaders.length', '2');
shouldBeTrue('shaders[0] == standardVert && shaders[1] == standardFrag || shaders[1] == standardVert && shaders[0] == standardFrag');
wtu.glErrorShouldBe(gl, gl.NO_ERROR);
gl.getAttachedShaders(null);
wtu.glErrorShouldBe(gl, gl.INVALID_VALUE);
shouldThrow('gl.getAttachedShaders(null)');
wtu.glErrorShouldBe(gl, gl.NO_ERROR);
shouldThrow('gl.getAttachedShaders(standardVert)');
wtu.glErrorShouldBe(gl, gl.NO_ERROR);