[WebGL] Update WebGL 1.0.3 conformance tests
https://bugs.webkit.org/show_bug.cgi?id=148858
<rdar://problem/22588694>
Reviewed by Beth Dakin.
Update to the final version of the 1.0.3 WebGL conformance suite.
At the same time, unskip the tests (other than the one that crashes)
and check in results that we can use as progressions (later).
* platform/mac/TestExpectations:
* webgl/1.0.3/conformance/extensions/oes-texture-half-float-expected.txt:
* webgl/1.0.3/conformance/extensions/webgl-compressed-texture-size-limit-expected.txt:
* webgl/1.0.3/conformance/extensions/webgl-draw-buffers-expected.txt:
* webgl/1.0.3/conformance/glsl/misc/shader-struct-scope-expected.txt:
* webgl/1.0.3/conformance/glsl/misc/shaders-with-invariance-expected.txt:
* webgl/1.0.3/conformance/glsl/misc/shaders-with-name-conflicts-expected.txt:
* webgl/1.0.3/conformance/glsl/misc/struct-nesting-of-variable-names-expected.txt:
* webgl/1.0.3/conformance/renderbuffers/feedback-loop-expected.txt:
* webgl/1.0.3/conformance/textures/texture-copying-feedback-loops-expected.txt:
* webgl/1.0.3/resources/webgl_test_files/conformance/extensions/angle-instanced-arrays.html:
* webgl/1.0.3/resources/webgl_test_files/conformance/glsl/misc/shader-with-for-loop.html:
* webgl/1.0.3/resources/webgl_test_files/conformance/glsl/misc/ternary-operators-in-global-initializers.html:
* webgl/1.0.3/resources/webgl_test_files/conformance/misc/bad-arguments-test.html:
* webgl/1.0.3/resources/webgl_test_files/conformance/more/functions/uniformMatrixBadArgs.html:
* webgl/1.0.3/resources/webgl_test_files/conformance/more/unit.js:
* webgl/1.0.3/resources/webgl_test_files/conformance/ogles/ogles-utils.js:
(OpenGLESTestRunner):
* webgl/1.0.3/resources/webgl_test_files/conformance/textures/tex-image-with-invalid-data.html:
* webgl/1.0.3/resources/webgl_test_files/conformance/typedarrays/array-unit-tests.html:
* webgl/1.0.3/resources/webgl_test_files/conformance/typedarrays/resources/typed-array-worker.js:
(onmessage):
* webgl/1.0.3/resources/webgl_test_files/webgl-conformance-tests.html:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@189407 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index bb437b6..8c30b1b 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,39 @@
+2015-09-04 Dean Jackson <dino@apple.com>
+
+ [WebGL] Update WebGL 1.0.3 conformance tests
+ https://bugs.webkit.org/show_bug.cgi?id=148858
+ <rdar://problem/22588694>
+
+ Reviewed by Beth Dakin.
+
+ Update to the final version of the 1.0.3 WebGL conformance suite.
+ At the same time, unskip the tests (other than the one that crashes)
+ and check in results that we can use as progressions (later).
+
+ * platform/mac/TestExpectations:
+ * webgl/1.0.3/conformance/extensions/oes-texture-half-float-expected.txt:
+ * webgl/1.0.3/conformance/extensions/webgl-compressed-texture-size-limit-expected.txt:
+ * webgl/1.0.3/conformance/extensions/webgl-draw-buffers-expected.txt:
+ * webgl/1.0.3/conformance/glsl/misc/shader-struct-scope-expected.txt:
+ * webgl/1.0.3/conformance/glsl/misc/shaders-with-invariance-expected.txt:
+ * webgl/1.0.3/conformance/glsl/misc/shaders-with-name-conflicts-expected.txt:
+ * webgl/1.0.3/conformance/glsl/misc/struct-nesting-of-variable-names-expected.txt:
+ * webgl/1.0.3/conformance/renderbuffers/feedback-loop-expected.txt:
+ * webgl/1.0.3/conformance/textures/texture-copying-feedback-loops-expected.txt:
+ * webgl/1.0.3/resources/webgl_test_files/conformance/extensions/angle-instanced-arrays.html:
+ * webgl/1.0.3/resources/webgl_test_files/conformance/glsl/misc/shader-with-for-loop.html:
+ * webgl/1.0.3/resources/webgl_test_files/conformance/glsl/misc/ternary-operators-in-global-initializers.html:
+ * webgl/1.0.3/resources/webgl_test_files/conformance/misc/bad-arguments-test.html:
+ * webgl/1.0.3/resources/webgl_test_files/conformance/more/functions/uniformMatrixBadArgs.html:
+ * webgl/1.0.3/resources/webgl_test_files/conformance/more/unit.js:
+ * webgl/1.0.3/resources/webgl_test_files/conformance/ogles/ogles-utils.js:
+ (OpenGLESTestRunner):
+ * webgl/1.0.3/resources/webgl_test_files/conformance/textures/tex-image-with-invalid-data.html:
+ * webgl/1.0.3/resources/webgl_test_files/conformance/typedarrays/array-unit-tests.html:
+ * webgl/1.0.3/resources/webgl_test_files/conformance/typedarrays/resources/typed-array-worker.js:
+ (onmessage):
+ * webgl/1.0.3/resources/webgl_test_files/webgl-conformance-tests.html:
+
2015-09-04 Beth Dakin <bdakin@apple.com>
Forgot to mark these expectations.
diff --git a/LayoutTests/platform/mac/TestExpectations b/LayoutTests/platform/mac/TestExpectations
index c8c6bf4..b796871 100644
--- a/LayoutTests/platform/mac/TestExpectations
+++ b/LayoutTests/platform/mac/TestExpectations
@@ -439,29 +439,14 @@
webkit.org/b/124935 [ Debug ] webgl/1.0.2/conformance/glsl/misc/shader-with-non-reserved-words.html [ Slow ]
-# Skip 1.0.3 tests for now, to be unskipped when we get closer to conformance
-webgl/1.0.3/conformance/attribs [ Skip ]
-webgl/1.0.3/conformance/buffers [ Skip ]
-webgl/1.0.3/conformance/canvas [ Skip ]
-webgl/1.0.3/conformance/context [ Skip ]
-webgl/1.0.3/conformance/glsl [ Skip ]
-webgl/1.0.3/conformance/renderbuffers [ Skip ]
-webgl/1.0.3/conformance/rendering [ Skip ]
-webgl/1.0.3/conformance/state [ Skip ]
-webgl/1.0.3/conformance/textures [ Skip ]
-webgl/1.0.3/conformance/typedarrays [ Skip ]
-webgl/1.0.3/conformance/uniforms [ Skip ]
-webgl/1.0.3/conformance/extensions/angle-instanced-arrays.html [ Skip ]
-webgl/1.0.3/conformance/extensions/oes-texture-half-float.html [ Skip ]
-webgl/1.0.3/conformance/extensions/webgl-compressed-texture-size-limit.html [ Skip ]
-webgl/1.0.3/conformance/extensions/webgl-draw-buffers.html [ Skip ]
-
# Sending the mouse down event to the scrollbar starts a nested run loop which causes a hang.
fast/events/mousedown-in-subframe-scrollbar.html [ Skip ]
webkit.org/b/96828 fast/canvas/webgl/oes-vertex-array-object.html [ Skip ]
webkit.org/b/96828 webgl/1.0.2/conformance/extensions/oes-vertex-array-object.html [ Skip ]
+webgl/1.0.3/conformance/rendering/point-no-attributes.html [ Skip ]
+
http/tests/misc/willCacheResponse-delegate-callback.html [ Failure ]
http/tests/xmlhttprequest/basic-auth-nopassword.html [ Failure ]
diff --git a/LayoutTests/webgl/1.0.3/conformance/extensions/oes-texture-half-float-expected.txt b/LayoutTests/webgl/1.0.3/conformance/extensions/oes-texture-half-float-expected.txt
index 70484a3..3f5c2e0 100644
--- a/LayoutTests/webgl/1.0.3/conformance/extensions/oes-texture-half-float-expected.txt
+++ b/LayoutTests/webgl/1.0.3/conformance/extensions/oes-texture-half-float-expected.txt
@@ -1,5 +1,5 @@
This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.
Test: ../../resources/webgl_test_files/conformance/extensions/oes-texture-half-float.html
-PASS
+FAIL
diff --git a/LayoutTests/webgl/1.0.3/conformance/extensions/webgl-compressed-texture-size-limit-expected.txt b/LayoutTests/webgl/1.0.3/conformance/extensions/webgl-compressed-texture-size-limit-expected.txt
index 82142869..ddf2d04 100644
--- a/LayoutTests/webgl/1.0.3/conformance/extensions/webgl-compressed-texture-size-limit-expected.txt
+++ b/LayoutTests/webgl/1.0.3/conformance/extensions/webgl-compressed-texture-size-limit-expected.txt
@@ -1,5 +1,5 @@
This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.
Test: ../../resources/webgl_test_files/conformance/extensions/webgl-compressed-texture-size-limit.html
-PASS
+FAIL
diff --git a/LayoutTests/webgl/1.0.3/conformance/extensions/webgl-draw-buffers-expected.txt b/LayoutTests/webgl/1.0.3/conformance/extensions/webgl-draw-buffers-expected.txt
index 94f851c..c5bca61 100644
--- a/LayoutTests/webgl/1.0.3/conformance/extensions/webgl-draw-buffers-expected.txt
+++ b/LayoutTests/webgl/1.0.3/conformance/extensions/webgl-draw-buffers-expected.txt
@@ -1,5 +1,5 @@
This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.
Test: ../../resources/webgl_test_files/conformance/extensions/webgl-draw-buffers.html
-PASS
+FAIL
diff --git a/LayoutTests/webgl/1.0.3/conformance/glsl/misc/shader-struct-scope-expected.txt b/LayoutTests/webgl/1.0.3/conformance/glsl/misc/shader-struct-scope-expected.txt
index 65dad03..4cff659 100644
--- a/LayoutTests/webgl/1.0.3/conformance/glsl/misc/shader-struct-scope-expected.txt
+++ b/LayoutTests/webgl/1.0.3/conformance/glsl/misc/shader-struct-scope-expected.txt
@@ -1,5 +1,5 @@
This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.
Test: ../../../resources/webgl_test_files/conformance/glsl/misc/shader-struct-scope.html
-PASS
+FAIL
diff --git a/LayoutTests/webgl/1.0.3/conformance/glsl/misc/shaders-with-invariance-expected.txt b/LayoutTests/webgl/1.0.3/conformance/glsl/misc/shaders-with-invariance-expected.txt
index eae6b8e..f6fc118 100644
--- a/LayoutTests/webgl/1.0.3/conformance/glsl/misc/shaders-with-invariance-expected.txt
+++ b/LayoutTests/webgl/1.0.3/conformance/glsl/misc/shaders-with-invariance-expected.txt
@@ -1,5 +1,5 @@
This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.
Test: ../../../resources/webgl_test_files/conformance/glsl/misc/shaders-with-invariance.html
-PASS
+FAIL
diff --git a/LayoutTests/webgl/1.0.3/conformance/glsl/misc/shaders-with-name-conflicts-expected.txt b/LayoutTests/webgl/1.0.3/conformance/glsl/misc/shaders-with-name-conflicts-expected.txt
index 7961197..a4e28c5 100644
--- a/LayoutTests/webgl/1.0.3/conformance/glsl/misc/shaders-with-name-conflicts-expected.txt
+++ b/LayoutTests/webgl/1.0.3/conformance/glsl/misc/shaders-with-name-conflicts-expected.txt
@@ -1,5 +1,5 @@
This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.
Test: ../../../resources/webgl_test_files/conformance/glsl/misc/shaders-with-name-conflicts.html
-PASS
+FAIL
diff --git a/LayoutTests/webgl/1.0.3/conformance/glsl/misc/struct-nesting-of-variable-names-expected.txt b/LayoutTests/webgl/1.0.3/conformance/glsl/misc/struct-nesting-of-variable-names-expected.txt
index 69dda27..4f7a1be 100644
--- a/LayoutTests/webgl/1.0.3/conformance/glsl/misc/struct-nesting-of-variable-names-expected.txt
+++ b/LayoutTests/webgl/1.0.3/conformance/glsl/misc/struct-nesting-of-variable-names-expected.txt
@@ -1,5 +1,5 @@
This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.
Test: ../../../resources/webgl_test_files/conformance/glsl/misc/struct-nesting-of-variable-names.html
-PASS
+FAIL
diff --git a/LayoutTests/webgl/1.0.3/conformance/renderbuffers/feedback-loop-expected.txt b/LayoutTests/webgl/1.0.3/conformance/renderbuffers/feedback-loop-expected.txt
index 75d655e..c707794 100644
--- a/LayoutTests/webgl/1.0.3/conformance/renderbuffers/feedback-loop-expected.txt
+++ b/LayoutTests/webgl/1.0.3/conformance/renderbuffers/feedback-loop-expected.txt
@@ -1,5 +1,5 @@
This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.
Test: ../../resources/webgl_test_files/conformance/renderbuffers/feedback-loop.html
-PASS
+FAIL
diff --git a/LayoutTests/webgl/1.0.3/conformance/textures/texture-copying-feedback-loops-expected.txt b/LayoutTests/webgl/1.0.3/conformance/textures/texture-copying-feedback-loops-expected.txt
index f9d20c7..d07a6cf 100644
--- a/LayoutTests/webgl/1.0.3/conformance/textures/texture-copying-feedback-loops-expected.txt
+++ b/LayoutTests/webgl/1.0.3/conformance/textures/texture-copying-feedback-loops-expected.txt
@@ -1,5 +1,5 @@
This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.
Test: ../../resources/webgl_test_files/conformance/textures/texture-copying-feedback-loops.html
-PASS
+FAIL
diff --git a/LayoutTests/webgl/1.0.3/resources/webgl_test_files/conformance/extensions/angle-instanced-arrays.html b/LayoutTests/webgl/1.0.3/resources/webgl_test_files/conformance/extensions/angle-instanced-arrays.html
index a08bff7..84c649d 100644
--- a/LayoutTests/webgl/1.0.3/resources/webgl_test_files/conformance/extensions/angle-instanced-arrays.html
+++ b/LayoutTests/webgl/1.0.3/resources/webgl_test_files/conformance/extensions/angle-instanced-arrays.html
@@ -77,6 +77,7 @@
if (!gl) {
testFailed("WebGL context does not exist");
+ finishTest();
} else {
testPassed("WebGL context exists");
@@ -88,6 +89,7 @@
testPassed("No ANGLE_instanced_arrays support -- this is legal");
runSupportedTest(false);
+ finishTest();
} else {
testPassed("Successfully enabled ANGLE_instanced_arrays extension");
@@ -413,10 +415,6 @@
cycleAndTest();
}
-
-var successfullyParsed = true;
</script>
-<script src="../../resources/js-test-post.js"></script>
-
</body>
</html>
diff --git a/LayoutTests/webgl/1.0.3/resources/webgl_test_files/conformance/glsl/misc/shader-with-for-loop.html b/LayoutTests/webgl/1.0.3/resources/webgl_test_files/conformance/glsl/misc/shader-with-for-loop.html
index f0a7889..10584fc 100644
--- a/LayoutTests/webgl/1.0.3/resources/webgl_test_files/conformance/glsl/misc/shader-with-for-loop.html
+++ b/LayoutTests/webgl/1.0.3/resources/webgl_test_files/conformance/glsl/misc/shader-with-for-loop.html
@@ -48,7 +48,7 @@
uniform vec2 resolution;
// Saw-tooth function that is synced with the demo music (128bpm)
-float gBeat=fract(time*3.2/3.);
+float gBeat;
// Calculate the surface color
vec3 surfColor(vec2 p)
@@ -74,6 +74,7 @@
void main()
{
+ gBeat=fract(time*3.2/3.);
// Screen setup
vec2 p=(2.*gl_FragCoord.xy-resolution)/resolution.y,
q=2.*gl_FragCoord.xy/resolution-1.;
diff --git a/LayoutTests/webgl/1.0.3/resources/webgl_test_files/conformance/glsl/misc/ternary-operators-in-global-initializers.html b/LayoutTests/webgl/1.0.3/resources/webgl_test_files/conformance/glsl/misc/ternary-operators-in-global-initializers.html
index d9a4954..53d337f 100644
--- a/LayoutTests/webgl/1.0.3/resources/webgl_test_files/conformance/glsl/misc/ternary-operators-in-global-initializers.html
+++ b/LayoutTests/webgl/1.0.3/resources/webgl_test_files/conformance/glsl/misc/ternary-operators-in-global-initializers.html
@@ -38,8 +38,8 @@
<div id="console"></div>
<script id="fragmentShader" type="text/something-not-javascript">
precision mediump float;
-$(type) green = $(green);
-$(type) black = $(black);
+const $(type) green = $(green);
+const $(type) black = $(black);
$(type) var = (true) ? green : black;
void main() {
gl_FragColor = $(asVec4);
diff --git a/LayoutTests/webgl/1.0.3/resources/webgl_test_files/conformance/misc/bad-arguments-test.html b/LayoutTests/webgl/1.0.3/resources/webgl_test_files/conformance/misc/bad-arguments-test.html
index 0046222..2933f47 100644
--- a/LayoutTests/webgl/1.0.3/resources/webgl_test_files/conformance/misc/bad-arguments-test.html
+++ b/LayoutTests/webgl/1.0.3/resources/webgl_test_files/conformance/misc/bad-arguments-test.html
@@ -71,15 +71,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)");
@@ -101,15 +99,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;
diff --git a/LayoutTests/webgl/1.0.3/resources/webgl_test_files/conformance/more/functions/uniformMatrixBadArgs.html b/LayoutTests/webgl/1.0.3/resources/webgl_test_files/conformance/more/functions/uniformMatrixBadArgs.html
index 305f634..7a3ddc6 100644
--- a/LayoutTests/webgl/1.0.3/resources/webgl_test_files/conformance/more/functions/uniformMatrixBadArgs.html
+++ b/LayoutTests/webgl/1.0.3/resources/webgl_test_files/conformance/more/functions/uniformMatrixBadArgs.html
@@ -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();
}
diff --git a/LayoutTests/webgl/1.0.3/resources/webgl_test_files/conformance/more/unit.js b/LayoutTests/webgl/1.0.3/resources/webgl_test_files/conformance/more/unit.js
index 920448f..89f4e87 100644
--- a/LayoutTests/webgl/1.0.3/resources/webgl_test_files/conformance/more/unit.js
+++ b/LayoutTests/webgl/1.0.3/resources/webgl_test_files/conformance/more/unit.js
@@ -391,6 +391,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)) {
diff --git a/LayoutTests/webgl/1.0.3/resources/webgl_test_files/conformance/ogles/ogles-utils.js b/LayoutTests/webgl/1.0.3/resources/webgl_test_files/conformance/ogles/ogles-utils.js
index 5bda8d5..73be924 100644
--- a/LayoutTests/webgl/1.0.3/resources/webgl_test_files/conformance/ogles/ogles-utils.js
+++ b/LayoutTests/webgl/1.0.3/resources/webgl_test_files/conformance/ogles/ogles-utils.js
@@ -500,6 +500,9 @@
// Check for unset uniforms
for (var name in uniforms) {
var uniform = uniforms[name];
+ if (name.indexOf("gl_") == 0) {
+ continue;
+ }
if (!uniform.used) {
testFailed("uniform " + name + " never set");
}
diff --git a/LayoutTests/webgl/1.0.3/resources/webgl_test_files/conformance/textures/tex-image-with-invalid-data.html b/LayoutTests/webgl/1.0.3/resources/webgl_test_files/conformance/textures/tex-image-with-invalid-data.html
index b8b865f..03e7eba 100644
--- a/LayoutTests/webgl/1.0.3/resources/webgl_test_files/conformance/textures/tex-image-with-invalid-data.html
+++ b/LayoutTests/webgl/1.0.3/resources/webgl_test_files/conformance/textures/tex-image-with-invalid-data.html
@@ -52,7 +52,7 @@
function setup() {
tex = gl.createTexture();
- gl.bindTexture(gl.TEXTURE_2D, bug32619_tests.tex);
+ gl.bindTexture(gl.TEXTURE_2D, tex);
gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 64, 64, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
}
@@ -81,6 +81,21 @@
}
}
+test("Calling texImage2D with no WebGLTexture bound generates INVALID_OPERATION",
+ function () {
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 64, 64, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
+ },
+ gl.INVALID_OPERATION);
+
+test("Calling texSubImage2D with no WebGLTexture bound generates INVALID_OPERATION",
+ function () {
+ var buffer = new Uint8Array(4);
+ gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, 1, 1, gl.RGBA, gl.UNSIGNED_BYTE, buffer);
+ },
+ gl.INVALID_OPERATION);
+
+setup();
+
test("Passing a buffer not large enough to texImage2D should generate an INVALID_OPERATION",
function () {
var tooSmall = new Uint8Array(64);
@@ -118,6 +133,8 @@
},
"exception");
+teardown();
+
debug("");
var successfullyParsed = true;
</script>
diff --git a/LayoutTests/webgl/1.0.3/resources/webgl_test_files/conformance/typedarrays/array-unit-tests.html b/LayoutTests/webgl/1.0.3/resources/webgl_test_files/conformance/typedarrays/array-unit-tests.html
index 0f523cb..9e58f5c 100644
--- a/LayoutTests/webgl/1.0.3/resources/webgl_test_files/conformance/typedarrays/array-unit-tests.html
+++ b/LayoutTests/webgl/1.0.3/resources/webgl_test_files/conformance/typedarrays/array-unit-tests.html
@@ -195,16 +195,30 @@
// case, assert the new behavior.
shouldBe('new Uint8ClampedArray(1) instanceof Uint8Array', 'false');
- shouldBe('Object.getPrototypeOf(Int8Array.prototype)', 'Object.prototype');
- shouldBe('Object.getPrototypeOf(Uint8Array.prototype)', 'Object.prototype');
- shouldBe('Object.getPrototypeOf(Uint8ClampedArray.prototype)', 'Object.prototype');
- shouldBe('Object.getPrototypeOf(Int16Array.prototype)', 'Object.prototype');
- shouldBe('Object.getPrototypeOf(Uint16Array.prototype)', 'Object.prototype');
- shouldBe('Object.getPrototypeOf(Int32Array.prototype)', 'Object.prototype');
- shouldBe('Object.getPrototypeOf(Uint32Array.prototype)', 'Object.prototype');
- shouldBe('Object.getPrototypeOf(Float32Array.prototype)', 'Object.prototype');
- shouldBe('Object.getPrototypeOf(Float64Array.prototype)', 'Object.prototype');
- shouldBe('Object.getPrototypeOf(DataView.prototype)', 'Object.prototype');
+ if (Object.getPrototypeOf(Int8Array.prototype) == Object.prototype) {
+ // ES5 behavior.
+ shouldBe('Object.getPrototypeOf(Int8Array.prototype)', 'Object.prototype');
+ shouldBe('Object.getPrototypeOf(Uint8Array.prototype)', 'Object.prototype');
+ shouldBe('Object.getPrototypeOf(Uint8ClampedArray.prototype)', 'Object.prototype');
+ shouldBe('Object.getPrototypeOf(Int16Array.prototype)', 'Object.prototype');
+ shouldBe('Object.getPrototypeOf(Uint16Array.prototype)', 'Object.prototype');
+ shouldBe('Object.getPrototypeOf(Int32Array.prototype)', 'Object.prototype');
+ shouldBe('Object.getPrototypeOf(Uint32Array.prototype)', 'Object.prototype');
+ shouldBe('Object.getPrototypeOf(Float32Array.prototype)', 'Object.prototype');
+ shouldBe('Object.getPrototypeOf(Float64Array.prototype)', 'Object.prototype');
+ } else {
+ // As of ES6, the prototypes for typed array constructors point to an intrinsic object whose internal
+ // prototype is Object.prototype. Relevant spec section is 22.2.5.2: TypedArray.prototype.
+ shouldBe('Object.getPrototypeOf(Object.getPrototypeOf(Int8Array.prototype))', 'Object.prototype');
+ shouldBe('Object.getPrototypeOf(Object.getPrototypeOf(Uint8Array.prototype))', 'Object.prototype');
+ shouldBe('Object.getPrototypeOf(Object.getPrototypeOf(Uint8ClampedArray.prototype))', 'Object.prototype');
+ shouldBe('Object.getPrototypeOf(Object.getPrototypeOf(Int16Array.prototype))', 'Object.prototype');
+ shouldBe('Object.getPrototypeOf(Object.getPrototypeOf(Uint16Array.prototype))', 'Object.prototype');
+ shouldBe('Object.getPrototypeOf(Object.getPrototypeOf(Int32Array.prototype))', 'Object.prototype');
+ shouldBe('Object.getPrototypeOf(Object.getPrototypeOf(Uint32Array.prototype))', 'Object.prototype');
+ shouldBe('Object.getPrototypeOf(Object.getPrototypeOf(Float32Array.prototype))', 'Object.prototype');
+ shouldBe('Object.getPrototypeOf(Object.getPrototypeOf(Float64Array.prototype))', 'Object.prototype');
+ }
}
//
diff --git a/LayoutTests/webgl/1.0.3/resources/webgl_test_files/conformance/typedarrays/resources/typed-array-worker.js b/LayoutTests/webgl/1.0.3/resources/webgl_test_files/conformance/typedarrays/resources/typed-array-worker.js
index 6050865..c68ee07 100644
--- a/LayoutTests/webgl/1.0.3/resources/webgl_test_files/conformance/typedarrays/resources/typed-array-worker.js
+++ b/LayoutTests/webgl/1.0.3/resources/webgl_test_files/conformance/typedarrays/resources/typed-array-worker.js
@@ -74,7 +74,7 @@
} else {
valueToSend = view.buffer;
}
- var transferablesToSend = null;
+ var transferablesToSend = undefined;
if (message.command == 'transfer' ||
message.command == 'transferBuffer') {
transferablesToSend = [ view.buffer ];
diff --git a/LayoutTests/webgl/1.0.3/resources/webgl_test_files/webgl-conformance-tests.html b/LayoutTests/webgl/1.0.3/resources/webgl_test_files/webgl-conformance-tests.html
index 381b8cd..b0a6471 100644
--- a/LayoutTests/webgl/1.0.3/resources/webgl_test_files/webgl-conformance-tests.html
+++ b/LayoutTests/webgl/1.0.3/resources/webgl_test_files/webgl-conformance-tests.html
@@ -180,6 +180,13 @@
}
}
+ function createStylesheet() {
+ var style = document.createElement("style");
+ style.appendChild(document.createTextNode(""));
+ document.head.appendChild(style);
+ return style.sheet;
+ }
+
function create3DContext(canvas, attrs, version) {
if (!canvas) {
canvas = document.createElement("canvas");
@@ -926,6 +933,19 @@
autoScrollEnabled = autoScrollCheckbox.checked;
autoScroll = autoScrollEnabled;
};
+
+ var hidePassedSheet = createStylesheet();
+ var hidePassedCheckbox = document.getElementById("hidePassedCheckbox");
+ hidePassedCheckbox.checked = false;
+ hidePassedCheckbox.onclick = function() {
+ var hidePassedTests = hidePassedCheckbox.checked;
+ if (hidePassedTests) {
+ hidePassedSheet.insertRule(".testpagesuccess { display: none; }", 0);
+ } else {
+ hidePassedSheet.deleteRule(0);
+ }
+ };
+
var textbutton = document.getElementById("showTextSummary");
textbutton.onclick = function() {
log("click");
@@ -992,6 +1012,9 @@
<input type="checkbox" id="autoScrollCheckbox"/>
<label for="autoScrollCheckbox">auto scroll</label>
<br/>
+ <input type="checkbox" id="hidePassedCheckbox"/>
+ <label for="hidePassedCheckbox">hide passed tests</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