Title: [189407] trunk/LayoutTests
Revision
189407
Author
[email protected]
Date
2015-09-04 17:32:01 -0700 (Fri, 04 Sep 2015)

Log Message

[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:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (189406 => 189407)


--- trunk/LayoutTests/ChangeLog	2015-09-05 00:23:50 UTC (rev 189406)
+++ trunk/LayoutTests/ChangeLog	2015-09-05 00:32:01 UTC (rev 189407)
@@ -1,3 +1,39 @@
+2015-09-04  Dean Jackson  <[email protected]>
+
+        [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  <[email protected]>
 
         Forgot to mark these expectations.

Modified: trunk/LayoutTests/platform/mac/TestExpectations (189406 => 189407)


--- trunk/LayoutTests/platform/mac/TestExpectations	2015-09-05 00:23:50 UTC (rev 189406)
+++ trunk/LayoutTests/platform/mac/TestExpectations	2015-09-05 00:32:01 UTC (rev 189407)
@@ -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 ]
 

Modified: trunk/LayoutTests/webgl/1.0.3/conformance/extensions/oes-texture-half-float-expected.txt (189406 => 189407)


--- trunk/LayoutTests/webgl/1.0.3/conformance/extensions/oes-texture-half-float-expected.txt	2015-09-05 00:23:50 UTC (rev 189406)
+++ trunk/LayoutTests/webgl/1.0.3/conformance/extensions/oes-texture-half-float-expected.txt	2015-09-05 00:32:01 UTC (rev 189407)
@@ -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
 

Modified: trunk/LayoutTests/webgl/1.0.3/conformance/extensions/webgl-compressed-texture-size-limit-expected.txt (189406 => 189407)


--- trunk/LayoutTests/webgl/1.0.3/conformance/extensions/webgl-compressed-texture-size-limit-expected.txt	2015-09-05 00:23:50 UTC (rev 189406)
+++ trunk/LayoutTests/webgl/1.0.3/conformance/extensions/webgl-compressed-texture-size-limit-expected.txt	2015-09-05 00:32:01 UTC (rev 189407)
@@ -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
 

Modified: trunk/LayoutTests/webgl/1.0.3/conformance/extensions/webgl-draw-buffers-expected.txt (189406 => 189407)


--- trunk/LayoutTests/webgl/1.0.3/conformance/extensions/webgl-draw-buffers-expected.txt	2015-09-05 00:23:50 UTC (rev 189406)
+++ trunk/LayoutTests/webgl/1.0.3/conformance/extensions/webgl-draw-buffers-expected.txt	2015-09-05 00:32:01 UTC (rev 189407)
@@ -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
 

Modified: trunk/LayoutTests/webgl/1.0.3/conformance/glsl/misc/shader-struct-scope-expected.txt (189406 => 189407)


--- trunk/LayoutTests/webgl/1.0.3/conformance/glsl/misc/shader-struct-scope-expected.txt	2015-09-05 00:23:50 UTC (rev 189406)
+++ trunk/LayoutTests/webgl/1.0.3/conformance/glsl/misc/shader-struct-scope-expected.txt	2015-09-05 00:32:01 UTC (rev 189407)
@@ -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
 

Modified: trunk/LayoutTests/webgl/1.0.3/conformance/glsl/misc/shaders-with-invariance-expected.txt (189406 => 189407)


--- trunk/LayoutTests/webgl/1.0.3/conformance/glsl/misc/shaders-with-invariance-expected.txt	2015-09-05 00:23:50 UTC (rev 189406)
+++ trunk/LayoutTests/webgl/1.0.3/conformance/glsl/misc/shaders-with-invariance-expected.txt	2015-09-05 00:32:01 UTC (rev 189407)
@@ -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
 

Modified: trunk/LayoutTests/webgl/1.0.3/conformance/glsl/misc/shaders-with-name-conflicts-expected.txt (189406 => 189407)


--- trunk/LayoutTests/webgl/1.0.3/conformance/glsl/misc/shaders-with-name-conflicts-expected.txt	2015-09-05 00:23:50 UTC (rev 189406)
+++ trunk/LayoutTests/webgl/1.0.3/conformance/glsl/misc/shaders-with-name-conflicts-expected.txt	2015-09-05 00:32:01 UTC (rev 189407)
@@ -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
 

Modified: trunk/LayoutTests/webgl/1.0.3/conformance/glsl/misc/struct-nesting-of-variable-names-expected.txt (189406 => 189407)


--- trunk/LayoutTests/webgl/1.0.3/conformance/glsl/misc/struct-nesting-of-variable-names-expected.txt	2015-09-05 00:23:50 UTC (rev 189406)
+++ trunk/LayoutTests/webgl/1.0.3/conformance/glsl/misc/struct-nesting-of-variable-names-expected.txt	2015-09-05 00:32:01 UTC (rev 189407)
@@ -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
 

Modified: trunk/LayoutTests/webgl/1.0.3/conformance/renderbuffers/feedback-loop-expected.txt (189406 => 189407)


--- trunk/LayoutTests/webgl/1.0.3/conformance/renderbuffers/feedback-loop-expected.txt	2015-09-05 00:23:50 UTC (rev 189406)
+++ trunk/LayoutTests/webgl/1.0.3/conformance/renderbuffers/feedback-loop-expected.txt	2015-09-05 00:32:01 UTC (rev 189407)
@@ -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
 

Modified: trunk/LayoutTests/webgl/1.0.3/conformance/textures/texture-copying-feedback-loops-expected.txt (189406 => 189407)


--- trunk/LayoutTests/webgl/1.0.3/conformance/textures/texture-copying-feedback-loops-expected.txt	2015-09-05 00:23:50 UTC (rev 189406)
+++ trunk/LayoutTests/webgl/1.0.3/conformance/textures/texture-copying-feedback-loops-expected.txt	2015-09-05 00:32:01 UTC (rev 189407)
@@ -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
 

Modified: trunk/LayoutTests/webgl/1.0.3/resources/webgl_test_files/conformance/extensions/angle-instanced-arrays.html (189406 => 189407)


--- trunk/LayoutTests/webgl/1.0.3/resources/webgl_test_files/conformance/extensions/angle-instanced-arrays.html	2015-09-05 00:23:50 UTC (rev 189406)
+++ trunk/LayoutTests/webgl/1.0.3/resources/webgl_test_files/conformance/extensions/angle-instanced-arrays.html	2015-09-05 00:32:01 UTC (rev 189407)
@@ -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=""
-
 </body>
 </html>

Modified: trunk/LayoutTests/webgl/1.0.3/resources/webgl_test_files/conformance/glsl/misc/shader-with-for-loop.html (189406 => 189407)


--- trunk/LayoutTests/webgl/1.0.3/resources/webgl_test_files/conformance/glsl/misc/shader-with-for-loop.html	2015-09-05 00:23:50 UTC (rev 189406)
+++ trunk/LayoutTests/webgl/1.0.3/resources/webgl_test_files/conformance/glsl/misc/shader-with-for-loop.html	2015-09-05 00:32:01 UTC (rev 189407)
@@ -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.;

Modified: trunk/LayoutTests/webgl/1.0.3/resources/webgl_test_files/conformance/glsl/misc/ternary-operators-in-global-initializers.html (189406 => 189407)


--- trunk/LayoutTests/webgl/1.0.3/resources/webgl_test_files/conformance/glsl/misc/ternary-operators-in-global-initializers.html	2015-09-05 00:23:50 UTC (rev 189406)
+++ trunk/LayoutTests/webgl/1.0.3/resources/webgl_test_files/conformance/glsl/misc/ternary-operators-in-global-initializers.html	2015-09-05 00:32:01 UTC (rev 189407)
@@ -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);

Modified: trunk/LayoutTests/webgl/1.0.3/resources/webgl_test_files/conformance/misc/bad-arguments-test.html (189406 => 189407)


--- trunk/LayoutTests/webgl/1.0.3/resources/webgl_test_files/conformance/misc/bad-arguments-test.html	2015-09-05 00:23:50 UTC (rev 189406)
+++ trunk/LayoutTests/webgl/1.0.3/resources/webgl_test_files/conformance/misc/bad-arguments-test.html	2015-09-05 00:32:01 UTC (rev 189407)
@@ -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;

Modified: trunk/LayoutTests/webgl/1.0.3/resources/webgl_test_files/conformance/more/functions/uniformMatrixBadArgs.html (189406 => 189407)


--- trunk/LayoutTests/webgl/1.0.3/resources/webgl_test_files/conformance/more/functions/uniformMatrixBadArgs.html	2015-09-05 00:23:50 UTC (rev 189406)
+++ trunk/LayoutTests/webgl/1.0.3/resources/webgl_test_files/conformance/more/functions/uniformMatrixBadArgs.html	2015-09-05 00:32:01 UTC (rev 189407)
@@ -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.3/resources/webgl_test_files/conformance/more/unit.js (189406 => 189407)


--- trunk/LayoutTests/webgl/1.0.3/resources/webgl_test_files/conformance/more/unit.js	2015-09-05 00:23:50 UTC (rev 189406)
+++ trunk/LayoutTests/webgl/1.0.3/resources/webgl_test_files/conformance/more/unit.js	2015-09-05 00:32:01 UTC (rev 189407)
@@ -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)) {

Modified: trunk/LayoutTests/webgl/1.0.3/resources/webgl_test_files/conformance/ogles/ogles-utils.js (189406 => 189407)


--- trunk/LayoutTests/webgl/1.0.3/resources/webgl_test_files/conformance/ogles/ogles-utils.js	2015-09-05 00:23:50 UTC (rev 189406)
+++ trunk/LayoutTests/webgl/1.0.3/resources/webgl_test_files/conformance/ogles/ogles-utils.js	2015-09-05 00:32:01 UTC (rev 189407)
@@ -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");
     }

Modified: trunk/LayoutTests/webgl/1.0.3/resources/webgl_test_files/conformance/textures/tex-image-with-invalid-data.html (189406 => 189407)


--- trunk/LayoutTests/webgl/1.0.3/resources/webgl_test_files/conformance/textures/tex-image-with-invalid-data.html	2015-09-05 00:23:50 UTC (rev 189406)
+++ trunk/LayoutTests/webgl/1.0.3/resources/webgl_test_files/conformance/textures/tex-image-with-invalid-data.html	2015-09-05 00:32:01 UTC (rev 189407)
@@ -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>

Modified: trunk/LayoutTests/webgl/1.0.3/resources/webgl_test_files/conformance/typedarrays/array-unit-tests.html (189406 => 189407)


--- trunk/LayoutTests/webgl/1.0.3/resources/webgl_test_files/conformance/typedarrays/array-unit-tests.html	2015-09-05 00:23:50 UTC (rev 189406)
+++ trunk/LayoutTests/webgl/1.0.3/resources/webgl_test_files/conformance/typedarrays/array-unit-tests.html	2015-09-05 00:32:01 UTC (rev 189407)
@@ -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');
+  }
 }
 
 //

Modified: trunk/LayoutTests/webgl/1.0.3/resources/webgl_test_files/conformance/typedarrays/resources/typed-array-worker.js (189406 => 189407)


--- trunk/LayoutTests/webgl/1.0.3/resources/webgl_test_files/conformance/typedarrays/resources/typed-array-worker.js	2015-09-05 00:23:50 UTC (rev 189406)
+++ trunk/LayoutTests/webgl/1.0.3/resources/webgl_test_files/conformance/typedarrays/resources/typed-array-worker.js	2015-09-05 00:32:01 UTC (rev 189407)
@@ -74,7 +74,7 @@
     } else {
       valueToSend = view.buffer;
     }
-    var transferablesToSend = null;
+    var transferablesToSend = undefined;
     if (message.command == 'transfer' ||
         message.command == 'transferBuffer') {
       transferablesToSend = [ view.buffer ];

Modified: trunk/LayoutTests/webgl/1.0.3/resources/webgl_test_files/webgl-conformance-tests.html (189406 => 189407)


--- trunk/LayoutTests/webgl/1.0.3/resources/webgl_test_files/webgl-conformance-tests.html	2015-09-05 00:23:50 UTC (rev 189406)
+++ trunk/LayoutTests/webgl/1.0.3/resources/webgl_test_files/webgl-conformance-tests.html	2015-09-05 00:32:01 UTC (rev 189407)
@@ -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="" scroll</label>
               <br/>
+              <input type="checkbox" id="hidePassedCheckbox"/>
+              <label for="" 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
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to