Title: [143373] trunk/LayoutTests
Revision
143373
Author
[email protected]
Date
2013-02-19 12:43:48 -0800 (Tue, 19 Feb 2013)

Log Message

[WebGL] Fix oes-element-index-uint.html test.
https://bugs.webkit.org/show_bug.cgi?id=110045

Patch by Kondapally Kalyan <[email protected]> on 2013-02-19
Reviewed by Kenneth Russell.

This patch fixes the test case to use updated WebGLTestUtils functions
and adds shaders used during resized buffer tests. This patch
also enables the test for EFL port.

* fast/canvas/webgl/oes-element-index-uint-expected.txt:
* fast/canvas/webgl/oes-element-index-uint.html:
* platform/efl/TestExpectations:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (143372 => 143373)


--- trunk/LayoutTests/ChangeLog	2013-02-19 20:36:36 UTC (rev 143372)
+++ trunk/LayoutTests/ChangeLog	2013-02-19 20:43:48 UTC (rev 143373)
@@ -1,3 +1,18 @@
+2013-02-19  Kondapally Kalyan  <[email protected]>
+
+        [WebGL] Fix oes-element-index-uint.html test.
+        https://bugs.webkit.org/show_bug.cgi?id=110045
+
+        Reviewed by Kenneth Russell.
+
+        This patch fixes the test case to use updated WebGLTestUtils functions
+        and adds shaders used during resized buffer tests. This patch
+        also enables the test for EFL port.
+
+        * fast/canvas/webgl/oes-element-index-uint-expected.txt:
+        * fast/canvas/webgl/oes-element-index-uint.html:
+        * platform/efl/TestExpectations:
+
 2013-02-19  Adrienne Walker  <[email protected]>
 
         [chromium] Mark fast/workers/storage/interrupt-database.html as flaky crasher

Modified: trunk/LayoutTests/fast/canvas/webgl/oes-element-index-uint-expected.txt (143372 => 143373)


--- trunk/LayoutTests/fast/canvas/webgl/oes-element-index-uint-expected.txt	2013-02-19 20:36:36 UTC (rev 143372)
+++ trunk/LayoutTests/fast/canvas/webgl/oes-element-index-uint-expected.txt	2013-02-19 20:43:48 UTC (rev 143373)
@@ -59,4 +59,5 @@
 
 PASS successfullyParsed is true
 
-TEST COMPLETE
\ No newline at end of file
+TEST COMPLETE
+

Modified: trunk/LayoutTests/fast/canvas/webgl/oes-element-index-uint.html (143372 => 143373)


--- trunk/LayoutTests/fast/canvas/webgl/oes-element-index-uint.html	2013-02-19 20:36:36 UTC (rev 143372)
+++ trunk/LayoutTests/fast/canvas/webgl/oes-element-index-uint.html	2013-02-19 20:43:48 UTC (rev 143373)
@@ -12,11 +12,32 @@
 <div id="description"></div>
 <canvas id="canvas" style="width: 50px; height: 50px;"> </canvas>
 <div id="console"></div>
+<script id="vs" type="x-shader/x-vertex">
+attribute vec4 vPosition;
+attribute vec4 vColor;
+varying vec4 color;
+void main() {
+    gl_Position = vPosition;
+    color = vColor;
+}
+</script>
+<script id="fs" type="x-shader/x-fragment">
+#if defined(GL_ES)
+precision mediump float;
+#endif
+varying vec4 color;
+void main() {
+  gl_FragColor = color;
+}
+</script>
 <script>
 description("This test verifies the functionality of the OES_element_index_uint extension, if it is available.");
 
 debug("");
 
+if (window.internals)
+    window.internals.settings.setWebGLErrorsToConsoleEnabled(false);
+
 var wtu = WebGLTestUtils;
 var canvas = document.getElementById("canvas");
 var gl = create3DContext(canvas);
@@ -75,7 +96,7 @@
     canvas.width = 50; canvas.height = 50;
     gl.viewport(0, 0, canvas.width, canvas.height);
     
-    var program = wtu.setupNoTexCoordTextureProgram(gl);
+    var program = wtu.setupSimpleTextureProgram(gl);
 
     function setupDraw(s) {
         // Create a vertex buffer that cannot be fully indexed via shorts
@@ -261,6 +282,7 @@
     gl.vertexAttribPointer(normalLoc, 3, gl.FLOAT, false, 7 * sizeInBytes(gl.FLOAT), -2000000000 * sizeInBytes(gl.FLOAT));
     glErrorShouldBe(gl, gl.INVALID_VALUE);
     shouldBeUndefined('gl.drawElements(gl.TRIANGLES, 3, gl.UNSIGNED_INT, 0)');
+    gl.disableVertexAttribArray(vertexLoc);
 }
 
 function runCopiesIndicesTests() {
@@ -294,7 +316,7 @@
 function runResizedBufferTests() {
     debug("Test that updating the size of a vertex buffer is properly noticed by the WebGL implementation.");
 
-    var program = setupProgram(gl, "vs", "fs", ["vPosition", "vColor"]);
+    var program = wtu.setupProgram(gl, ["vs", "fs"], ["vPosition", "vColor"]);
     glErrorShouldBe(gl, gl.NO_ERROR, "after initialization");
 
     var vertexObject = gl.createBuffer();
@@ -389,8 +411,11 @@
     glErrorShouldBe(gl, gl.INVALID_VALUE, "after attempting to update a buffer outside of the allocated bounds");
     testPassed("bufferSubData, when buffer object was initialized with null, did not crash");
 }
+
+debug("");
+successfullyParsed = true;
+isSuccessfullyParsed();
+
 </script>
-<script src=""
-
 </body>
 </html>

Modified: trunk/LayoutTests/platform/efl/TestExpectations (143372 => 143373)


--- trunk/LayoutTests/platform/efl/TestExpectations	2013-02-19 20:36:36 UTC (rev 143372)
+++ trunk/LayoutTests/platform/efl/TestExpectations	2013-02-19 20:43:48 UTC (rev 143373)
@@ -345,9 +345,6 @@
 
 webkit.org/b/99096 fast/canvas/webgl/arraybuffer-transfer-of-control.html [ Failure Pass ]
 
-# Expected to fail until OES_element_index_uint extension is implemented
-webkit.org/b/98257 fast/canvas/webgl/oes-element-index-uint.html [ Failure Pass ]
-
 #////////////////////////////////////////////////////////////////////////////////////////
 # TESTS EXPECTED TO FAIL
 #////////////////////////////////////////////////////////////////////////////////////////
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to