[SCM] WebKit Debian packaging branch, debian/experimental, updated. debian/1.3.8-1-142-g786665c
kbr at google.com
kbr at google.com
Mon Dec 27 16:30:59 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 746a053c898f0fdfbf2279b839ab671ca775f1ee
Author: kbr at google.com <kbr at google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Dec 22 21:13:58 2010 +0000
2010-12-22 Kenneth Russell <kbr at google.com>
Reviewed by David Levin.
Update fast/canvas/webgl/gl-uniform-arrays.html to bring in sync with Khronos
https://bugs.webkit.org/show_bug.cgi?id=51489
* fast/canvas/webgl/gl-uniform-arrays-expected.txt:
* fast/canvas/webgl/gl-uniform-arrays.html:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74499 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 01b2603..781b5ef 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,13 @@
+2010-12-22 Kenneth Russell <kbr at google.com>
+
+ Reviewed by David Levin.
+
+ Update fast/canvas/webgl/gl-uniform-arrays.html to bring in sync with Khronos
+ https://bugs.webkit.org/show_bug.cgi?id=51489
+
+ * fast/canvas/webgl/gl-uniform-arrays-expected.txt:
+ * fast/canvas/webgl/gl-uniform-arrays.html:
+
2010-12-22 Zhenyao Mo <zmo at google.com>
Reviewed by Kenneth Russell.
diff --git a/LayoutTests/fast/canvas/webgl/gl-uniform-arrays-expected.txt b/LayoutTests/fast/canvas/webgl/gl-uniform-arrays-expected.txt
index 4bd0452..e79991c 100644
--- a/LayoutTests/fast/canvas/webgl/gl-uniform-arrays-expected.txt
+++ b/LayoutTests/fast/canvas/webgl/gl-uniform-arrays-expected.txt
@@ -7,85 +7,85 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
check float
PASS 1 uniform found
PASS uniform name is 'color[0]' not 'color' as per OpenGL ES 2.0.24 section 2.10
-PASS should fail if there is no current program
-PASS should fail with insufficient array size with gl.uniform1fv
-PASS can set an array of uniforms with gl.uniform1fv
-PASS can call gl.getUniform
+PASS getError was expected value: INVALID_OPERATION : should fail if there is no current program
+PASS getError was expected value: INVALID_VALUE : should fail with insufficient array size with gl.uniform1fv
+PASS getError was expected value: NO_ERROR : can set an array of uniforms with gl.uniform1fv
+PASS getError was expected value: NO_ERROR : can call gl.getUniform
PASS gl.getUniform returns the correct type.
-PASS can get location of element 0 of array from gl.getUniformLocation
-PASS can get value of element 0 of array from gl.getUniform
+PASS getError was expected value: NO_ERROR : can get location of element 0 of array from gl.getUniformLocation
+PASS getError was expected value: NO_ERROR : can get value of element 0 of array from gl.getUniform
PASS value put in (16) matches value pulled out (16)
-PASS can get location of element 1 of array from gl.getUniformLocation
-PASS can get value of element 1 of array from gl.getUniform
+PASS getError was expected value: NO_ERROR : can get location of element 1 of array from gl.getUniformLocation
+PASS getError was expected value: NO_ERROR : can get value of element 1 of array from gl.getUniform
PASS value put in (15) matches value pulled out (15)
-PASS can get location of element 2 of array from gl.getUniformLocation
-PASS can get value of element 2 of array from gl.getUniform
+PASS getError was expected value: NO_ERROR : can get location of element 2 of array from gl.getUniformLocation
+PASS getError was expected value: NO_ERROR : can get value of element 2 of array from gl.getUniform
PASS value put in (14) matches value pulled out (14)
-PASS using the wrong size of gl.Uniform fails
-PASS can call gl.useProgram(null)
+PASS getError was expected value: INVALID_OPERATION : using the wrong size of gl.Uniform fails
+PASS getError was expected value: NO_ERROR : can call gl.useProgram(null)
check vec2
PASS 1 uniform found
PASS uniform name is 'color[0]' not 'color' as per OpenGL ES 2.0.24 section 2.10
-PASS should fail if there is no current program
-PASS should fail with insufficient array size with gl.uniform2fv
-PASS can set an array of uniforms with gl.uniform2fv
-PASS can call gl.getUniform
+PASS getError was expected value: INVALID_OPERATION : should fail if there is no current program
+PASS getError was expected value: INVALID_VALUE : should fail with insufficient array size with gl.uniform2fv
+PASS getError was expected value: NO_ERROR : can set an array of uniforms with gl.uniform2fv
+PASS getError was expected value: NO_ERROR : can call gl.getUniform
PASS gl.getUniform returns the correct type.
-PASS can get location of element 0 of array from gl.getUniformLocation
-PASS can get value of element 0 of array from gl.getUniform
+PASS getError was expected value: NO_ERROR : can get location of element 0 of array from gl.getUniformLocation
+PASS getError was expected value: NO_ERROR : can get value of element 0 of array from gl.getUniform
PASS value put in ([16, 15]) matches value pulled out ([16, 15])
-PASS can get location of element 1 of array from gl.getUniformLocation
-PASS can get value of element 1 of array from gl.getUniform
+PASS getError was expected value: NO_ERROR : can get location of element 1 of array from gl.getUniformLocation
+PASS getError was expected value: NO_ERROR : can get value of element 1 of array from gl.getUniform
PASS value put in ([14, 13]) matches value pulled out ([14, 13])
-PASS can get location of element 2 of array from gl.getUniformLocation
-PASS can get value of element 2 of array from gl.getUniform
+PASS getError was expected value: NO_ERROR : can get location of element 2 of array from gl.getUniformLocation
+PASS getError was expected value: NO_ERROR : can get value of element 2 of array from gl.getUniform
PASS value put in ([12, 11]) matches value pulled out ([12, 11])
-PASS using the wrong size of gl.Uniform fails
+PASS getError was expected value: INVALID_OPERATION : using the wrong size of gl.Uniform fails
PASS passing non-array to glUniform*fv should throw TypeError
-PASS can call gl.useProgram(null)
+PASS getError was expected value: NO_ERROR : can call gl.useProgram(null)
check vec3
PASS 1 uniform found
PASS uniform name is 'color[0]' not 'color' as per OpenGL ES 2.0.24 section 2.10
-PASS should fail if there is no current program
-PASS should fail with insufficient array size with gl.uniform3fv
-PASS can set an array of uniforms with gl.uniform3fv
-PASS can call gl.getUniform
+PASS getError was expected value: INVALID_OPERATION : should fail if there is no current program
+PASS getError was expected value: INVALID_VALUE : should fail with insufficient array size with gl.uniform3fv
+PASS getError was expected value: NO_ERROR : can set an array of uniforms with gl.uniform3fv
+PASS getError was expected value: NO_ERROR : can call gl.getUniform
PASS gl.getUniform returns the correct type.
-PASS can get location of element 0 of array from gl.getUniformLocation
-PASS can get value of element 0 of array from gl.getUniform
+PASS getError was expected value: NO_ERROR : can get location of element 0 of array from gl.getUniformLocation
+PASS getError was expected value: NO_ERROR : can get value of element 0 of array from gl.getUniform
PASS value put in ([16, 15, 14]) matches value pulled out ([16, 15, 14])
-PASS can get location of element 1 of array from gl.getUniformLocation
-PASS can get value of element 1 of array from gl.getUniform
+PASS getError was expected value: NO_ERROR : can get location of element 1 of array from gl.getUniformLocation
+PASS getError was expected value: NO_ERROR : can get value of element 1 of array from gl.getUniform
PASS value put in ([13, 12, 11]) matches value pulled out ([13, 12, 11])
-PASS can get location of element 2 of array from gl.getUniformLocation
-PASS can get value of element 2 of array from gl.getUniform
+PASS getError was expected value: NO_ERROR : can get location of element 2 of array from gl.getUniformLocation
+PASS getError was expected value: NO_ERROR : can get value of element 2 of array from gl.getUniform
PASS value put in ([10, 9, 8]) matches value pulled out ([10, 9, 8])
-PASS using the wrong size of gl.Uniform fails
+PASS getError was expected value: INVALID_OPERATION : using the wrong size of gl.Uniform fails
PASS passing non-array to glUniform*fv should throw TypeError
-PASS can call gl.useProgram(null)
+PASS getError was expected value: NO_ERROR : can call gl.useProgram(null)
check vec4
PASS 1 uniform found
PASS uniform name is 'color[0]' not 'color' as per OpenGL ES 2.0.24 section 2.10
-PASS should fail if there is no current program
-PASS should fail with insufficient array size with gl.uniform4fv
-PASS can set an array of uniforms with gl.uniform4fv
-PASS can call gl.getUniform
+PASS getError was expected value: INVALID_OPERATION : should fail if there is no current program
+PASS getError was expected value: INVALID_VALUE : should fail with insufficient array size with gl.uniform4fv
+PASS getError was expected value: NO_ERROR : can set an array of uniforms with gl.uniform4fv
+PASS getError was expected value: NO_ERROR : can call gl.getUniform
PASS gl.getUniform returns the correct type.
-PASS can get location of element 0 of array from gl.getUniformLocation
-PASS can get value of element 0 of array from gl.getUniform
+PASS getError was expected value: NO_ERROR : can get location of element 0 of array from gl.getUniformLocation
+PASS getError was expected value: NO_ERROR : can get value of element 0 of array from gl.getUniform
PASS value put in ([16, 15, 14, 13]) matches value pulled out ([16, 15, 14, 13])
-PASS can get location of element 1 of array from gl.getUniformLocation
-PASS can get value of element 1 of array from gl.getUniform
+PASS getError was expected value: NO_ERROR : can get location of element 1 of array from gl.getUniformLocation
+PASS getError was expected value: NO_ERROR : can get value of element 1 of array from gl.getUniform
PASS value put in ([12, 11, 10, 9]) matches value pulled out ([12, 11, 10, 9])
-PASS can get location of element 2 of array from gl.getUniformLocation
-PASS can get value of element 2 of array from gl.getUniform
+PASS getError was expected value: NO_ERROR : can get location of element 2 of array from gl.getUniformLocation
+PASS getError was expected value: NO_ERROR : can get value of element 2 of array from gl.getUniform
PASS value put in ([8, 7, 6, 5]) matches value pulled out ([8, 7, 6, 5])
-PASS using the wrong size of gl.Uniform fails
+PASS getError was expected value: INVALID_OPERATION : using the wrong size of gl.Uniform fails
PASS passing non-array to glUniform*fv should throw TypeError
-PASS can call gl.useProgram(null)
+PASS getError was expected value: NO_ERROR : can call gl.useProgram(null)
PASS successfullyParsed is true
diff --git a/LayoutTests/fast/canvas/webgl/gl-uniform-arrays.html b/LayoutTests/fast/canvas/webgl/gl-uniform-arrays.html
index bff30fd..bdd4434 100644
--- a/LayoutTests/fast/canvas/webgl/gl-uniform-arrays.html
+++ b/LayoutTests/fast/canvas/webgl/gl-uniform-arrays.html
@@ -21,12 +21,10 @@
</script>
<script id="fshader" type="x-shader/x-fragment">
- // Workaround for non-compliant WebGL implementations (FIXME)
- #if defined(GL_ES)
- uniform mediump $type color[3];
- #else
- uniform $type color[3];
+ #ifdef GL_ES
+ precision mediump float;
#endif
+ uniform $type color[3];
void main()
{
gl_FragColor = vec4(color[0]$elem, color[1]$elem, color[2]$elem, 1);
@@ -105,7 +103,7 @@ var typeInfos = [
return value === null ? 'null' : value.toString();
},
checkType: function(value) {
- return typeof values === 'number';
+ return typeof value === 'number';
},
checkValue: function(typeInfo, index, value) {
return typeInfo.srcValues[index] == value;
@@ -132,8 +130,9 @@ var typeInfos = [
return value === null ? 'null' : ("[" + value[0] + ", " + value[1] + "]");
},
checkType: function(value) {
- return typeof values.length === 'number' &&
- values.length == 2;
+ return value &&
+ typeof value.length === 'number' &&
+ value.length == 2;
},
checkValue: function(typeInfo, index, value) {
return value !== null &&
@@ -164,8 +163,9 @@ var typeInfos = [
("[" + value[0] + ", " + value[1] + ", " + value[2] + "]");
},
checkType: function(value) {
- return typeof values.length === 'number' &&
- values.length == 3;
+ return value &&
+ typeof value.length === 'number' &&
+ value.length == 3;
},
checkValue: function(typeInfo, index, value) {
return value !== null &&
@@ -199,8 +199,9 @@ var typeInfos = [
", " + value[2] + ", " + value[3] + "]");
},
checkType: function(value) {
- return typeof values.length === 'number' &&
- values.length == 4;
+ return value &&
+ typeof value.length === 'number' &&
+ value.length == 4;
},
checkValue: function(typeInfo, index, value) {
return value !== null &&
@@ -228,34 +229,34 @@ for (var tt = 0; tt < typeInfos.length; ++tt) {
var info = gl.getActiveUniform(program, 0);
assertMsg(info.name == "color[0]",
"uniform name is 'color[0]' not 'color' as per OpenGL ES 2.0.24 section 2.10");
- var loc = gl.getUniformLocation(program, "color");
+ var loc = gl.getUniformLocation(program, "color[0]");
var srcValues = typeInfo.srcValues;
var srcValuesBad = typeInfo.srcValuesBad;
// Try setting the value before using the program
gl[typeInfo.setter](loc, srcValues);
- assertMsg(gl.getError() == gl.INVALID_OPERATION,
+ glErrorShouldBe(gl, gl.INVALID_OPERATION,
"should fail if there is no current program");
gl.useProgram(program);
gl[typeInfo.setter](loc, srcValuesBad);
- assertMsg(gl.getError() == gl.INVALID_VALUE,
+ glErrorShouldBe(gl, gl.INVALID_VALUE,
"should fail with insufficient array size with gl." + typeInfo.setter);
gl[typeInfo.setter](loc, srcValues);
- assertMsg(gl.getError() == gl.NO_ERROR,
+ glErrorShouldBe(gl, gl.NO_ERROR,
"can set an array of uniforms with gl." + typeInfo.setter);
var values = gl.getUniform(program, loc);
- assertMsg(gl.getError() == gl.NO_ERROR,
+ glErrorShouldBe(gl, gl.NO_ERROR,
"can call gl.getUniform");
assertMsg(typeInfo.checkType(values),
"gl.getUniform returns the correct type.");
for (var ii = 0; ii < typeInfo.numSrcValues; ++ii) {
var elemLoc = gl.getUniformLocation(program, "color[" + ii + "]");
- assertMsg(gl.getError() == gl.NO_ERROR,
+ glErrorShouldBe(gl, gl.NO_ERROR,
"can get location of element " + ii +
" of array from gl.getUniformLocation");
var value = gl.getUniform(program, elemLoc);
- assertMsg(gl.getError() == gl.NO_ERROR,
+ glErrorShouldBe(gl, gl.NO_ERROR,
"can get value of element " + ii + " of array from gl.getUniform");
assertMsg(typeInfo.checkValue(typeInfo, ii, value),
"value put in (" + typeInfo.srcValueAsString(ii, srcValues) +
@@ -263,7 +264,7 @@ for (var tt = 0; tt < typeInfos.length; ++tt) {
typeInfo.returnValueAsString(value) + ")");
}
typeInfo.invalidSet(loc);
- assertMsg(gl.getError() == gl.INVALID_OPERATION,
+ glErrorShouldBe(gl, gl.INVALID_OPERATION,
"using the wrong size of gl.Uniform fails");
var exceptionCaught = false;
if (typeInfo.illegalSet) {
@@ -276,7 +277,7 @@ for (var tt = 0; tt < typeInfos.length; ++tt) {
}
gl.useProgram(null);
- assertMsg(gl.getError() == gl.NO_ERROR,
+ glErrorShouldBe(gl, gl.NO_ERROR,
"can call gl.useProgram(null)");
}
debug("");
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list