Diff
Modified: trunk/LayoutTests/ChangeLog (179858 => 179859)
--- trunk/LayoutTests/ChangeLog 2015-02-10 00:43:57 UTC (rev 179858)
+++ trunk/LayoutTests/ChangeLog 2015-02-10 01:02:28 UTC (rev 179859)
@@ -1,3 +1,35 @@
+2015-02-09 Roger Fong <[email protected]>
+
+ WebGL: Update 1.0.2 conformance layout tests and address new failure.
+ https://bugs.webkit.org/show_bug.cgi?id=141408.
+ <rdar://problem/19773236>
+
+ Reviewed by Dean Jackson.
+
+ * fast/canvas/webgl/bad-arguments-test-expected.txt: Removed.
+ * fast/canvas/webgl/bad-arguments-test.html: Removed. Redundant test case.
+ * webgl/1.0.2/resources/webgl_test_files/README.md:
+ * webgl/1.0.2/resources/webgl_test_files/conformance/attribs/gl-disabled-vertex-attrib.html:
+ * webgl/1.0.2/resources/webgl_test_files/conformance/context/context-creation-and-destruction.html:
+ * webgl/1.0.2/resources/webgl_test_files/conformance/extensions/webgl-compressed-texture-s3tc.html:
+ * webgl/1.0.2/resources/webgl_test_files/conformance/extensions/webgl-debug-shaders.html:
+ * webgl/1.0.2/resources/webgl_test_files/conformance/extensions/webgl-depth-texture.html:
+ * webgl/1.0.2/resources/webgl_test_files/conformance/glsl/misc/shader-with-array-of-structs-containing-arrays.html:
+ * webgl/1.0.2/resources/webgl_test_files/conformance/misc/bad-arguments-test.html:
+ * webgl/1.0.2/resources/webgl_test_files/conformance/misc/webgl-specific.html:
+ * webgl/1.0.2/resources/webgl_test_files/conformance/more/functions/uniformMatrixBadArgs.html:
+ * webgl/1.0.2/resources/webgl_test_files/conformance/more/unit.js:
+ * webgl/1.0.2/resources/webgl_test_files/conformance/more/util.js:
+ (VBO.prototype.use):
+ * webgl/1.0.2/resources/webgl_test_files/conformance/rendering/multisample-corruption.html:
+ * webgl/1.0.2/resources/webgl_test_files/conformance/resources/fragmentShader.frag:
+ * webgl/1.0.2/resources/webgl_test_files/conformance/resources/glsl-generator.js:
+ * webgl/1.0.2/resources/webgl_test_files/conformance/resources/vertexShader.vert:
+ * webgl/1.0.2/resources/webgl_test_files/conformance/resources/webgl-test-utils.js:
+ (WebGLTestUtils):
+ * webgl/1.0.2/resources/webgl_test_files/test-guidelines.md:
+ * webgl/1.0.2/resources/webgl_test_files/webgl-conformance-tests.html:
+
2015-02-09 Jer Noble <[email protected]>
[WebAudio] AudioBufferSourceNodes should accurately play backwards if given a negative playbackRate.
Deleted: trunk/LayoutTests/fast/canvas/webgl/bad-arguments-test-expected.txt (179858 => 179859)
--- trunk/LayoutTests/fast/canvas/webgl/bad-arguments-test-expected.txt 2015-02-10 00:43:57 UTC (rev 179858)
+++ trunk/LayoutTests/fast/canvas/webgl/bad-arguments-test-expected.txt 2015-02-10 01:02:28 UTC (rev 179859)
@@ -1,115 +0,0 @@
-Tests calling WebGL APIs with wrong argument types
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-PASS Program Compiled
-PASS Shader Compiled
-PASS getUniformLocation succeeded
-PASS context.compileShader(argument) threw exception TypeError: Argument 1 ('shader') to WebGLRenderingContextBase.compileShader must be an instance of WebGLShader.
-PASS context.linkProgram(argument) threw exception TypeError: Argument 1 ('program') to WebGLRenderingContextBase.linkProgram must be an instance of WebGLProgram.
-PASS context.attachShader(program, argument) threw exception TypeError: Argument 2 ('shader') to WebGLRenderingContextBase.attachShader must be an instance of WebGLShader.
-PASS context.attachShader(argument, shader) threw exception TypeError: Argument 1 ('program') to WebGLRenderingContextBase.attachShader must be an instance of WebGLProgram.
-PASS context.detachShader(program, argument) threw exception TypeError: Argument 2 ('shader') to WebGLRenderingContextBase.detachShader must be an instance of WebGLShader.
-PASS context.detachShader(argument, shader) threw exception TypeError: Argument 1 ('program') to WebGLRenderingContextBase.detachShader must be an instance of WebGLProgram.
-PASS context.useProgram(argument) threw exception TypeError: Argument 1 ('program') to WebGLRenderingContextBase.useProgram must be an instance of WebGLProgram.
-PASS context.shaderSource(argument, 'foo') threw exception TypeError: Argument 1 ('shader') to WebGLRenderingContextBase.shaderSource must be an instance of WebGLShader.
-PASS context.bindAttribLocation(argument, 0, 'foo') threw exception TypeError: Argument 1 ('program') to WebGLRenderingContextBase.bindAttribLocation must be an instance of WebGLProgram.
-PASS context.bindBuffer(context.ARRAY_BUFFER, argument) threw exception TypeError: Argument 2 ('buffer') to WebGLRenderingContextBase.bindBuffer must be an instance of WebGLBuffer.
-PASS context.bindFramebuffer(context.FRAMEBUFFER, argument) threw exception TypeError: Argument 2 ('framebuffer') to WebGLRenderingContextBase.bindFramebuffer must be an instance of WebGLFramebuffer.
-PASS context.bindRenderbuffer(context.RENDERBUFFER, argument) threw exception TypeError: Argument 2 ('renderbuffer') to WebGLRenderingContextBase.bindRenderbuffer must be an instance of WebGLRenderbuffer.
-PASS context.bindTexture(context.TEXTURE_2D, argument) threw exception TypeError: Argument 2 ('texture') to WebGLRenderingContextBase.bindTexture must be an instance of WebGLTexture.
-PASS context.framebufferRenderbuffer(context.FRAMEBUFFER, context.DEPTH_ATTACHMENT, context.RENDERBUFFER, argument) threw exception TypeError: Argument 4 ('renderbuffer') to WebGLRenderingContextBase.framebufferRenderbuffer must be an instance of WebGLRenderbuffer.
-PASS context.framebufferTexture2D(context.FRAMEBUFFER, context.COLOR_ATTACHMENT0, context.TEXTURE_2D, argument, 0) threw exception TypeError: Argument 4 ('texture') to WebGLRenderingContextBase.framebufferTexture2D must be an instance of WebGLTexture.
-PASS context.uniform2fv(argument, new Float32Array([0.0, 0.0])) threw exception TypeError: Type error.
-PASS context.uniform2iv(argument, new Int32Array([0, 0])) threw exception TypeError: Type error.
-PASS context.uniformMatrix2fv(argument, false, new Float32Array([0.0, 0.0, 0.0, 0.0])) threw exception TypeError: Type error.
-PASS context.getProgramParameter(argument, 0) threw exception TypeError: Type error.
-PASS context.getShaderParameter(argument, 0) threw exception TypeError: Type error.
-PASS context.getUniform(argument, loc) threw exception TypeError: Type error.
-PASS context.getUniform(program, argument) threw exception TypeError: Type error.
-PASS context.getUniformLocation(argument, 'u_modelViewProjMatrix') threw exception TypeError: Argument 1 ('program') to WebGLRenderingContextBase.getUniformLocation must be an instance of WebGLProgram.
-PASS context.getProgramInfoLog(argument) threw exception TypeError: Argument 1 ('program') to WebGLRenderingContextBase.getProgramInfoLog must be an instance of WebGLProgram.
-PASS context.getShaderInfoLog(argument) threw exception TypeError: Argument 1 ('shader') to WebGLRenderingContextBase.getShaderInfoLog must be an instance of WebGLShader.
-PASS context.getShaderSource(argument) threw exception TypeError: Argument 1 ('shader') to WebGLRenderingContextBase.getShaderSource must be an instance of WebGLShader.
-PASS context.compileShader(argument) threw exception TypeError: Argument 1 ('shader') to WebGLRenderingContextBase.compileShader must be an instance of WebGLShader.
-PASS context.linkProgram(argument) threw exception TypeError: Argument 1 ('program') to WebGLRenderingContextBase.linkProgram must be an instance of WebGLProgram.
-PASS context.attachShader(program, argument) threw exception TypeError: Argument 2 ('shader') to WebGLRenderingContextBase.attachShader must be an instance of WebGLShader.
-PASS context.attachShader(argument, shader) threw exception TypeError: Argument 1 ('program') to WebGLRenderingContextBase.attachShader must be an instance of WebGLProgram.
-PASS context.detachShader(program, argument) threw exception TypeError: Argument 2 ('shader') to WebGLRenderingContextBase.detachShader must be an instance of WebGLShader.
-PASS context.detachShader(argument, shader) threw exception TypeError: Argument 1 ('program') to WebGLRenderingContextBase.detachShader must be an instance of WebGLProgram.
-PASS context.useProgram(argument) threw exception TypeError: Argument 1 ('program') to WebGLRenderingContextBase.useProgram must be an instance of WebGLProgram.
-PASS context.shaderSource(argument, 'foo') threw exception TypeError: Argument 1 ('shader') to WebGLRenderingContextBase.shaderSource must be an instance of WebGLShader.
-PASS context.bindAttribLocation(argument, 0, 'foo') threw exception TypeError: Argument 1 ('program') to WebGLRenderingContextBase.bindAttribLocation must be an instance of WebGLProgram.
-PASS context.bindBuffer(context.ARRAY_BUFFER, argument) threw exception TypeError: Argument 2 ('buffer') to WebGLRenderingContextBase.bindBuffer must be an instance of WebGLBuffer.
-PASS context.bindFramebuffer(context.FRAMEBUFFER, argument) threw exception TypeError: Argument 2 ('framebuffer') to WebGLRenderingContextBase.bindFramebuffer must be an instance of WebGLFramebuffer.
-PASS context.bindRenderbuffer(context.RENDERBUFFER, argument) threw exception TypeError: Argument 2 ('renderbuffer') to WebGLRenderingContextBase.bindRenderbuffer must be an instance of WebGLRenderbuffer.
-PASS context.bindTexture(context.TEXTURE_2D, argument) threw exception TypeError: Argument 2 ('texture') to WebGLRenderingContextBase.bindTexture must be an instance of WebGLTexture.
-PASS context.framebufferRenderbuffer(context.FRAMEBUFFER, context.DEPTH_ATTACHMENT, context.RENDERBUFFER, argument) threw exception TypeError: Argument 4 ('renderbuffer') to WebGLRenderingContextBase.framebufferRenderbuffer must be an instance of WebGLRenderbuffer.
-PASS context.framebufferTexture2D(context.FRAMEBUFFER, context.COLOR_ATTACHMENT0, context.TEXTURE_2D, argument, 0) threw exception TypeError: Argument 4 ('texture') to WebGLRenderingContextBase.framebufferTexture2D must be an instance of WebGLTexture.
-PASS context.uniform2fv(argument, new Float32Array([0.0, 0.0])) threw exception TypeError: Type error.
-PASS context.uniform2iv(argument, new Int32Array([0, 0])) threw exception TypeError: Type error.
-PASS context.uniformMatrix2fv(argument, false, new Float32Array([0.0, 0.0, 0.0, 0.0])) threw exception TypeError: Type error.
-PASS context.getProgramParameter(argument, 0) threw exception TypeError: Type error.
-PASS context.getShaderParameter(argument, 0) threw exception TypeError: Type error.
-PASS context.getUniform(argument, loc) threw exception TypeError: Type error.
-PASS context.getUniform(program, argument) threw exception TypeError: Type error.
-PASS context.getUniformLocation(argument, 'u_modelViewProjMatrix') threw exception TypeError: Argument 1 ('program') to WebGLRenderingContextBase.getUniformLocation must be an instance of WebGLProgram.
-PASS context.getProgramInfoLog(argument) threw exception TypeError: Argument 1 ('program') to WebGLRenderingContextBase.getProgramInfoLog must be an instance of WebGLProgram.
-PASS context.getShaderInfoLog(argument) threw exception TypeError: Argument 1 ('shader') to WebGLRenderingContextBase.getShaderInfoLog must be an instance of WebGLShader.
-PASS context.getShaderSource(argument) threw exception TypeError: Argument 1 ('shader') to WebGLRenderingContextBase.getShaderSource must be an instance of WebGLShader.
-PASS context.compileShader(argument) is undefined.
-PASS context.linkProgram(argument) is undefined.
-PASS context.attachShader(program, argument) is undefined.
-PASS context.attachShader(argument, shader) is undefined.
-PASS context.detachShader(program, argument) is undefined.
-PASS context.detachShader(argument, shader) is undefined.
-PASS context.useProgram(argument) is undefined.
-PASS context.shaderSource(argument, 'foo') is undefined.
-PASS context.bindAttribLocation(argument, 0, 'foo') is undefined.
-PASS context.bindBuffer(context.ARRAY_BUFFER, argument) is undefined.
-PASS context.bindFramebuffer(context.FRAMEBUFFER, argument) is undefined.
-PASS context.bindRenderbuffer(context.RENDERBUFFER, argument) is undefined.
-PASS context.bindTexture(context.TEXTURE_2D, argument) is undefined.
-PASS context.framebufferRenderbuffer(context.FRAMEBUFFER, context.DEPTH_ATTACHMENT, context.RENDERBUFFER, argument) is undefined.
-PASS context.framebufferTexture2D(context.FRAMEBUFFER, context.COLOR_ATTACHMENT0, context.TEXTURE_2D, argument, 0) is undefined.
-PASS context.uniform2fv(argument, new Float32Array([0.0, 0.0])) is undefined.
-PASS context.uniform2iv(argument, new Int32Array([0, 0])) is undefined.
-PASS context.uniformMatrix2fv(argument, false, new Float32Array([0.0, 0.0, 0.0, 0.0])) is undefined.
-PASS context.getProgramParameter(argument, 0) is null
-PASS context.getShaderParameter(argument, 0) is null
-PASS context.getUniform(argument, loc) is null
-PASS context.getUniform(program, argument) is null
-PASS context.getUniformLocation(argument, 'u_modelViewProjMatrix') is null
-PASS context.getProgramInfoLog(argument) is ''
-PASS context.getShaderInfoLog(argument) is ''
-PASS context.getShaderSource(argument) is ''
-PASS context.compileShader(argument) is undefined.
-PASS context.linkProgram(argument) is undefined.
-PASS context.attachShader(program, argument) is undefined.
-PASS context.attachShader(argument, shader) is undefined.
-PASS context.detachShader(program, argument) is undefined.
-PASS context.detachShader(argument, shader) is undefined.
-PASS context.useProgram(argument) is undefined.
-PASS context.shaderSource(argument, 'foo') is undefined.
-PASS context.bindAttribLocation(argument, 0, 'foo') is undefined.
-PASS context.bindBuffer(context.ARRAY_BUFFER, argument) is undefined.
-PASS context.bindFramebuffer(context.FRAMEBUFFER, argument) is undefined.
-PASS context.bindRenderbuffer(context.RENDERBUFFER, argument) is undefined.
-PASS context.bindTexture(context.TEXTURE_2D, argument) is undefined.
-PASS context.framebufferRenderbuffer(context.FRAMEBUFFER, context.DEPTH_ATTACHMENT, context.RENDERBUFFER, argument) is undefined.
-PASS context.framebufferTexture2D(context.FRAMEBUFFER, context.COLOR_ATTACHMENT0, context.TEXTURE_2D, argument, 0) is undefined.
-PASS context.uniform2fv(argument, new Float32Array([0.0, 0.0])) is undefined.
-PASS context.uniform2iv(argument, new Int32Array([0, 0])) is undefined.
-PASS context.uniformMatrix2fv(argument, false, new Float32Array([0.0, 0.0, 0.0, 0.0])) is undefined.
-PASS context.getProgramParameter(argument, 0) is null
-PASS context.getShaderParameter(argument, 0) is null
-PASS context.getUniform(argument, loc) is null
-PASS context.getUniform(program, argument) is null
-PASS context.getUniformLocation(argument, 'u_modelViewProjMatrix') is null
-PASS context.getProgramInfoLog(argument) is ''
-PASS context.getShaderInfoLog(argument) is ''
-PASS context.getShaderSource(argument) is ''
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
Deleted: trunk/LayoutTests/fast/canvas/webgl/bad-arguments-test.html (179858 => 179859)
--- trunk/LayoutTests/fast/canvas/webgl/bad-arguments-test.html 2015-02-10 00:43:57 UTC (rev 179858)
+++ trunk/LayoutTests/fast/canvas/webgl/bad-arguments-test.html 2015-02-10 01:02:28 UTC (rev 179859)
@@ -1,89 +0,0 @@
-<html>
-<head>
-<script src=""
-<script src=""
-<script src=""
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-
-<script>
-if (window.internals)
- window.internals.settings.setWebGLErrorsToConsoleEnabled(false);
-
-var wtu = WebGLTestUtils;
-description("Tests calling WebGL APIs with wrong argument types");
-
-var context = wtu.create3DContext();
-var program = wtu.loadStandardProgram(context);
-var shader = wtu.loadStandardVertexShader(context);
-var shouldGenerateGLError = wtu.shouldGenerateGLError;
-
-assertMsg(program != null, "Program Compiled");
-assertMsg(shader != null, "Shader Compiled");
-
-var loc = context.getUniformLocation(program, "u_modelViewProjMatrix");
-assertMsg(loc != null, "getUniformLocation succeeded");
-
-var arguments = [
- { value: "foo",
- throw: true },
- { value: 0,
- throw: true },
- { value: null,
- throw: false },
- { value: undefined,
- throw: false }
-];
-
-var argument;
-
-function shouldBeEmptyString(command) {
- shouldBe(command, "''");
-}
-
-for (var i = 0; i < arguments.length; ++i) {
- var func, func2, func3;
- if (arguments[i].throw) {
- func = shouldThrow;
- func2 = shouldThrow;
- func3 = shouldThrow;
- } else {
- func = shouldBeUndefined;
- func2 = shouldBeNull;
- func3 = shouldBeEmptyString;
- }
- argument = arguments[i].value;
- func("context.compileShader(argument)");
- func("context.linkProgram(argument)");
- func("context.attachShader(program, argument)");
- func("context.attachShader(argument, shader)");
- func("context.detachShader(program, argument)");
- func("context.detachShader(argument, shader)");
- func("context.useProgram(argument)");
- func("context.shaderSource(argument, 'foo')");
- func("context.bindAttribLocation(argument, 0, 'foo')");
- func("context.bindBuffer(context.ARRAY_BUFFER, argument)");
- func("context.bindFramebuffer(context.FRAMEBUFFER, argument)");
- func("context.bindRenderbuffer(context.RENDERBUFFER, argument)");
- func("context.bindTexture(context.TEXTURE_2D, argument)");
- func("context.framebufferRenderbuffer(context.FRAMEBUFFER, context.DEPTH_ATTACHMENT, context.RENDERBUFFER, argument)");
- func("context.framebufferTexture2D(context.FRAMEBUFFER, context.COLOR_ATTACHMENT0, context.TEXTURE_2D, argument, 0)");
- func("context.uniform2fv(argument, new Float32Array([0.0, 0.0]))");
- func("context.uniform2iv(argument, new Int32Array([0, 0]))");
- func("context.uniformMatrix2fv(argument, false, new Float32Array([0.0, 0.0, 0.0, 0.0]))");
-
- func2("context.getProgramParameter(argument, 0)");
- func2("context.getShaderParameter(argument, 0)");
- func2("context.getUniform(argument, loc)");
- func2("context.getUniform(program, argument)");
- func2("context.getUniformLocation(argument, 'u_modelViewProjMatrix')");
-
- func3("context.getProgramInfoLog(argument)");
- func3("context.getShaderInfoLog(argument)");
- func3("context.getShaderSource(argument)");
-}
-</script>
-</body>
-</html>
Modified: trunk/LayoutTests/webgl/1.0.2/resources/webgl_test_files/README.md (179858 => 179859)
--- trunk/LayoutTests/webgl/1.0.2/resources/webgl_test_files/README.md 2015-02-10 00:43:57 UTC (rev 179858)
+++ trunk/LayoutTests/webgl/1.0.2/resources/webgl_test_files/README.md 2015-02-10 01:02:28 UTC (rev 179859)
@@ -43,7 +43,7 @@
Example: webgl-conformance-tests.html?version=1.3.2
minVersion: Set to the minimum version of each test to include. Only tests
- at this version or above will be inlcuded.
+ at this version or above will be included.
Example: webgl-conformance-tests.html?minVersion=1.3.2
Modified: trunk/LayoutTests/webgl/1.0.2/resources/webgl_test_files/conformance/attribs/gl-disabled-vertex-attrib.html (179858 => 179859)
--- trunk/LayoutTests/webgl/1.0.2/resources/webgl_test_files/conformance/attribs/gl-disabled-vertex-attrib.html 2015-02-10 00:43:57 UTC (rev 179858)
+++ trunk/LayoutTests/webgl/1.0.2/resources/webgl_test_files/conformance/attribs/gl-disabled-vertex-attrib.html 2015-02-10 01:02:28 UTC (rev 179859)
@@ -44,20 +44,20 @@
attribute vec4 a_position;
attribute vec4 a_color;
varying vec4 v_color;
+bool isCorrectColor(vec4 v) {
+ return v.x == 0.0 && v.y == 0.0 && v.z == 0.0 && v.w == 1.0;
+}
void main() {
gl_Position = a_position;
- v_color = a_color;
+ v_color = isCorrectColor(a_color) ? vec4(0, 1, 0, 1) : vec4(1, 0, 0, 1);
}
</script>
<script id="fshader" type="x-shader/x-fragment">
precision mediump float;
varying vec4 v_color;
-bool isCorrectColor(vec4 v) {
- return v.x == 0.0 && v.y == 0.0 && v.z == 0.0 && v.w == 1.0;
-}
void main() {
- gl_FragColor = isCorrectColor(v_color) ? vec4(0, 1, 0, 1) : vec4(1, 0, 0, 1);
+ gl_FragColor = v_color;
}
</script>
Modified: trunk/LayoutTests/webgl/1.0.2/resources/webgl_test_files/conformance/context/context-creation-and-destruction.html (179858 => 179859)
--- trunk/LayoutTests/webgl/1.0.2/resources/webgl_test_files/conformance/context/context-creation-and-destruction.html 2015-02-10 00:43:57 UTC (rev 179858)
+++ trunk/LayoutTests/webgl/1.0.2/resources/webgl_test_files/conformance/context/context-creation-and-destruction.html 2015-02-10 01:02:28 UTC (rev 179859)
@@ -32,49 +32,21 @@
<title>Test that contexts are freed and garbage collected reasonably</title>
<link rel="stylesheet" href=""
<script src=""
-<script src="" </script>
<script src="" </script>
+<script src="" </script>
</head>
<body>
<div id="description"></div>
<div id="console"></div>
<script>
"use strict";
-var wtu = WebGLTestUtils;
-var target = 500;
-var count = 0;
-
description();
-doNextTest();
-// Creates a canvas and a texture then exits. There are
-// no references to either so both should be garbage collected.
-function test() {
- var canvas = document.createElement("canvas");
- // This is safe for any device. See drawingBufferWidth in spec.
- canvas.width = 2048;
- canvas.height = 2048;
- var gl = wtu.create3DContext(canvas);
- var maxTextureSize = gl.getParameter(gl.MAX_TEXTURE_SIZE);
- var size = Math.min(1024, maxTextureSize);
- var tex = gl.createTexture();
- gl.bindTexture(gl.TEXTURE_2D, tex);
- gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, size, size, 0, gl.RGBA, gl.UNSIGNED_BYTE,
- new Uint8Array(size * size * 4));
- gl.clear(gl.COLOR_BUFFER_BIT);
- glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors");
-}
+var wtu = WebGLTestUtils;
-function doNextTest() {
- ++count;
- debug("test " + count + " of " + target);
- test();
- if (count < target) {
- setTimeout(doNextTest, 100);
- } else {
- finishTest();
- }
-}
+var test = IterableTest.createContextCreationAndDestructionTest();
+var iterations = parseInt(wtu.getUrlOptions().iterations, 10) || 50;
+IterableTest.run(test, iterations);
var successfullyParsed = true;
</script>
Modified: trunk/LayoutTests/webgl/1.0.2/resources/webgl_test_files/conformance/extensions/webgl-compressed-texture-s3tc.html (179858 => 179859)
--- trunk/LayoutTests/webgl/1.0.2/resources/webgl_test_files/conformance/extensions/webgl-compressed-texture-s3tc.html 2015-02-10 00:43:57 UTC (rev 179858)
+++ trunk/LayoutTests/webgl/1.0.2/resources/webgl_test_files/conformance/extensions/webgl-compressed-texture-s3tc.html 2015-02-10 01:02:28 UTC (rev 179859)
@@ -609,7 +609,7 @@
if (actual[actualOffset + jj] != expected[jj]) {
failed = true;
var was = actual[actualOffset + 0].toString();
- for (j = 1; j < 4; ++j) {
+ for (var j = 1; j < 4; ++j) {
was += "," + actual[actualOffset + j];
}
testFailed('at (' + xx + ', ' + yy +
Modified: trunk/LayoutTests/webgl/1.0.2/resources/webgl_test_files/conformance/extensions/webgl-debug-shaders.html (179858 => 179859)
--- trunk/LayoutTests/webgl/1.0.2/resources/webgl_test_files/conformance/extensions/webgl-debug-shaders.html 2015-02-10 00:43:57 UTC (rev 179858)
+++ trunk/LayoutTests/webgl/1.0.2/resources/webgl_test_files/conformance/extensions/webgl-debug-shaders.html 2015-02-10 01:02:28 UTC (rev 179859)
@@ -55,6 +55,7 @@
var program = null;
var info = null;
var translatedSource;
+var newTranslatedSource;
if (!gl) {
testFailed("WebGL context does not exist");
@@ -117,9 +118,9 @@
// if no source has been defined or compileShader() has not been called,
// getTranslatedShaderSource() should return an empty string.
- shouldBeNull("ext.getTranslatedShaderSource(shader)");
+ shouldBe("ext.getTranslatedShaderSource(shader)", '""');
gl.shaderSource(shader, info.source);
- shouldBeNull("ext.getTranslatedShaderSource(shader)");
+ shouldBe("ext.getTranslatedShaderSource(shader)", '""');
gl.compileShader(shader);
shouldBeTrue("gl.getShaderParameter(shader, gl.COMPILE_STATUS)");
translatedSource = ext.getTranslatedShaderSource(shader);
Modified: trunk/LayoutTests/webgl/1.0.2/resources/webgl_test_files/conformance/extensions/webgl-depth-texture.html (179858 => 179859)
--- trunk/LayoutTests/webgl/1.0.2/resources/webgl_test_files/conformance/extensions/webgl-depth-texture.html 2015-02-10 00:43:57 UTC (rev 179858)
+++ trunk/LayoutTests/webgl/1.0.2/resources/webgl_test_files/conformance/extensions/webgl-depth-texture.html 2015-02-10 01:02:28 UTC (rev 179859)
@@ -273,9 +273,8 @@
dumpIt(gl, res, "--depth--");
- // Check that each pixel's RGB are the same and that it's value is less
- // than the previous pixel in either direction. Basically verify we have a
- // gradient.
+ // Check that each pixel's R value is less than that of the previous pixel
+ // in either direction. Basically verify we have a gradient.
var success = true;
for (var yy = 0; yy < res; ++yy) {
for (var xx = 0; xx < res; ++xx) {
@@ -283,20 +282,6 @@
var left = actual - 4;
var down = actual - res * 4;
- if (actualPixels[actual + 0] != actualPixels[actual + 1]) {
- testFailed('R != G');
- success = false;
- }
- if (actualPixels[actual + 0] != actualPixels[actual + 2]) {
- testFailed('R != B');
- success = false;
- }
- // ALPHA is implementation dependent
- if (actualPixels[actual + 3] != 0xFF && actualPixels[actual + 3] != actualPixels[actual + 0]) {
- testFailed('A != 255 && A != R');
- success = false;
- }
-
if (xx > 0) {
if (actualPixels[actual] <= actualPixels[left]) {
testFailed("actual(" + actualPixels[actual] + ") < left(" + actualPixels[left] + ")");
Modified: trunk/LayoutTests/webgl/1.0.2/resources/webgl_test_files/conformance/glsl/misc/shader-with-array-of-structs-containing-arrays.html (179858 => 179859)
--- trunk/LayoutTests/webgl/1.0.2/resources/webgl_test_files/conformance/glsl/misc/shader-with-array-of-structs-containing-arrays.html 2015-02-10 00:43:57 UTC (rev 179858)
+++ trunk/LayoutTests/webgl/1.0.2/resources/webgl_test_files/conformance/glsl/misc/shader-with-array-of-structs-containing-arrays.html 2015-02-10 01:02:28 UTC (rev 179859)
@@ -109,8 +109,6 @@
var program = wtu.setupProgram(gl, ["vshader", "fshader-with-one-element-arrays"], ["a_position"]);
var green_loc = gl.getUniformLocation(program, "u_colors[0].color[0]");
-var zeroth_color = gl.getUniformLocation(program, "u_colors[0].color");
-shouldBeTrue("zeroth_color != undefined");
gl.uniform4fv(green_loc, [0, 1, 0, 1]);
wtu.clearAndDrawUnitQuad(gl);
wtu.checkCanvas(gl, [0, 255, 0, 255], "Should be green");
Modified: trunk/LayoutTests/webgl/1.0.2/resources/webgl_test_files/conformance/misc/bad-arguments-test.html (179858 => 179859)
--- trunk/LayoutTests/webgl/1.0.2/resources/webgl_test_files/conformance/misc/bad-arguments-test.html 2015-02-10 00:43:57 UTC (rev 179858)
+++ trunk/LayoutTests/webgl/1.0.2/resources/webgl_test_files/conformance/misc/bad-arguments-test.html 2015-02-10 01:02:28 UTC (rev 179859)
@@ -72,15 +72,13 @@
}
for (var i = 0; i < testArguments.length; ++i) {
- var func, func2, func3;
+ var func, func2;
if (testArguments[i].throws) {
func = shouldThrow;
func2 = shouldThrow;
- func3 = shouldThrow;
} else {
func = shouldBeUndefined;
func2 = shouldBeNull;
- func3 = shouldBeEmptyString;
}
argument = testArguments[i].value;
func("context.compileShader(argument)");
@@ -102,15 +100,15 @@
func("context.uniform2iv(argument, new Int32Array([0, 0]))");
func("context.uniformMatrix2fv(argument, false, new Float32Array([0.0, 0.0, 0.0, 0.0]))");
+ func2("context.getProgramInfoLog(argument)");
func2("context.getProgramParameter(argument, 0)");
+ func2("context.getShaderInfoLog(argument)");
func2("context.getShaderParameter(argument, 0)");
+ func2("context.getShaderSource(argument)");
func2("context.getUniform(argument, loc)");
func2("context.getUniform(program, argument)");
func2("context.getUniformLocation(argument, 'u_modelViewProjMatrix')");
- func3("context.getProgramInfoLog(argument)");
- func3("context.getShaderInfoLog(argument)");
- func3("context.getShaderSource(argument)");
}
var successfullyParsed = true;
Modified: trunk/LayoutTests/webgl/1.0.2/resources/webgl_test_files/conformance/misc/webgl-specific.html (179858 => 179859)
--- trunk/LayoutTests/webgl/1.0.2/resources/webgl_test_files/conformance/misc/webgl-specific.html 2015-02-10 00:43:57 UTC (rev 179858)
+++ trunk/LayoutTests/webgl/1.0.2/resources/webgl_test_files/conformance/misc/webgl-specific.html 2015-02-10 01:02:28 UTC (rev 179859)
@@ -96,6 +96,12 @@
shouldGenerateGLError(gl, gl.NO_ERROR, "gl.stencilFuncSeparate(gl.FRONT, gl.ALWAYS, 1, 1)");
shouldGenerateGLError(gl, gl.NO_ERROR, "gl.drawArrays(gl.TRIANGLES, 0, 0)");
+// Added in 1.0.3 version of spec.
+// debug("");
+// debug("Verify that IMPLEMENTATION_COLOR_READ_FORMAT and IMPLEMENTATION_COLOR_READ_TYPE are undefined");
+// shouldBeUndefined(gl.IMPLEMENTATION_COLOR_READ_FORMAT);
+// shouldBeUndefined(gl.IMPLEMENTATION_COLOR_READ_TYPE);
+
debug("");
debug("Verify that *LENGTH are undefined");
shouldBeUndefined(gl.INFO_LOG_LENGTH);
Modified: trunk/LayoutTests/webgl/1.0.2/resources/webgl_test_files/conformance/more/functions/uniformMatrixBadArgs.html (179858 => 179859)
--- trunk/LayoutTests/webgl/1.0.2/resources/webgl_test_files/conformance/more/functions/uniformMatrixBadArgs.html 2015-02-10 00:43:57 UTC (rev 179858)
+++ trunk/LayoutTests/webgl/1.0.2/resources/webgl_test_files/conformance/more/functions/uniformMatrixBadArgs.html 2015-02-10 01:02:28 UTC (rev 179859)
@@ -120,7 +120,7 @@
});
var d = new Uint8Array(4);
gl.readPixels(0,0,1,1,gl.RGBA, gl.UNSIGNED_BYTE, d);
- assertArrayEquals([1,2,3,8], d);
+ assertArrayEqualsWithEpsilon([1,2,3,8], d, [1,1,1,1]);
sh.destroy();
}
Modified: trunk/LayoutTests/webgl/1.0.2/resources/webgl_test_files/conformance/more/unit.js (179858 => 179859)
--- trunk/LayoutTests/webgl/1.0.2/resources/webgl_test_files/conformance/more/unit.js 2015-02-10 00:43:57 UTC (rev 179858)
+++ trunk/LayoutTests/webgl/1.0.2/resources/webgl_test_files/conformance/more/unit.js 2015-02-10 01:02:28 UTC (rev 179859)
@@ -390,6 +390,38 @@
return true;
}
+function assertArrayEqualsWithEpsilon(name, v, p, l) {
+if (l == null) { l = p; p = v; v = name; name = null; }
+if (!v) {
+testFailed("assertArrayEqualsWithEpsilon: first array undefined", name, v, p);
+return false;
+}
+if (!p) {
+testFailed("assertArrayEqualsWithEpsilon: second array undefined", name, v, p);
+return false;
+}
+if (!l) {
+testFailed("assertArrayEqualsWithEpsilon: limit array undefined", name, v, p);
+return false;
+}
+if (v.length != p.length) {
+testFailed("assertArrayEqualsWithEpsilon", name, v, p, l);
+return false;
+}
+if (v.length != l.length) {
+testFailed("assertArrayEqualsWithEpsilon", name, v, p, l);
+return false;
+}
+for (var ii = 0; ii < v.length; ++ii) {
+if (Math.abs(v[ii]- p[ii])>l[ii]) {
+testFailed("assertArrayEqualsWithEpsilon", name, v, p, l);
+return false;
+}
+}
+testPassed("assertArrayEqualsWithEpsilon", name, v, p, l);
+return true;
+}
+
function assertNotEquals(name, v, p) {
if (p == null) { p = v; v = name; name = null; }
if (compare(v, p)) {
Modified: trunk/LayoutTests/webgl/1.0.2/resources/webgl_test_files/conformance/more/util.js (179858 => 179859)
--- trunk/LayoutTests/webgl/1.0.2/resources/webgl_test_files/conformance/more/util.js 2015-02-10 00:43:57 UTC (rev 179858)
+++ trunk/LayoutTests/webgl/1.0.2/resources/webgl_test_files/conformance/more/util.js 2015-02-10 01:02:28 UTC (rev 179859)
@@ -841,7 +841,7 @@
if (!this.initialized) this.init();
var gl = this.gl;
for (var i=0; i<arguments.length; i++) {
- if (arguments[i] == null) continue;
+ if (arguments[i] == null || arguments[i] == -1) continue;
gl.bindBuffer(gl.ARRAY_BUFFER, this.vbos[i]);
gl.vertexAttribPointer(arguments[i], this.data[i].size, gl.FLOAT, false, 0, 0);
gl.enableVertexAttribArray(arguments[i]);
Modified: trunk/LayoutTests/webgl/1.0.2/resources/webgl_test_files/conformance/rendering/multisample-corruption.html (179858 => 179859)
--- trunk/LayoutTests/webgl/1.0.2/resources/webgl_test_files/conformance/rendering/multisample-corruption.html 2015-02-10 00:43:57 UTC (rev 179858)
+++ trunk/LayoutTests/webgl/1.0.2/resources/webgl_test_files/conformance/rendering/multisample-corruption.html 2015-02-10 01:02:28 UTC (rev 179859)
@@ -32,93 +32,26 @@
<title>WebGL Multisample Renderbuffer Corruption Test</title>
<link rel="stylesheet" href=""
<script src=""
- <script src="" </script>
<script src="" </script>
+ <script src="" </script>
</head>
<body>
<canvas id="example" width="2048" height="2048" style="width: 128px; height: 128px;"></canvas>
<div id="description"></div>
<div id="console"></div>
- <script id="vshader" type="x-shader/x-vertex">
- attribute vec4 vPosition;
- void main()
- {
- gl_Position = vPosition;
- }
- </script>
-
- <script id="fshader" type="x-shader/x-fragment">
- void main()
- {
- gl_FragColor = vec4(0.0,0.0,0.0,0.0);
- }
- </script>
-
<script>
"use strict";
- function init()
- {
- description(document.title);
- var lastContext = null;
- var cycleCount = 0;
- var maxCycles = 100;
- var failed = false;
- var wtu = WebGLTestUtils;
- var gl = wtu.create3DContext("example", {antialias: true, preserveDrawingBuffer: true});
+ description(document.title);
- gl.clearColor(1.0, 0.0, 0.0, 1.0);
- gl.clear(gl.COLOR_BUFFER_BIT);
+ var wtu = WebGLTestUtils;
- var program = wtu.setupProgram(gl, ["vshader", "fshader"], ["vPosition"]);
- var vertexObject = gl.createBuffer();
- gl.bindBuffer(gl.ARRAY_BUFFER, vertexObject);
- gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([ 0,2.5,0, 1.5,1.5,0, 2.5,1.5,0 ]), gl.STATIC_DRAW);
- gl.enableVertexAttribArray(0);
- gl.vertexAttribPointer(0, 3, gl.FLOAT, false, 0, 0);
+ var gl = wtu.create3DContext("example", {antialias: true, preserveDrawingBuffer: true});
+ var test = IterableTest.createMultisampleCorruptionTest(gl);
+ var iterations = parseInt(wtu.getUrlOptions().iterations, 10) || 25;
+ IterableTest.run(test, iterations);
- function cycleAndTest() {
- var gl2 = wtu.create3DContext(null, {antialias: true});
-
- gl2.canvas.width = gl2.canvas.height = 1024;
- gl2.canvas.style.width = gl2.canvas.style.height = "1px";
- document.body.appendChild(gl2.canvas);
-
- gl2.clearColor(1.0, 0.0, 0.0, 1.0);
- gl2.clear(gl2.COLOR_BUFFER_BIT);
-
- if(lastContext) {
- gl.drawArrays(gl.TRIANGLES, 0, 3);
- var msg = "Should be red after loop " + cycleCount;
- wtu.checkCanvasRectColor(gl,
- 0, 0, gl.canvas.width, gl.canvas.height,
- [255, 0, 0, 255], null,
- function() {
- testPassed(msg);
- },
- function() {
- testFailed(msg);
- failed = true;
- },
- debug);
- document.body.removeChild(lastContext.canvas);
- }
-
- lastContext = gl2;
- cycleCount++;
-
- if(cycleCount <= maxCycles && !failed) {
- wtu.waitForComposite(gl2, cycleAndTest);
- } else {
- finishTest();
- }
- }
-
- cycleAndTest();
- }
-
- init();
- var successfullyParsed = true;
+ var successfullyParsed = true;
</script>
</body>
Modified: trunk/LayoutTests/webgl/1.0.2/resources/webgl_test_files/conformance/resources/fragmentShader.frag (179858 => 179859)
--- trunk/LayoutTests/webgl/1.0.2/resources/webgl_test_files/conformance/resources/fragmentShader.frag 2015-02-10 00:43:57 UTC (rev 179858)
+++ trunk/LayoutTests/webgl/1.0.2/resources/webgl_test_files/conformance/resources/fragmentShader.frag 2015-02-10 01:02:28 UTC (rev 179859)
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2009 Apple Inc. All rights reserved.
+Copyright (C) 2009 Apple Computer, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
@@ -10,10 +10,10 @@
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
-THIS SOFTWARE IS PROVIDED BY APPLE INC. AS IS AND ANY
+THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. AS IS AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
Modified: trunk/LayoutTests/webgl/1.0.2/resources/webgl_test_files/conformance/resources/glsl-generator.js (179858 => 179859)
--- trunk/LayoutTests/webgl/1.0.2/resources/webgl_test_files/conformance/resources/glsl-generator.js 2015-02-10 00:43:57 UTC (rev 179858)
+++ trunk/LayoutTests/webgl/1.0.2/resources/webgl_test_files/conformance/resources/glsl-generator.js 2015-02-10 01:02:28 UTC (rev 179859)
@@ -252,9 +252,9 @@
var wtu = WebGLTestUtils;
var gridRes = params.gridRes;
var vertexTolerance = params.tolerance || 0;
- var fragmentTolerance = vertexTolerance;
+ var fragmentTolerance = params.tolerance || 1;
if ('fragmentTolerance' in params)
- fragmentTolerance = params.fragmentTolerance || 0;
+ fragmentTolerance = params.fragmentTolerance;
description("Testing GLSL feature: " + params.feature);
Modified: trunk/LayoutTests/webgl/1.0.2/resources/webgl_test_files/conformance/resources/vertexShader.vert (179858 => 179859)
--- trunk/LayoutTests/webgl/1.0.2/resources/webgl_test_files/conformance/resources/vertexShader.vert 2015-02-10 00:43:57 UTC (rev 179858)
+++ trunk/LayoutTests/webgl/1.0.2/resources/webgl_test_files/conformance/resources/vertexShader.vert 2015-02-10 01:02:28 UTC (rev 179859)
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2009 Apple Inc. All rights reserved.
+Copyright (C) 2009 Apple Computer, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
@@ -10,10 +10,10 @@
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
-THIS SOFTWARE IS PROVIDED BY APPLE INC. AS IS AND ANY
+THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. AS IS AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
Modified: trunk/LayoutTests/webgl/1.0.2/resources/webgl_test_files/conformance/resources/webgl-test-utils.js (179858 => 179859)
--- trunk/LayoutTests/webgl/1.0.2/resources/webgl_test_files/conformance/resources/webgl-test-utils.js 2015-02-10 00:43:57 UTC (rev 179858)
+++ trunk/LayoutTests/webgl/1.0.2/resources/webgl_test_files/conformance/resources/webgl-test-utils.js 2015-02-10 01:02:28 UTC (rev 179859)
@@ -28,6 +28,9 @@
* @param {string} msg The message to log.
*/
var log = function(msg) {
+ if (window.console && window.console.log) {
+ window.console.log(msg);
+ }
};
/**
@@ -35,6 +38,14 @@
* @param {string} msg The message to log.
*/
var error = function(msg) {
+ if (window.console) {
+ if (window.console.error) {
+ window.console.error(msg);
+ }
+ else if (window.console.log) {
+ window.console.log(msg);
+ }
+ }
};
/**
@@ -839,15 +850,17 @@
* @param {!function()} differentFn Function to call if a pixel
* is different than color
* @param {!function()} logFn Function to call for logging.
+ * @param {Uint8Array} opt_readBackBuf typically passed to reuse existing
+ * buffer while reading back pixels.
*/
-var checkCanvasRectColor = function(gl, x, y, width, height, color, opt_errorRange, sameFn, differentFn, logFn) {
+var checkCanvasRectColor = function(gl, x, y, width, height, color, opt_errorRange, sameFn, differentFn, logFn, opt_readBackBuf) {
var errorRange = opt_errorRange || 0;
if (!errorRange.length) {
errorRange = [errorRange, errorRange, errorRange, errorRange]
}
var buf;
if (gl instanceof WebGLRenderingContext) {
- buf = new Uint8Array(width * height * 4);
+ buf = opt_readBackBuf ? opt_readBackBuf : new Uint8Array(width * height * 4);
gl.readPixels(x, y, width, height, gl.RGBA, gl.UNSIGNED_BYTE, buf);
} else {
buf = gl.getImageData(x, y, width, height).data;
@@ -969,6 +982,30 @@
};
/**
+ * Returns a map of URL querystring options
+ * @return {Object?} Object containing all the values in the URL querystring
+ */
+var getUrlOptions = function() {
+ var options = {};
+ var s = window.location.href;
+ var q = s.indexOf("?");
+ var e = s.indexOf("#");
+ if (e < 0) {
+ e = s.length;
+ }
+ var query = s.substring(q + 1, e);
+ var pairs = query.split("&");
+ for (var ii = 0; ii < pairs.length; ++ii) {
+ var keyValue = pairs[ii].split("=");
+ var key = keyValue[0];
+ var value = decodeURIComponent(keyValue[1]);
+ options[key] = value;
+ }
+
+ return options;
+};
+
+/**
* Creates a webgl context.
* @param {!Canvas|string} opt_canvas The canvas tag to get
* context from. If one is not passed in one will be
@@ -1988,6 +2025,7 @@
getScript: getScript,
getSupportedExtensionWithKnownPrefixes: getSupportedExtensionWithKnownPrefixes,
getUrlArguments: getUrlArguments,
+ getUrlOptions: getUrlOptions,
getAttribMap: getAttribMap,
getUniformMap: getUniformMap,
glEnumToString: glEnumToString,
Modified: trunk/LayoutTests/webgl/1.0.2/resources/webgl_test_files/test-guidelines.md (179858 => 179859)
--- trunk/LayoutTests/webgl/1.0.2/resources/webgl_test_files/test-guidelines.md 2015-02-10 00:43:57 UTC (rev 179858)
+++ trunk/LayoutTests/webgl/1.0.2/resources/webgl_test_files/test-guidelines.md 2015-02-10 01:02:28 UTC (rev 179859)
@@ -1,7 +1,7 @@
Contributing WebGL conformance tests Guidelines
===============================================
-Thank you for contibuting to the WebGL conformance tests.
+Thank you for contributing to the WebGL conformance tests.
Please try to follow these guidelines when submitting a test.
* If you're new to git [here's a terse set of instructions](http://www.khronos.org/webgl/wiki/Using_Github_To_Contribute "Using Github to Contribute").
@@ -43,7 +43,7 @@
* Please use code similar to the code in existing tests
Ideally, copy an existing test and modify it for your new test. Try not to duplicate
- code that already exists where approriate. In particular
+ code that already exists where appropriate. In particular
* use the functions in WebGLTestUtils rather than duplicating functionality.
@@ -91,7 +91,7 @@
name in `opt_attribs` is bound to the corresponding location in `opt_locations`.
* If you need to wait for a composite call `WebGLTestUtils.waitForComposite`.
- As compositing is a browser specfic thing this provides a central place to
+ As compositing is a browser specific thing this provides a central place to
update all tests that rely on compositing to function.
* Code/Tag Order
@@ -133,17 +133,17 @@
runNextTest();
Remember the tests need to run without timing out even and slow mobile devices.
- The harness resets the timeout timer everytime a test reports success or failure
+ The harness resets the timeout timer every time a test reports success or failure
so as long as some part of your test calls `testPassed` or `testFailed` or one of the
many wrappers (`shouldXXX`, `glErrorShouldBe`, `WebGLTestUtils.checkCanvasXXX`, etc..)
every so often the harness will not timeout your test.
- * The test harness requries the global variable `successfullyParse` to be set to true.
+ * The test harness requires the global variable `successfullyParse` to be set to true.
This usually appears at the end of a file.
var successfullyParsed = true;
- * Do not use browser specfic code.
+ * Do not use browser specific code.
* Do not check the browser version. Use feature detection.
@@ -151,7 +151,7 @@
other tests can go through the same abstraction and the workaround is isolated
to one place.
- * Vendors may place test harness specific code in the testing infrustructure.
+ * Vendors may place test harness specific code in the testing infrastructure.
resources/js-test-pre.js
conformance/more/unit.js
@@ -164,11 +164,11 @@
* All _javascript_ must start with "use strict";
-* If adding a new test edit the approriate 00_test_list.txt file
+* If adding a new test edit the appropriate 00_test_list.txt file
Each folder has a 00_test_list.txt file that lists the test in that folder.
Each new test should be prefixed with the option `--min-version <version>` where
- version is 1 more than the newest official verison. At the time of this writing
+ version is 1 more than the newest official version. At the time of this writing
all new tests should be prefixed with `--min-version 1.0.2`
Modified: trunk/LayoutTests/webgl/1.0.2/resources/webgl_test_files/webgl-conformance-tests.html (179858 => 179859)
--- trunk/LayoutTests/webgl/1.0.2/resources/webgl_test_files/webgl-conformance-tests.html 2015-02-10 00:43:57 UTC (rev 179858)
+++ trunk/LayoutTests/webgl/1.0.2/resources/webgl_test_files/webgl-conformance-tests.html 2015-02-10 01:02:28 UTC (rev 179859)
@@ -144,7 +144,8 @@
var reportType = WebGLTestHarnessModule.TestHarness.reportType;
var pageCount = 0;
var folderCount = 0;
- var autoScroll = true;
+ var autoScrollEnabled = true; // Whether the user prefers to auto scroll
+ var autoScroll = true; // Whether auto scroll is actually performed
var Page = function(reporter, folder, testIndex, url) {
this.reporter = reporter;
@@ -297,7 +298,7 @@
button.type = 'button';
button.value = 'run';
button._onclick_ = function() {
- autoScroll = true;
+ autoScroll = autoScrollEnabled;
that.run();
};
if (reporter.noWebGL) {
@@ -771,10 +772,16 @@
var button = document.getElementById("runTestsButton");
button.disabled = true;
button._onclick_ = function() {
- autoScroll = true;
+ autoScroll = autoScrollEnabled;
reporter.postTestStartToServer();
testHarness.runTests();
};
+ var autoScrollCheckbox = document.getElementById("autoScrollCheckbox");
+ autoScrollCheckbox.checked = autoScrollEnabled;
+ autoScrollCheckbox._onclick_ = function() {
+ autoScrollEnabled = autoScrollCheckbox.checked;
+ autoScroll = autoScrollEnabled;
+ };
var textbutton = document.getElementById("showTextSummary");
textbutton._onclick_ = function() {
log("click");
@@ -830,6 +837,9 @@
<br/>
<input type="button" value="run tests" id="runTestsButton"/>
<br/>
+ <input type="checkbox" id="autoScrollCheckbox"/>
+ <label for="" scroll</label>
+ <br/>
<input type="button" style="visibility: hidden;" value="display text summary" id="showTextSummary"/>
<div id="nowebgl" class="nowebgl" style="display: none;">
This browser does not appear to support WebGL
Modified: trunk/Source/WebCore/ChangeLog (179858 => 179859)
--- trunk/Source/WebCore/ChangeLog 2015-02-10 00:43:57 UTC (rev 179858)
+++ trunk/Source/WebCore/ChangeLog 2015-02-10 01:02:28 UTC (rev 179859)
@@ -1,3 +1,19 @@
+2015-02-09 Roger Fong <[email protected]>
+
+ WebGL: Update 1.0.2 conformance layout tests and address new failure.
+ https://bugs.webkit.org/show_bug.cgi?id=141408.
+ <rdar://problem/19773236>
+
+ Reviewed by Dean Jackson.
+
+ Tests covered by updated 1.0.2 conformance tests.
+
+ * html/canvas/WebGLRenderingContextBase.cpp:
+ Return null string instead of empty string if parameter validation fails.
+ (WebCore::WebGLRenderingContextBase::getProgramInfoLog):
+ (WebCore::WebGLRenderingContextBase::getShaderInfoLog):
+ (WebCore::WebGLRenderingContextBase::getShaderSource):
+
2015-02-09 Timothy Horton <[email protected]>
Avoid using a HashMap for DisplayRefreshMonitorManager, which rarely has more than one item
Modified: trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp (179858 => 179859)
--- trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp 2015-02-10 00:43:57 UTC (rev 179858)
+++ trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp 2015-02-10 01:02:28 UTC (rev 179859)
@@ -2617,10 +2617,8 @@
String WebGLRenderingContextBase::getProgramInfoLog(WebGLProgram* program, ExceptionCode& ec)
{
UNUSED_PARAM(ec);
- if (isContextLostOrPending())
+ if (isContextLostOrPending() || !validateWebGLObject("getProgramInfoLog", program))
return String();
- if (!validateWebGLObject("getProgramInfoLog", program))
- return "";
return ensureNotNull(m_context->getProgramInfoLog(objectOrZero(program)));
}
@@ -2714,10 +2712,8 @@
String WebGLRenderingContextBase::getShaderInfoLog(WebGLShader* shader, ExceptionCode& ec)
{
UNUSED_PARAM(ec);
- if (isContextLostOrPending())
+ if (isContextLostOrPending() || !validateWebGLObject("getShaderInfoLog", shader))
return String();
- if (!validateWebGLObject("getShaderInfoLog", shader))
- return "";
return ensureNotNull(m_context->getShaderInfoLog(objectOrZero(shader)));
}
@@ -2756,10 +2752,8 @@
String WebGLRenderingContextBase::getShaderSource(WebGLShader* shader, ExceptionCode& ec)
{
UNUSED_PARAM(ec);
- if (isContextLostOrPending())
+ if (isContextLostOrPending() || !validateWebGLObject("getShaderSource", shader))
return String();
- if (!validateWebGLObject("getShaderSource", shader))
- return "";
return ensureNotNull(shader->getSource());
}