Bug 1325995 - Update tests.
MozReview-Commit-ID: H0k6ypLCW4P
--- a/dom/canvas/test/webgl-conf/checkout/conformance/glsl/misc/00_test_list.txt
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/glsl/misc/00_test_list.txt
@@ -31,17 +31,17 @@ shader-with-arbitrary-indexing.vert.html
--min-version 1.0.2 shader-with-array-of-structs-uniform.html
shader-with-attrib-array.vert.html
shader-with-attrib-struct.vert.html
shader-with-clipvertex.vert.html
--min-version 1.0.2 shader-with-conditional-scoping.html
--min-version 1.0.2 shader-with-conditional-scoping-negative.html
shader-with-default-precision.frag.html
shader-with-default-precision.vert.html
-shader-with-define-line-continuation.frag.html
+--max-version 1.9.9 shader-with-define-line-continuation.frag.html
shader-with-dfdx-no-ext.frag.html
shader-with-dfdx.frag.html
--min-version 1.0.2 shader-with-do-loop.html
shader-with-error-directive.html
shader-with-explicit-int-cast.vert.html
shader-with-float-return-value.frag.html
--min-version 1.0.2 shader-with-for-scoping.html
--min-version 1.0.2 shader-with-for-loop.html
--- a/dom/canvas/test/webgl-conf/checkout/conformance/misc/invalid-passed-params.html
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/misc/invalid-passed-params.html
@@ -39,16 +39,17 @@
<div id="console"></div>
<script>
"use strict";
description("Test for invalid passed parameters");
var wtu = WebGLTestUtils;
var context = wtu.create3DContext();
+var contextVersion = wtu.getDefault3DContextVersion();
debug("");
debug("Test createShader()");
wtu.shouldGenerateGLError(context, context.NO_ERROR, "context.createShader(context.FRAGMENT_SHADER)");
wtu.shouldGenerateGLError(context, context.NO_ERROR, "context.createShader(context.VERTEX_SHADER)");
wtu.shouldGenerateGLError(context, context.INVALID_ENUM, "context.createShader(0)");
wtu.shouldGenerateGLError(context, context.INVALID_ENUM, "context.createShader(context.TRIANGLES)");
@@ -105,17 +106,17 @@ function generateShaderSource(opt_invali
}
if (opt_invalidCommentChar != undefined) {
invalidCommentString += opt_invalidCommentChar;
}
return "uniform float " + validUniformName + invalidIdentifierString + ";\n"
+ "varying float " + validAttribName + ";\n"
+ "void main() {\n"
+ validAttribName + " = " + validUniformName + ";\n"
- + "gl_Position = vec4(0.0, 0.0, 0.0, 1.0); }\n";
+ + "gl_Position = vec4(0.0, 0.0, 0.0, 1.0); }\n"
+ "//.+-/*%<>[](){}^|&~=!:;,?# " + invalidCommentString;
}
var vShader = context.createShader(context.VERTEX_SHADER);
context.shaderSource(vShader, generateShaderSource());
context.compileShader(vShader);
shouldBe("context.getError()", "context.NO_ERROR");
var fShader = context.createShader(context.FRAGMENT_SHADER);
context.shaderSource(fShader, "precision mediump float;\n"
@@ -138,16 +139,19 @@ shouldBe("context.getError()", "context.
context.getAttribLocation(program, validAttribName);
shouldBe("context.getError()", "context.NO_ERROR");
context.getUniformLocation(program, validUniformName);
shouldBe("context.getError()", "context.NO_ERROR");
debug("");
debug("Test shaderSource() with invalid characters");
for (var i = 0; i < invalidSet.length; ++i) {
+ // Backslash as line-continuation is allowed in WebGL 2.0.
+ if (contextVersion > 1 && invalidSet[i] == '\\')
+ continue;
var validShaderSource = generateShaderSource(undefined, invalidSet[i]);
context.shaderSource(vShader, validShaderSource);
shouldBe("context.getError()", "context.NO_ERROR");
var invalidShaderSource = generateShaderSource(invalidSet[i], undefined);
context.shaderSource(vShader, invalidShaderSource);
shouldBe("context.getError()", "context.INVALID_VALUE");
}
--- a/dom/canvas/test/webgl-conf/generated-mochitest.ini
+++ b/dom/canvas/test/webgl-conf/generated-mochitest.ini
@@ -5097,18 +5097,16 @@ skip-if = (os == 'android' || os == 'lin
[generated/test_2_conformance__glsl__misc__shader-with-conditional-scoping-negative.html]
skip-if = (os == 'android' || os == 'linux' || (os == 'win' && os_version == '5.1'))
[generated/test_2_conformance__glsl__misc__shader-with-conditional-scoping.html]
skip-if = (os == 'android' || os == 'linux' || (os == 'win' && os_version == '5.1'))
[generated/test_2_conformance__glsl__misc__shader-with-default-precision.frag.html]
skip-if = (os == 'android' || os == 'linux' || (os == 'win' && os_version == '5.1'))
[generated/test_2_conformance__glsl__misc__shader-with-default-precision.vert.html]
skip-if = (os == 'android' || os == 'linux' || (os == 'win' && os_version == '5.1'))
-[generated/test_2_conformance__glsl__misc__shader-with-define-line-continuation.frag.html]
-skip-if = (os == 'android' || os == 'linux' || (os == 'win' && os_version == '5.1'))
[generated/test_2_conformance__glsl__misc__shader-with-dfdx-no-ext.frag.html]
skip-if = (os == 'android' || os == 'linux' || (os == 'win' && os_version == '5.1'))
[generated/test_2_conformance__glsl__misc__shader-with-dfdx.frag.html]
skip-if = (os == 'android' || os == 'linux' || (os == 'win' && os_version == '5.1'))
[generated/test_2_conformance__glsl__misc__shader-with-do-loop.html]
skip-if = (os == 'android' || os == 'linux' || (os == 'win' && os_version == '5.1'))
[generated/test_2_conformance__glsl__misc__shader-with-error-directive.html]
skip-if = (os == 'android' || os == 'linux' || (os == 'win' && os_version == '5.1'))