Merge m-i to m-c, a=merge
authorPhil Ringnalda <philringnalda@gmail.com>
Sun, 15 Jan 2017 12:34:02 -0800
changeset 461121 8eaf154b385bbe0ff06155294ccf7962aa2d3324
parent 461102 829f16159b89b921eb81e0f26954ef54ae55034b (current diff)
parent 461120 14f88bc4d6b3058c063baa77c6eb71509aa5ed23 (diff)
child 461122 f11411002faaf9634f74ff34dd4faf3027e3a142
child 461123 c6644968b2cb633ef6c6db506d657175c5b2a4cc
child 461124 7e7520070a8645de7fa91f225d5c6df94fd7735a
child 461125 dae2d6d1bfc4be6089098e0379751680ec65373b
child 461132 519e11cf44c437ecdd84975d9db069a97e0f6253
child 461160 574fba81d8e397b45f2fe29d5690e8e00734a6d9
child 461179 c713e39b5b0b66a75cb31c897b07dd5c6d57c44c
child 461188 de75fdf93ed874519b62376d4190d7e5482aa43a
child 461193 03b49233ff735109784270ae1fc0363a907a6888
child 461194 1a1ac87cc8d3a817be574af76de31421d16677e5
child 461195 3d1b178d42e1e084b0fa522ed90a44affe70bb8d
child 461196 7d21d967253c853a34cbcf5155398a7ba2c99993
child 461206 bdc1b167149afe05638002452e2d41f71657fedd
child 461208 b9e20859ff415a618edb8fcbae0827dab71ffa52
child 461220 5a60ec847e15a0258d3eedaf772bb680d88accc0
child 461225 806466d93a3e222bc92aa5ec5ec498655874aac4
child 461227 b267434c6a58d88f859d3ea9c54b2145d83ac29b
child 461229 783db564596d6445a94c1f61ae20e6f7ab8f0ee7
child 461232 f89c3cb86cd1bb385d1da8173c6a696262d7ee94
child 461234 4ff6bb04a14e8a8037413d0fcbecebfd2e4a12ee
child 461243 93f598d86fdf0fb1ef3b44aea267e17f05e7701a
child 461245 7485643366c69d198389134ee68a1c98a4b9baca
child 461247 eddebed3dfbe890ad15fefd002acbe31c6c54607
child 461267 0d3a99e7a1b11ce5c4d458fdd07304b22a5df01a
child 461270 cafb0ca9c609314d33c6571ce9d618286a09fa61
child 461280 84cdd312bfc01b9ef3e24c7ae43df17b6bf03907
child 461293 515a3fe23ea9b469fc466ac8164ffb72acfee9c1
child 461294 a40864ac6c965199add7878f8ba8d54d3d65d650
child 461299 8bf9fa9f398067081df6c39bbc139dd024182ffe
child 461306 a4d8dbf4e91e3d3d32c3fe5b2670440d4e13a028
child 461310 6a9196279c95fb9840a876982fa550f3315d72c0
child 461312 33f20b5dbbf9c1c1aa94baf435ceb83e5cf638b7
child 461320 4fcda72d1a3b20c231410d2edf7e5cc040cffeb4
child 461321 6ab6370a0cd601c71da992210d26b04ca7534996
child 461322 f4b44cc4e145b29461c48bcff69c63eda68ed6b1
child 461323 d83789dc28ac5b31614790f0d08c9e76a7928196
child 461348 988be014af9909b67446eab81a427f2304183b1b
child 461351 315bb2a665acd3747192b58054a8ab5568ed1b56
child 461355 0ece1f2bb36b5eabe9213c6ecd1a0c9e8fae79ee
child 461363 75a039db121f8c8778805cfdc4e9fb6621fdec75
child 461395 2abfb5bee286e1a0941355a28ea25d4bda1cd6f8
child 461396 cbcead8dc7c10b39f3168e313f4d7ad08347cc77
child 462270 c2102643842e5ed4d3c40d86393e60eeea232be9
child 462306 d64d9b123b4ea01373027c43df718a722fbd8d95
child 462308 bee568b58027e7fa3d9f34ec34a0db8dc9d79c62
child 462344 9a4928756ceb9c47b64753963c50f091263f88d3
child 462349 4d4a93d6e8a0d4ff8470a9dfb33e9546620f92c3
child 462355 13d3d08df8442322a83c0cc757888e50f4cdd6df
child 462373 f822e155f19eb6efda7de105398fbd552f1b647c
child 462378 118f1688e24e013758d1264b7df065c258ecb3a0
child 462385 309f0614929ac451940252b04ddfab99e8c69e2f
child 462387 cee3069b85a93af41f13d46d500135ff6212c69b
child 462406 da629ba4464534a89718db1cd5b9705261ae4a4d
child 462413 674d00a40d4a5394e07e4e4afd814df8b8de93b5
child 462424 ab2a685b6f3b1bb6aad653e1df21fac4f55a028c
child 462477 e91710aae7ff9e023cc71fa094005ce6db4a6d90
child 462508 ee981d483c597f5f2e0dd00eab302c3573009288
child 462510 775354d05b434acc89e36a6f1c84b2fc053ef527
child 462614 adacec2bb56ca70fea20c6a37f1e8ccae6216e11
child 462882 454d70b97d662cb1482562a0677f67426ee7c8ea
child 462979 e4c69f0b5f9785b94b3df49916689eddc7994b2a
child 463081 5e60055e38761085ca61d6abcee181169640894d
child 463083 077166dd442d451666a0446ff54c0018f13adb18
child 463084 0b954d265215467248443cac17a2b7a4b9b0ee78
child 463096 2ee0d669a14cdf502ad72ff16316ce71499963dc
child 463213 dbb144b94cd29f41eaa3787d5d8d243652967500
child 463263 ea87812aa02d19530bf3b01ee8a991ebfd7966eb
child 463434 a9f12cf8e3b22582bc8052253624f5b922fb606f
child 463436 d2ed3fc13b8fb7ffd81c942db9bb9969bab82bfc
child 463439 6c2ac04e4971640efcb5de51d059b2e6e23b347c
child 463502 2f702d788049920b649ca6a862f1126be1db6a3a
child 463685 fbeaa16a8122d31b2948a92a104561664041f265
child 464297 100c34ac81052ad03e9ea0bb68c66df175202280
child 464775 a0308376056d0966d1bf960138d6d5a6bb545d88
child 464776 caad65748d646e44d65760e7b943bc77fcbb6c0c
child 464778 4f9005f298e1ca9f59eece3c50999ffdbff9821e
push id41564
push usergsquelart@mozilla.com
push dateSun, 15 Jan 2017 22:05:01 +0000
reviewersmerge
milestone53.0a1
Merge m-i to m-c, a=merge
--- a/dom/canvas/test/webgl-conf/checkout/00_test_list.txt
+++ b/dom/canvas/test/webgl-conf/checkout/00_test_list.txt
@@ -1,8 +1,8 @@
 // files that end in .txt list other tests
 // other lines are assumed to be .html files
 
 conformance/00_test_list.txt
 conformance/more/00_test_list.txt
 // Disable deqp tests temporarily
-//deqp/00_test_list.txt
+// deqp/00_test_list.txt
 --min-version 2.0.0 conformance2/00_test_list.txt
--- a/dom/canvas/test/webgl-conf/checkout/conformance/attribs/gl-bindAttribLocation-aliasing.html
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/attribs/gl-bindAttribLocation-aliasing.html
@@ -65,17 +65,17 @@ typeInfo.forEach(function(typeInfo1) {
             type_1: typeInfo1.type,
             type_2: typeInfo2.type,
             gl_Position_1: wtu.replaceParams(typeInfo1.asVec4, {var: 'a_1'}),
             gl_Position_2: wtu.replaceParams(typeInfo2.asVec4, {var: 'a_2'})
         };
         var strVertexShader = wtu.replaceParams(wtu.getScript('vertexShader'), replaceParams);
         var glVertexShader = wtu.loadShader(gl, strVertexShader, gl.VERTEX_SHADER);
         assertMsg(glVertexShader != null, "Vertex shader compiled successfully.");
-        // Bind both a_1 and a_2 to the same position and verify the link fails.  
+        // Bind both a_1 and a_2 to the same position and verify the link fails.
         // Do so for all valid positions available.
         for (var l = 0; l < maxAttributes; l++) {
             var glProgram = gl.createProgram();
             gl.bindAttribLocation(glProgram, l, 'a_1');
             gl.bindAttribLocation(glProgram, l, 'a_2');
             gl.attachShader(glProgram, glVertexShader);
             gl.attachShader(glProgram, glFragmentShader);
             gl.linkProgram(glProgram);
--- a/dom/canvas/test/webgl-conf/checkout/conformance/attribs/gl-vertexattribpointer.html
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/attribs/gl-vertexattribpointer.html
@@ -61,44 +61,47 @@ if (!gl) {
 
   gl.vertexAttribPointer(0, 3, gl.FLOAT, 0, 0, 12);
   wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION,
       "vertexAttribPointer should fail if no buffer is bound");
 
   var vertexObject = gl.createBuffer();
   gl.bindBuffer(gl.ARRAY_BUFFER, vertexObject);
   gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(0), gl.STATIC_DRAW);
-  
+
   if (wtu.getDefault3DContextVersion() < 2) {
     gl.vertexAttribPointer(0, 1, gl.INT, 0, 0, 0);
     wtu.glErrorShouldBe(gl, gl.INVALID_ENUM,
-	    "vertexAttribPointer should not support INT");
+            "vertexAttribPointer should not support INT");
     gl.vertexAttribPointer(0, 1, gl.UNSIGNED_INT, 0, 0, 0);
     wtu.glErrorShouldBe(gl, gl.INVALID_ENUM,
-	    "vertexAttribPointer should not support UNSIGNED_INT");
+            "vertexAttribPointer should not support UNSIGNED_INT");
     gl.vertexAttribPointer(0, 1, gl.FIXED, 0, 0, 0);
     wtu.glErrorShouldBe(gl, gl.INVALID_ENUM,
-	    "vertexAttribPointer should not support FIXED");
+            "vertexAttribPointer should not support FIXED");
   }
 
   var checkVertexAttribPointer = function(
       gl, err, reason, size, type, normalize, stride, offset) {
     gl.vertexAttribPointer(0, size, type, normalize, stride, offset);
+    var succeeded = (err == gl.NO_ERROR);
     wtu.glErrorShouldBe(gl, err,
         "gl.vertexAttribPointer(0, " + size +
         ", gl." + wtu.glEnumToString(gl, type) +
         ", " + normalize +
         ", " + stride +
         ", " + offset +
-        ") should " + (err == gl.NO_ERROR ? "succeed " : "fail ") + reason);
-    shouldBe('gl.getVertexAttrib(0, gl.VERTEX_ATTRIB_ARRAY_SIZE)', size.toString());
-    shouldBe('gl.getVertexAttrib(0, gl.VERTEX_ATTRIB_ARRAY_TYPE)', 'gl.' + wtu.glEnumToString(gl, type));
-    shouldBe('gl.getVertexAttrib(0, gl.VERTEX_ATTRIB_ARRAY_NORMALIZED)', normalize.toString());
-    shouldBe('gl.getVertexAttrib(0, gl.VERTEX_ATTRIB_ARRAY_STRIDE)', stride.toString());
-    shouldBe('gl.getVertexAttribOffset(0, gl.VERTEX_ATTRIB_ARRAY_POINTER)', offset.toString());
+        ") should " + (succeeded ? "succeed " : "fail ") + reason);
+    if (succeeded) {
+      shouldBe('gl.getVertexAttrib(0, gl.VERTEX_ATTRIB_ARRAY_SIZE)', size.toString());
+      shouldBe('gl.getVertexAttrib(0, gl.VERTEX_ATTRIB_ARRAY_TYPE)', 'gl.' + wtu.glEnumToString(gl, type));
+      shouldBe('gl.getVertexAttrib(0, gl.VERTEX_ATTRIB_ARRAY_NORMALIZED)', normalize.toString());
+      shouldBe('gl.getVertexAttrib(0, gl.VERTEX_ATTRIB_ARRAY_STRIDE)', stride.toString());
+      shouldBe('gl.getVertexAttribOffset(0, gl.VERTEX_ATTRIB_ARRAY_POINTER)', offset.toString());
+    }
   }
 
   var types = [
     { type:gl.BYTE,           bytesPerComponent: 1 },
     { type:gl.UNSIGNED_BYTE,  bytesPerComponent: 1 },
     { type:gl.SHORT,          bytesPerComponent: 2 },
     { type:gl.UNSIGNED_SHORT, bytesPerComponent: 2 },
     { type:gl.FLOAT,          bytesPerComponent: 4 },
--- a/dom/canvas/test/webgl-conf/checkout/conformance/buffers/00_test_list.txt
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/buffers/00_test_list.txt
@@ -1,11 +1,12 @@
 buffer-bind-test.html
 buffer-data-and-buffer-sub-data.html
 --min-version 1.0.3 buffer-data-array-buffer-delete.html
+--min-version 1.0.4 buffer-uninitialized.html
 --min-version 1.0.2 element-array-buffer-delete-recreate.html
 index-validation-copies-indices.html
 index-validation-crash-with-buffer-sub-data.html
 --min-version 1.0.2 index-validation-large-buffer.html
 index-validation-verifies-too-many-indices.html
 index-validation-with-resized-buffer.html
 index-validation.html
 
new file mode 100644
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/buffers/buffer-uninitialized.html
@@ -0,0 +1,123 @@
+<!--
+/*
+** Copyright (c) 2016 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+-->
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src="../../js/js-test-pre.js"></script>
+<script src="../../js/webgl-test-utils.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+
+<canvas id="canvas" width="1" height="1"></canvas>
+
+<script id="vshader" type="x-shader/x-vertex">
+attribute float a_vertex;
+void main()
+{
+    gl_Position = a_vertex == 0.0 ? vec4(9, 9, 9, 1) : vec4(0.5, 0.5, 0.5, 1);
+}
+</script>
+
+<script id="fshader" type="x-shader/x-fragment">
+void main()
+{
+    gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);
+}
+</script>
+
+<script>
+"use strict";
+description("Tests that uninitialized WebGLBuffers are zeroed out");
+
+var wtu = WebGLTestUtils;
+var gl = wtu.create3DContext(document.getElementById("canvas"));
+var program = wtu.setupProgram(gl, ["vshader", "fshader"], ["a_vertex"]);
+shouldBeTrue("program != null");
+
+var TEST_LENGTH = 1024;
+var TEST_BUFSIZE = TEST_LENGTH * 4;
+var data = new Float32Array(TEST_LENGTH / 4); // this array is zeroed
+
+var indices = new Uint16Array(TEST_LENGTH);
+for (var i = 0; i < TEST_LENGTH; i++) {
+  indices[i] = i;
+}
+
+gl.clearColor(0, 1, 0, 1);
+
+function test(initFunction) {
+  var uninitializedBuffer = gl.createBuffer();
+  gl.bindBuffer(gl.ARRAY_BUFFER, uninitializedBuffer);
+  initFunction();
+
+  var elements = gl.createBuffer();
+  gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, elements);
+  gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, indices, gl.STATIC_DRAW);
+
+  gl.useProgram(program);
+  var vertexLoc = gl.getAttribLocation(program, "a_vertex");
+  gl.vertexAttribPointer(vertexLoc, 1, gl.FLOAT, gl.FALSE, 0, 0);
+  gl.enableVertexAttribArray(vertexLoc);
+
+  wtu.glErrorShouldBe(gl, gl.NO_ERROR, "no error should result from setup");
+
+  gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+  gl.drawElements(gl.POINTS, TEST_LENGTH, gl.UNSIGNED_SHORT, 0);
+  wtu.checkCanvasRect(gl, 0, 0, 1, 1, [0, 255, 0, 255], "buffer should be initialized to zero");
+
+  gl.deleteBuffer(uninitializedBuffer);
+}
+
+var REPETITIONS = 50;
+
+var j;
+debug("");
+debug("testing bufferData(..., size, ...)");
+for (j = 0; j < REPETITIONS; j++) {
+  test(function() {
+    gl.bufferData(gl.ARRAY_BUFFER, TEST_BUFSIZE, gl.STATIC_DRAW);
+  });
+}
+
+debug("");
+debug("testing bufferSubData(..., offset, data) of uninitialized buffer");
+for (j = 0; j < REPETITIONS; j++) {
+  test(function() {
+    gl.bufferData(gl.ARRAY_BUFFER, TEST_BUFSIZE, gl.STATIC_DRAW);
+    // bufferSubData the second quarter of the buffer
+    gl.bufferSubData(gl.ARRAY_BUFFER, TEST_BUFSIZE / 4, data);
+  });
+}
+
+var successfullyParsed = true;
+</script>
+
+<script src="../../js/js-test-post.js"></script>
+</body>
+</html>
--- a/dom/canvas/test/webgl-conf/checkout/conformance/context/00_test_list.txt
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/context/00_test_list.txt
@@ -1,12 +1,13 @@
 --max-version 1.9.9 constants-and-properties.html
 --min-version 1.0.2 context-attribute-preserve-drawing-buffer.html
 context-attributes-alpha-depth-stencil-antialias.html
 --min-version 1.0.4 context-size-change.html
+--min-version 1.0.4 context-no-alpha-fbo-with-alpha.html
 --min-version 1.0.2 --slow context-creation-and-destruction.html
 --min-version 1.0.3 --slow context-creation.html
 --min-version 1.0.3 --slow context-eviction-with-garbage-collection.html
 --min-version 1.0.3 context-hidden-alpha.html
 --min-version 1.0.2 context-release-upon-reload.html
 --min-version 1.0.2 context-release-with-workers.html
 context-lost-restored.html
 context-lost.html
--- a/dom/canvas/test/webgl-conf/checkout/conformance/context/constants-and-properties.html
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/context/constants-and-properties.html
@@ -41,131 +41,131 @@
 "use strict";
 description("This test ensures that the WebGL context has all the constants and (non-function) properties in the specification.");
 
 var constants = {
     /* ClearBufferMask */
 DEPTH_BUFFER_BIT               : 0x00000100,
 STENCIL_BUFFER_BIT             : 0x00000400,
 COLOR_BUFFER_BIT               : 0x00004000,
-    
+
     /* BeginMode */
 POINTS                         : 0x0000,
 LINES                          : 0x0001,
 LINE_LOOP                      : 0x0002,
 LINE_STRIP                     : 0x0003,
 TRIANGLES                      : 0x0004,
 TRIANGLE_STRIP                 : 0x0005,
 TRIANGLE_FAN                   : 0x0006,
-    
+
     /* AlphaFunction (not supported in ES20) */
     /*      NEVER */
     /*      LESS */
     /*      EQUAL */
     /*      LEQUAL */
     /*      GREATER */
     /*      NOTEQUAL */
     /*      GEQUAL */
     /*      ALWAYS */
-    
+
     /* BlendingFactorDest */
 ZERO                           : 0,
 ONE                            : 1,
 SRC_COLOR                      : 0x0300,
 ONE_MINUS_SRC_COLOR            : 0x0301,
 SRC_ALPHA                      : 0x0302,
 ONE_MINUS_SRC_ALPHA            : 0x0303,
 DST_ALPHA                      : 0x0304,
 ONE_MINUS_DST_ALPHA            : 0x0305,
-    
+
     /* BlendingFactorSrc */
     /*      ZERO */
     /*      ONE */
 DST_COLOR                      : 0x0306,
 ONE_MINUS_DST_COLOR            : 0x0307,
 SRC_ALPHA_SATURATE             : 0x0308,
     /*      SRC_ALPHA */
     /*      ONE_MINUS_SRC_ALPHA */
     /*      DST_ALPHA */
     /*      ONE_MINUS_DST_ALPHA */
-    
+
     /* BlendEquationSeparate */
 FUNC_ADD                       : 0x8006,
 BLEND_EQUATION                 : 0x8009,
 BLEND_EQUATION_RGB             : 0x8009,   /* same as BLEND_EQUATION */
 BLEND_EQUATION_ALPHA           : 0x883D,
-    
+
     /* BlendSubtract */
 FUNC_SUBTRACT                  : 0x800A,
 FUNC_REVERSE_SUBTRACT          : 0x800B,
-    
+
     /* Separate Blend Functions */
 BLEND_DST_RGB                  : 0x80C8,
 BLEND_SRC_RGB                  : 0x80C9,
 BLEND_DST_ALPHA                : 0x80CA,
 BLEND_SRC_ALPHA                : 0x80CB,
 CONSTANT_COLOR                 : 0x8001,
 ONE_MINUS_CONSTANT_COLOR       : 0x8002,
 CONSTANT_ALPHA                 : 0x8003,
 ONE_MINUS_CONSTANT_ALPHA       : 0x8004,
 BLEND_COLOR                    : 0x8005,
-    
+
     /* Buffer Objects */
 ARRAY_BUFFER                   : 0x8892,
 ELEMENT_ARRAY_BUFFER           : 0x8893,
 ARRAY_BUFFER_BINDING           : 0x8894,
 ELEMENT_ARRAY_BUFFER_BINDING   : 0x8895,
-    
+
 STREAM_DRAW                    : 0x88E0,
 STATIC_DRAW                    : 0x88E4,
 DYNAMIC_DRAW                   : 0x88E8,
-    
+
 BUFFER_SIZE                    : 0x8764,
 BUFFER_USAGE                   : 0x8765,
-    
+
 CURRENT_VERTEX_ATTRIB          : 0x8626,
-    
+
     /* CullFaceMode */
 FRONT                          : 0x0404,
 BACK                           : 0x0405,
 FRONT_AND_BACK                 : 0x0408,
-    
+
     /* DepthFunction */
     /*      NEVER */
     /*      LESS */
     /*      EQUAL */
     /*      LEQUAL */
     /*      GREATER */
     /*      NOTEQUAL */
     /*      GEQUAL */
     /*      ALWAYS */
-    
+
     /* EnableCap */
     /* TEXTURE_2D */
 CULL_FACE                      : 0x0B44,
 BLEND                          : 0x0BE2,
 DITHER                         : 0x0BD0,
 STENCIL_TEST                   : 0x0B90,
 DEPTH_TEST                     : 0x0B71,
 SCISSOR_TEST                   : 0x0C11,
 POLYGON_OFFSET_FILL            : 0x8037,
 SAMPLE_ALPHA_TO_COVERAGE       : 0x809E,
 SAMPLE_COVERAGE                : 0x80A0,
-    
+
     /* ErrorCode */
 NO_ERROR                       : 0,
 INVALID_ENUM                   : 0x0500,
 INVALID_VALUE                  : 0x0501,
 INVALID_OPERATION              : 0x0502,
 OUT_OF_MEMORY                  : 0x0505,
-    
+
     /* FrontFaceDirection */
 CW                             : 0x0900,
 CCW                            : 0x0901,
-    
+
     /* GetPName */
 LINE_WIDTH                     : 0x0B21,
 ALIASED_POINT_SIZE_RANGE       : 0x846D,
 ALIASED_LINE_WIDTH_RANGE       : 0x846E,
 CULL_FACE_MODE                 : 0x0B45,
 FRONT_FACE                     : 0x0B46,
 DEPTH_RANGE                    : 0x0B70,
 DEPTH_WRITEMASK                : 0x0B72,
@@ -205,56 +205,56 @@ STENCIL_BITS                   : 0x0D57,
 POLYGON_OFFSET_UNITS           : 0x2A00,
     /*      POLYGON_OFFSET_FILL */
 POLYGON_OFFSET_FACTOR          : 0x8038,
 TEXTURE_BINDING_2D             : 0x8069,
 SAMPLE_BUFFERS                 : 0x80A8,
 SAMPLES                        : 0x80A9,
 SAMPLE_COVERAGE_VALUE          : 0x80AA,
 SAMPLE_COVERAGE_INVERT         : 0x80AB,
-    
+
     /* GetTextureParameter */
     /*      TEXTURE_MAG_FILTER */
     /*      TEXTURE_MIN_FILTER */
     /*      TEXTURE_WRAP_S */
     /*      TEXTURE_WRAP_T */
-    
+
 COMPRESSED_TEXTURE_FORMATS     : 0x86A3,
-    
+
     /* HintMode */
 DONT_CARE                      : 0x1100,
 FASTEST                        : 0x1101,
 NICEST                         : 0x1102,
-    
+
     /* HintTarget */
 GENERATE_MIPMAP_HINT            : 0x8192,
-    
+
     /* DataType */
 BYTE                           : 0x1400,
 UNSIGNED_BYTE                  : 0x1401,
 SHORT                          : 0x1402,
 UNSIGNED_SHORT                 : 0x1403,
 INT                            : 0x1404,
 UNSIGNED_INT                   : 0x1405,
 FLOAT                          : 0x1406,
-    
+
     /* PixelFormat */
 DEPTH_COMPONENT                : 0x1902,
 ALPHA                          : 0x1906,
 RGB                            : 0x1907,
 RGBA                           : 0x1908,
 LUMINANCE                      : 0x1909,
 LUMINANCE_ALPHA                : 0x190A,
-    
+
     /* PixelType */
     /*      UNSIGNED_BYTE */
 UNSIGNED_SHORT_4_4_4_4         : 0x8033,
 UNSIGNED_SHORT_5_5_5_1         : 0x8034,
 UNSIGNED_SHORT_5_6_5           : 0x8363,
-    
+
     /* Shaders */
 FRAGMENT_SHADER                  : 0x8B30,
 VERTEX_SHADER                    : 0x8B31,
 MAX_VERTEX_ATTRIBS               : 0x8869,
 MAX_VERTEX_UNIFORM_VECTORS       : 0x8DFB,
 MAX_VARYING_VECTORS              : 0x8DFC,
 MAX_COMBINED_TEXTURE_IMAGE_UNITS : 0x8B4D,
 MAX_VERTEX_TEXTURE_IMAGE_UNITS   : 0x8B4C,
@@ -264,74 +264,74 @@ SHADER_TYPE                      : 0x8B4
 DELETE_STATUS                    : 0x8B80,
 LINK_STATUS                      : 0x8B82,
 VALIDATE_STATUS                  : 0x8B83,
 ATTACHED_SHADERS                 : 0x8B85,
 ACTIVE_UNIFORMS                  : 0x8B86,
 ACTIVE_ATTRIBUTES                : 0x8B89,
 SHADING_LANGUAGE_VERSION         : 0x8B8C,
 CURRENT_PROGRAM                  : 0x8B8D,
-    
+
     /* StencilFunction */
 NEVER                          : 0x0200,
 LESS                           : 0x0201,
 EQUAL                          : 0x0202,
 LEQUAL                         : 0x0203,
 GREATER                        : 0x0204,
 NOTEQUAL                       : 0x0205,
 GEQUAL                         : 0x0206,
 ALWAYS                         : 0x0207,
-    
+
     /* StencilOp */
     /*      ZERO */
 KEEP                           : 0x1E00,
 REPLACE                        : 0x1E01,
 INCR                           : 0x1E02,
 DECR                           : 0x1E03,
 INVERT                         : 0x150A,
 INCR_WRAP                      : 0x8507,
 DECR_WRAP                      : 0x8508,
-    
+
     /* StringName */
 VENDOR                         : 0x1F00,
 RENDERER                       : 0x1F01,
 VERSION                        : 0x1F02,
-    
+
     /* TextureMagFilter */
 NEAREST                        : 0x2600,
 LINEAR                         : 0x2601,
-    
+
     /* TextureMinFilter */
     /*      NEAREST */
     /*      LINEAR */
 NEAREST_MIPMAP_NEAREST         : 0x2700,
 LINEAR_MIPMAP_NEAREST          : 0x2701,
 NEAREST_MIPMAP_LINEAR          : 0x2702,
 LINEAR_MIPMAP_LINEAR           : 0x2703,
-    
+
     /* TextureParameterName */
 TEXTURE_MAG_FILTER             : 0x2800,
 TEXTURE_MIN_FILTER             : 0x2801,
 TEXTURE_WRAP_S                 : 0x2802,
 TEXTURE_WRAP_T                 : 0x2803,
-    
+
     /* TextureTarget */
 TEXTURE_2D                     : 0x0DE1,
 TEXTURE                        : 0x1702,
-    
+
 TEXTURE_CUBE_MAP               : 0x8513,
 TEXTURE_BINDING_CUBE_MAP       : 0x8514,
 TEXTURE_CUBE_MAP_POSITIVE_X    : 0x8515,
 TEXTURE_CUBE_MAP_NEGATIVE_X    : 0x8516,
 TEXTURE_CUBE_MAP_POSITIVE_Y    : 0x8517,
 TEXTURE_CUBE_MAP_NEGATIVE_Y    : 0x8518,
 TEXTURE_CUBE_MAP_POSITIVE_Z    : 0x8519,
 TEXTURE_CUBE_MAP_NEGATIVE_Z    : 0x851A,
 MAX_CUBE_MAP_TEXTURE_SIZE      : 0x851C,
-    
+
     /* TextureUnit */
 TEXTURE0                       : 0x84C0,
 TEXTURE1                       : 0x84C1,
 TEXTURE2                       : 0x84C2,
 TEXTURE3                       : 0x84C3,
 TEXTURE4                       : 0x84C4,
 TEXTURE5                       : 0x84C5,
 TEXTURE6                       : 0x84C6,
@@ -356,107 +356,107 @@ TEXTURE24                      : 0x84D8,
 TEXTURE25                      : 0x84D9,
 TEXTURE26                      : 0x84DA,
 TEXTURE27                      : 0x84DB,
 TEXTURE28                      : 0x84DC,
 TEXTURE29                      : 0x84DD,
 TEXTURE30                      : 0x84DE,
 TEXTURE31                      : 0x84DF,
 ACTIVE_TEXTURE                 : 0x84E0,
-    
+
     /* TextureWrapMode */
 REPEAT                         : 0x2901,
 CLAMP_TO_EDGE                  : 0x812F,
 MIRRORED_REPEAT                : 0x8370,
-    
+
     /* Uniform Types */
 FLOAT_VEC2                     : 0x8B50,
 FLOAT_VEC3                     : 0x8B51,
 FLOAT_VEC4                     : 0x8B52,
 INT_VEC2                       : 0x8B53,
 INT_VEC3                       : 0x8B54,
 INT_VEC4                       : 0x8B55,
 BOOL                           : 0x8B56,
 BOOL_VEC2                      : 0x8B57,
 BOOL_VEC3                      : 0x8B58,
 BOOL_VEC4                      : 0x8B59,
 FLOAT_MAT2                     : 0x8B5A,
 FLOAT_MAT3                     : 0x8B5B,
 FLOAT_MAT4                     : 0x8B5C,
 SAMPLER_2D                     : 0x8B5E,
 SAMPLER_CUBE                   : 0x8B60,
-    
+
     /* Vertex Arrays */
 VERTEX_ATTRIB_ARRAY_ENABLED        : 0x8622,
 VERTEX_ATTRIB_ARRAY_SIZE           : 0x8623,
 VERTEX_ATTRIB_ARRAY_STRIDE         : 0x8624,
 VERTEX_ATTRIB_ARRAY_TYPE           : 0x8625,
 VERTEX_ATTRIB_ARRAY_NORMALIZED     : 0x886A,
 VERTEX_ATTRIB_ARRAY_POINTER        : 0x8645,
 VERTEX_ATTRIB_ARRAY_BUFFER_BINDING : 0x889F,
-    
+
     /* Read Format */
 IMPLEMENTATION_COLOR_READ_TYPE   : 0x8B9A,
 IMPLEMENTATION_COLOR_READ_FORMAT : 0x8B9B,
 
     /* Shader Source */
 COMPILE_STATUS                 : 0x8B81,
-    
+
     /* Shader Precision-Specified Types */
 LOW_FLOAT                      : 0x8DF0,
 MEDIUM_FLOAT                   : 0x8DF1,
 HIGH_FLOAT                     : 0x8DF2,
 LOW_INT                        : 0x8DF3,
 MEDIUM_INT                     : 0x8DF4,
 HIGH_INT                       : 0x8DF5,
-    
+
     /* Framebuffer Object. */
 FRAMEBUFFER                    : 0x8D40,
 RENDERBUFFER                   : 0x8D41,
-    
+
 RGBA4                          : 0x8056,
 RGB5_A1                        : 0x8057,
 RGB565                         : 0x8D62,
 DEPTH_COMPONENT16              : 0x81A5,
 STENCIL_INDEX                  : 0x1901,
 STENCIL_INDEX8                 : 0x8D48,
 DEPTH_STENCIL                  : 0x84F9,
-    
+
 RENDERBUFFER_WIDTH             : 0x8D42,
 RENDERBUFFER_HEIGHT            : 0x8D43,
 RENDERBUFFER_INTERNAL_FORMAT   : 0x8D44,
 RENDERBUFFER_RED_SIZE          : 0x8D50,
 RENDERBUFFER_GREEN_SIZE        : 0x8D51,
 RENDERBUFFER_BLUE_SIZE         : 0x8D52,
 RENDERBUFFER_ALPHA_SIZE        : 0x8D53,
 RENDERBUFFER_DEPTH_SIZE        : 0x8D54,
 RENDERBUFFER_STENCIL_SIZE      : 0x8D55,
-    
+
 FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE           : 0x8CD0,
 FRAMEBUFFER_ATTACHMENT_OBJECT_NAME           : 0x8CD1,
 FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL         : 0x8CD2,
 FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE : 0x8CD3,
-    
+
 COLOR_ATTACHMENT0              : 0x8CE0,
 DEPTH_ATTACHMENT               : 0x8D00,
 STENCIL_ATTACHMENT             : 0x8D20,
 DEPTH_STENCIL_ATTACHMENT       : 0x821A,
-    
+
 NONE                           : 0,
-    
+
 FRAMEBUFFER_COMPLETE                      : 0x8CD5,
 FRAMEBUFFER_INCOMPLETE_ATTACHMENT         : 0x8CD6,
 FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT : 0x8CD7,
 FRAMEBUFFER_INCOMPLETE_DIMENSIONS         : 0x8CD9,
 FRAMEBUFFER_UNSUPPORTED                   : 0x8CDD,
-  
+
 FRAMEBUFFER_BINDING            : 0x8CA6,
 RENDERBUFFER_BINDING           : 0x8CA7,
 MAX_RENDERBUFFER_SIZE          : 0x84E8,
-    
+
 INVALID_FRAMEBUFFER_OPERATION  : 0x0506,
 
 /* WebGL-specific enums */
 UNPACK_FLIP_Y_WEBGL                : 0x9240,
 UNPACK_PREMULTIPLY_ALPHA_WEBGL     : 0x9241,
 CONTEXT_LOST_WEBGL                 : 0x9242,
 UNPACK_COLORSPACE_CONVERSION_WEBGL : 0x9243,
 BROWSER_DEFAULT_WEBGL              : 0x9244
--- a/dom/canvas/test/webgl-conf/checkout/conformance/context/context-attributes-alpha-depth-stencil-antialias.html
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/context/context-attributes-alpha-depth-stencil-antialias.html
@@ -57,18 +57,17 @@ void main()
 
 <script>
 "use strict";
 
 // These four declarations need to be global for "shouldBe" to see them
 var wtu = WebGLTestUtils;
 var gl;
 var contextAttribs = null;
-var pixel_1 = [0, 0, 0, 1];
-var pixel_2 = [0, 0, 0, 1];
+var redChannels = [0, 0, 0];
 var correctColor = null;
 var framebuffer;
 var fbHasColor;
 var fbHasDepth;
 var fbHasStencil;
 
 function init()
 {
@@ -297,42 +296,41 @@ function testStencilAndDepth(stencil, de
       wtu.checkCanvasRect(gl, 0, 0, 1, 1, [0, 0, 0, 255]);
       gl.bindFramebuffer(gl.FRAMEBUFFER, null);
     }
 }
 
 function testAntialias(antialias)
 {
     debug("Testing antialias = " + antialias);
+    // Both the width and height of canvas are N.
+    // Note that "N = 2" doesn't work for some post processing AA per the discussion at https://github.com/KhronosGroup/WebGL/pull/1977.
+    var N = 3;
     if (antialias)
-        shouldBeNonNull("gl = getWebGL(2, 2, { depth: false, stencil: false, alpha: false, antialias: true }, [ 0, 0, 0, 1 ], 1, 0)");
+        shouldBeNonNull("gl = getWebGL(" + N + ", " + N + ", { depth: false, stencil: false, alpha: false, antialias: true }, [ 0, 0, 0, 1 ], 1, 0)");
     else
-        shouldBeNonNull("gl = getWebGL(2, 2, { depth: false, stencil: false, alpha: false, antialias: false }, [ 0, 0, 0, 1 ], 1, 0)");
+        shouldBeNonNull("gl = getWebGL(" + N + ", " + N + ", { depth: false, stencil: false, alpha: false, antialias: false }, [ 0, 0, 0, 1 ], 1, 0)");
     shouldBeNonNull("contextAttribs = gl.getContextAttributes()");
 
     var vertices = new Float32Array([
          1.0, 1.0, 0.0,
         -1.0, 1.0, 0.0,
         -1.0, -1.0, 0.0]);
     var colors = new Uint8Array([
         255, 0, 0, 255,
         255, 0, 0, 255,
         255, 0, 0, 255]);
     drawAndReadPixel(gl, vertices, colors, 0, 0);
-    var buf_1 = new Uint8Array(1 * 1 * 4);
-    var buf_2 = new Uint8Array(1 * 1 * 4);
-    gl.readPixels(0, 0, 1, 1, gl.RGBA, gl.UNSIGNED_BYTE, buf_1);
-    gl.readPixels(0, 1, 1, 1, gl.RGBA, gl.UNSIGNED_BYTE, buf_2);
-    pixel_1[0] = buf_1[0];
-    pixel_2[0] = buf_2[0];
-    // For some anti-alias algorithms, effects may be not on diagonal line pixels, so that either:
-    //    - The red channel of the pixel at (0, 0) is not 0 and not 255, or,
-    //    - If it is 0, expect that the red channel of the pixel at (0, 1) is not 0 and not 255.
-    shouldBe("pixel_1[0] != 255 && pixel_1[0] != 0 || pixel_1[0] == 0 && pixel_2[0] != 255 && pixel_2[0] != 0",
-        "contextAttribs.antialias");
+    var buf = new Uint8Array(N * N * 4);
+    gl.readPixels(0, 0, N, N, gl.RGBA, gl.UNSIGNED_BYTE, buf);
+    redChannels[0] = buf[4 * (N + 1)]; // (1, 1)
+    redChannels[1] = buf[4 * N * (N - 1)]; // left top
+    redChannels[2] = buf[4 * (N - 1)]; // right bottom
+    shouldBeTrue("redChannels[1] == 255 && redChannels[2] == 0");
+    shouldBe("redChannels[0] != 255 && redChannels[0] != 0", "contextAttribs.antialias");
 }
 
 function runTest()
 {
     testDefault();
     testAlpha(true);
     testAlpha(false);
     testDepth(true);
new file mode 100644
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/context/context-no-alpha-fbo-with-alpha.html
@@ -0,0 +1,98 @@
+<!--
+
+/*
+** Copyright (c) 2016 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src="../../js/js-test-pre.js"></script>
+<script src="../../js/webgl-test-utils.js"></script>
+
+<script>
+"use strict";
+
+var wtu = WebGLTestUtils;
+
+// This declaration needs to be global for "shouldBe" to see it
+var gl;
+
+function init()
+{
+    description('Verify that a WebGL context with alpha:false still works correctly after handling textures with an alpha channel.');
+
+    runTest();
+}
+
+function getWebGL(contextAttribs)
+{
+    return wtu.create3DContext("c", contextAttribs);
+}
+
+function runTest()
+{
+    var buf = new Uint8Array(1 * 1 * 4);
+    shouldBeNonNull("gl = getWebGL({ alpha: false, antialias: false })");
+
+    // Clear to black. Alpha channel of clearColor() is ignored.
+    gl.clearColor(0.0, 0.0, 0.0, 0.7);
+    gl.clear(gl.COLOR_BUFFER_BIT);
+    wtu.checkCanvasRect(gl, 0, 0, 1, 1, [0, 0, 0, 255],
+                        "Alpha channel of clearColor should be ignored");
+
+    wtu.waitForComposite(function() {
+        // Make a new framebuffer and attach a texture with an alpha channel.
+        var fbo = gl.createFramebuffer();
+        gl.bindFramebuffer(gl.FRAMEBUFFER, fbo);
+        var texture = gl.createTexture();
+        gl.bindTexture(gl.TEXTURE_2D, texture);
+        gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 1, 1, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
+        gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, texture, 0);
+
+        // Clear texture. Note that alpha channel is not 1.0.
+        gl.clearColor(1.0, 0.0, 0.0, 0.5);
+        gl.clear(gl.COLOR_BUFFER_BIT);
+        wtu.checkCanvasRect(gl, 0, 0, 1, 1, [255, 0, 0, 128],
+                            "Alpha channel of clearColor should be obeyed for FBO with alpha channel",
+                            1);
+
+        // Bind back buffer and check that its alpha channel is still 1.0.
+        gl.bindFramebuffer(gl.FRAMEBUFFER, null);
+        wtu.checkCanvasRect(gl, 0, 0, 1, 1, [0, 0, 0, 255],
+                            "Alpha channel of back buffer should still be 255");
+        finishTest();
+    });
+}
+
+</script>
+</head>
+<body onload="init()">
+<div id="description"></div>
+<div id="console"></div>
+<canvas width="20" height="20" style="border: 1px solid blue;" id="c"></canvas>
+</body>
+</html>
--- a/dom/canvas/test/webgl-conf/checkout/conformance/context/methods.html
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/context/methods.html
@@ -178,16 +178,19 @@ var methods = [
   "vertexAttrib4fv",
   "vertexAttribPointer",
   "viewport"
 ];
 
 // Properties to be ignored because they were added in versions of the
 // spec that are backward-compatible with this version
 var ignoredMethods = [
+  // There is no official spec for the commit API yet, the proposal link is:
+  // https://wiki.whatwg.org/wiki/OffscreenCanvas
+  "commit"
 ];
 
 function assertFunction(v, f) {
   try {
     if (typeof v[f] != "function") {
       testFailed("Property either does not exist or is not a function: " + f);
       return false;
     } else {
--- a/dom/canvas/test/webgl-conf/checkout/conformance/extensions/00_test_list.txt
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/extensions/00_test_list.txt
@@ -21,16 +21,19 @@
 --min-version 1.0.3 --max-version 1.9.9 oes-texture-half-float-with-canvas.html
 --min-version 1.0.3 --max-version 1.9.9 oes-texture-half-float-with-image-data.html
 --min-version 1.0.3 --max-version 1.9.9 oes-texture-half-float-with-image.html
 --min-version 1.0.3 --max-version 1.9.9 oes-texture-half-float-with-video.html
 --min-version 1.0.2 --max-version 1.9.9 oes-element-index-uint.html
 webgl-debug-renderer-info.html
 webgl-debug-shaders.html
 --min-version 1.0.3 webgl-compressed-texture-atc.html
+--min-version 1.0.4 webgl-compressed-texture-etc.html
 --min-version 1.0.3 webgl-compressed-texture-pvrtc.html
 --min-version 1.0.2 webgl-compressed-texture-s3tc.html
+--min-version 1.0.4 webgl-compressed-texture-s3tc-srgb.html
 --min-version 1.0.3 webgl-compressed-texture-size-limit.html
 --min-version 1.0.2 --max-version 1.9.9 webgl-depth-texture.html
 --min-version 1.0.3 --max-version 1.9.9 webgl-draw-buffers.html
+--min-version 1.0.4 --max-version 1.9.9 webgl-draw-buffers-framebuffer-unsupported.html
 --min-version 1.0.4 --max-version 1.9.9 webgl-draw-buffers-max-draw-buffers.html
 --min-version 1.0.3 webgl-shared-resources.html
 
--- a/dom/canvas/test/webgl-conf/checkout/conformance/extensions/angle-instanced-arrays.html
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/extensions/angle-instanced-arrays.html
@@ -136,17 +136,17 @@ function runSupportedTest(extensionEnabl
         } else {
             testPassed("ANGLE_instanced_arrays not listed as supported and getExtension failed -- this is legal");
         }
     }
 }
 
 function runDivisorTestDisabled() {
     debug("Testing VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE with extension disabled");
-    
+
     var VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE = 0x88FE;
 
     gl.getVertexAttrib(0, VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE);
     wtu.glErrorShouldBe(gl, gl.INVALID_ENUM, "VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE should not be queryable if extension is disabled");
 }
 
 function runDivisorTestEnabled() {
     debug("Testing VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE with extension enabled");
@@ -610,17 +610,17 @@ function runANGLECorruptionTest()
         gl.bufferSubData(gl.ARRAY_BUFFER, offsets.byteLength, nullData);
 
         nullData = new Float32Array(colors.length);
         gl.bindBuffer(gl.ARRAY_BUFFER, colorBuffer);
         gl.bufferSubData(gl.ARRAY_BUFFER, colors.byteLength, nullData);
 
         ext.drawArraysInstancedANGLE(gl.TRIANGLES, 0, 6, instanceCount);
 
-        // Make sure each color was drawn correctly 
+        // Make sure each color was drawn correctly
         var i;
         var passed = true;
         for (i = 0; i < instanceCount; ++i) {
             var w = canvas.width / instanceCount;
             var x = w * i;
             var color =  [colors[(i*4)] * 255, colors[(i*4)+1] * 255, colors[(i*4)+2] * 255, 255]
 
             wtu.checkCanvasRectColor(
--- a/dom/canvas/test/webgl-conf/checkout/conformance/extensions/ext-disjoint-timer-query.html
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/extensions/ext-disjoint-timer-query.html
@@ -46,17 +46,17 @@ var canvas = document.getElementById("ca
 var gl = wtu.create3DContext(canvas);
 var ext = null;
 var query = null;
 var query2 = null;
 var elapsed_query = null;
 var timestamp_query1 = null;
 var timestamp_query2 = null;
 var availability_retry = 500;
-var timestamp_counter_bits = 0; 
+var timestamp_counter_bits = 0;
 
 if (!gl) {
     testFailed("WebGL context does not exist");
     finishTest();
 } else {
     testPassed("WebGL context exists");
 
     // Query the extension and store globally so shouldBe can access it
@@ -90,42 +90,50 @@ function runSanityTests() {
     shouldBe("ext.QUERY_RESULT_EXT", "0x8866");
     shouldBe("ext.QUERY_RESULT_AVAILABLE_EXT", "0x8867");
     shouldBe("ext.TIME_ELAPSED_EXT", "0x88BF");
     shouldBe("ext.TIMESTAMP_EXT", "0x8E28");
     shouldBe("ext.GPU_DISJOINT_EXT", "0x8FBB");
 
     shouldBe("ext.isQueryEXT(null)", "false");
 
-    shouldBe("ext.getQueryEXT(ext.TIME_ELAPSED_EXT, ext.CURRENT_QUERY_EXT)", "null");
-    shouldBe("ext.getQueryEXT(ext.TIME_ELAPSED_EXT, ext.QUERY_COUNTER_BITS_EXT) >= 30", "true");
+    shouldBeTrue("ext.getQueryEXT(ext.TIME_ELAPSED_EXT, ext.CURRENT_QUERY_EXT) === null");
+    wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+    shouldBeTrue("ext.getQueryEXT(ext.TIME_ELAPSED_EXT, ext.QUERY_COUNTER_BITS_EXT) >= 30");
+    wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+
+    shouldBeTrue("ext.getQueryEXT(ext.TIMESTAMP_EXT, ext.CURRENT_QUERY_EXT) === null");
+    wtu.glErrorShouldBe(gl, gl.NO_ERROR);
 
     // Certain drivers set timestamp counter bits to 0 as they don't support timestamps
-    shouldBe("ext.getQueryEXT(ext.TIMESTAMP_EXT, ext.QUERY_COUNTER_BITS_EXT) >= 30 || " +
-             "ext.getQueryEXT(ext.TIMESTAMP_EXT, ext.QUERY_COUNTER_BITS_EXT) == 0", "true");
+    shouldBeTrue("ext.getQueryEXT(ext.TIMESTAMP_EXT, ext.QUERY_COUNTER_BITS_EXT) >= 30 || " +
+             "ext.getQueryEXT(ext.TIMESTAMP_EXT, ext.QUERY_COUNTER_BITS_EXT) === 0");
+    wtu.glErrorShouldBe(gl, gl.NO_ERROR);
 
     debug("");
     debug("Testing time elapsed query lifecycle");
     query = ext.createQueryEXT();
     shouldBe("ext.isQueryEXT(query)", "false");
     wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Query creation must succeed.");
+    shouldThrow("ext.beginQueryEXT(ext.TIMESTAMP_EXT, null)");
     ext.beginQueryEXT(ext.TIMESTAMP_EXT, query);
     wtu.glErrorShouldBe(gl, gl.INVALID_ENUM, "Beginning a timestamp query should fail.");
     ext.beginQueryEXT(ext.TIME_ELAPSED_EXT, query);
     shouldBe("ext.isQueryEXT(query)", "true");
     wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Beginning an inactive time elapsed query should succeed.");
     ext.beginQueryEXT(ext.TIME_ELAPSED_EXT, query);
     wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION, "Attempting to begin an active query should fail.");
     ext.getQueryObjectEXT(query, ext.QUERY_RESULT_AVAILABLE_EXT);
     wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION, "Fetching query result availability of an active query should fail.");
     ext.getQueryObjectEXT(query, ext.QUERY_RESULT_EXT);
     wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION, "Fetching query result of an active query should fail.");
     shouldBe("ext.getQueryEXT(ext.TIME_ELAPSED_EXT, ext.CURRENT_QUERY_EXT)", "query");
     ext.endQueryEXT(ext.TIME_ELAPSED_EXT);
     wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Ending an active time elapsed query should succeed.");
+    shouldThrow("ext.getQueryObjectEXT(null, ext.QUERY_RESULT_AVAILABLE_EXT)");
     ext.getQueryObjectEXT(query, ext.QUERY_RESULT_AVAILABLE_EXT);
     wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Fetching query result availability after query end should succeed.");
     ext.endQueryEXT(ext.TIME_ELAPSED_EXT);
     wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION, "Attempting to end an inactive query should fail.");
     ext.queryCounterEXT(query, ext.TIMESTAMP_EXT);
     wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION, "Should not be able to use time elapsed query to store a timestamp.");
     ext.deleteQueryEXT(query);
     wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Query deletion must succeed.");
@@ -133,64 +141,75 @@ function runSanityTests() {
     wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION, "Beginning a deleted query must fail.");
     ext.getQueryObjectEXT(query, ext.QUERY_RESULT_AVAILABLE_EXT);
     wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION, "Fetching query result availability after query deletion should fail.");
     shouldBe("ext.isQueryEXT(query)", "false");
 
     debug("");
     debug("Testing timestamp counter");
     query = ext.createQueryEXT();
+    shouldThrow("ext.queryCounterEXT(null, ext.TIMESTAMP_EXT)");
     ext.queryCounterEXT(query, ext.TIMESTAMP_EXT);
     wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Timestamp counter queries should work.");
     ext.deleteQueryEXT(query);
+    wtu.glErrorShouldBe(gl, gl.NO_ERROR);
 
     debug("");
     debug("Performing parameter sanity checks");
     gl.getParameter(ext.TIMESTAMP_EXT);
     wtu.glErrorShouldBe(gl, gl.NO_ERROR, "getParameter timestamp calls should work.");
     gl.getParameter(ext.GPU_DISJOINT_EXT);
     wtu.glErrorShouldBe(gl, gl.NO_ERROR, "getParameter disjoint calls should work.");
 
     debug("");
     debug("Testing current query conditions");
     query = ext.createQueryEXT();
     query2 = ext.createQueryEXT();
     shouldBe("ext.getQueryEXT(ext.TIME_ELAPSED_EXT, ext.CURRENT_QUERY_EXT)", "null");
     ext.beginQueryEXT(ext.TIME_ELAPSED_EXT, query);
     shouldBe("ext.getQueryEXT(ext.TIME_ELAPSED_EXT, ext.CURRENT_QUERY_EXT)", "query");
+    wtu.glErrorShouldBe(gl, gl.NO_ERROR);
 
     debug("");
     debug("Testing failed begin query should not change the current query.");
     ext.beginQueryEXT(ext.TIME_ELAPSED_EXT, query2);
     wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION, "Beginning an elapsed query without ending should fail.");
     shouldBe("ext.getQueryEXT(ext.TIME_ELAPSED_EXT, ext.CURRENT_QUERY_EXT)", "query");
+    wtu.glErrorShouldBe(gl, gl.NO_ERROR);
 
     debug("");
-    debug("Testing beginning a timestamp query should not change the elapsed query.");
-    ext.beginQueryEXT(ext.TIME_ELAPSED_EXT, query2)
-    shouldBe("ext.getQueryEXT(ext.TIME_ELAPSED_EXT, ext.CURRENT_QUERY_EXT)", "query");;
+    debug("Testing beginning a timestamp query is invalid and should not change the elapsed query.");
+    ext.beginQueryEXT(ext.TIMESTAMP_EXT, query2)
+    wtu.glErrorShouldBe(gl, gl.INVALID_ENUM);
+    shouldBe("ext.getQueryEXT(ext.TIME_ELAPSED_EXT, ext.CURRENT_QUERY_EXT)", "query");
+    wtu.glErrorShouldBe(gl, gl.NO_ERROR);
 
     debug("");
     debug("Testing timestamp queries end immediately so are never current.");
     ext.queryCounterEXT(query2, ext.TIMESTAMP_EXT);
     shouldBe("ext.getQueryEXT(ext.TIMESTAMP_EXT, ext.CURRENT_QUERY_EXT)", "null");
+    wtu.glErrorShouldBe(gl, gl.NO_ERROR);
 
     debug("");
     debug("Testing ending the query should clear the current query.");
     ext.endQueryEXT(ext.TIME_ELAPSED_EXT);
     shouldBe("ext.getQueryEXT(ext.TIME_ELAPSED_EXT, ext.CURRENT_QUERY_EXT)", "null");
+    wtu.glErrorShouldBe(gl, gl.NO_ERROR);
 
     debug("");
     debug("Testing beginning a elapsed query using a timestamp query should fail and not affect current query.")
     ext.beginQueryEXT(ext.TIME_ELAPSED_EXT, query2);
     wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION, "Switching query targets should fail.");
     shouldBe("ext.getQueryEXT(ext.TIME_ELAPSED_EXT, ext.CURRENT_QUERY_EXT)", "null");
+    wtu.glErrorShouldBe(gl, gl.NO_ERROR);
 
     ext.deleteQueryEXT(query);
     ext.deleteQueryEXT(query2);
+
+    wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors at end of sanity tests");
 }
 
 function runElapsedTimeTest() {
     debug("");
     debug("Testing elapsed time query");
 
     elapsed_query = ext.createQueryEXT();
     ext.beginQueryEXT(ext.TIME_ELAPSED_EXT, elapsed_query);
@@ -219,45 +238,48 @@ function verifyQueryResultsNotAvailable(
 
     // Verify as best as possible that the implementation doesn't
     // allow a query's result to become available the same frame, by
     // spin-looping for some time and ensuring that none of the
     // queries' results become available.
     var startTime = Date.now();
     while (Date.now() - startTime < 2000) {
         gl.finish();
-        if (ext.getQueryObjectEXT(elapsed_query, ext.QUERY_RESULT_AVAILABLE_EXT)) { 
+        if (ext.getQueryObjectEXT(elapsed_query, ext.QUERY_RESULT_AVAILABLE_EXT)) {
             testFailed("One of the queries' results became available too early");
             return;
         }
         if (timestamp_counter_bits > 0) {
             if (ext.getQueryObjectEXT(timestamp_query1, ext.QUERY_RESULT_AVAILABLE_EXT) ||
                 ext.getQueryObjectEXT(timestamp_query2, ext.QUERY_RESULT_AVAILABLE_EXT)) {
                 testFailed("One of the queries' results became available too early");
                 return;
             }
         }
     }
 
     testPassed("Queries' results didn't become available in a spin loop");
 }
 
 function checkQueryResults() {
-    if (availability_retry > 0 && (timestamp_counter_bits == 0 ||
-        !ext.getQueryObjectEXT(timestamp_query2, ext.QUERY_RESULT_AVAILABLE_EXT))) {
-        var error = gl.getError();
-        if (error != gl.NO_ERROR) {
-            testFailed("getQueryObjectEXT should have no errors: " + wtu.glEnumToString(gl, error));
-            debug("");
-            finishTest();
+    if (availability_retry > 0) {
+        // Make a reasonable attempt to wait for the queries' results to become available.
+        if (!ext.getQueryObjectEXT(elapsed_query, ext.QUERY_RESULT_AVAILABLE_EXT) ||
+            (timestamp_counter_bits > 0 && !ext.getQueryObjectEXT(timestamp_query2, ext.QUERY_RESULT_AVAILABLE_EXT))) {
+            var error = gl.getError();
+            if (error != gl.NO_ERROR) {
+                testFailed("getQueryObjectEXT should have no errors: " + wtu.glEnumToString(gl, error));
+                debug("");
+                finishTest();
+                return;
+            }
+            availability_retry--;
+            window.requestAnimationFrame(checkQueryResults);
             return;
         }
-        availability_retry--;
-        window.requestAnimationFrame(checkQueryResults);
-        return;
     }
 
     debug("");
     debug("Testing query results");
 
     // Make sure queries are available.
     shouldBe("ext.getQueryObjectEXT(elapsed_query, ext.QUERY_RESULT_AVAILABLE_EXT)", "true");
     if (timestamp_counter_bits > 0) {
--- a/dom/canvas/test/webgl-conf/checkout/conformance/extensions/ext-frag-depth.html
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/extensions/ext-frag-depth.html
@@ -211,17 +211,17 @@ function runShaderTests(extensionEnabled
 
 function runOutputTests() {
     var e = 2; // Amount of variance to allow in result pixels - may need to be tweaked higher
 
     debug("Testing various draws for valid built-in function behavior");
 
     canvas.width = 50; canvas.height = 50;
     gl.viewport(0, 0, canvas.width, canvas.height);
-    
+
     // Enable depth testing with a clearDepth of 0.5
     // This makes it so that fragments are only rendered when
     // gl_fragDepthEXT is < 0.5
     gl.clearDepth(0.5);
     gl.enable(gl.DEPTH_TEST);
 
     var positionLoc = 0;
     var texcoordLoc = 1;
--- a/dom/canvas/test/webgl-conf/checkout/conformance/extensions/ext-texture-filter-anisotropic.html
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/extensions/ext-texture-filter-anisotropic.html
@@ -86,32 +86,32 @@ function runSupportedTest(extensionEnabl
         } else {
             testPassed("EXT_texture_filter_anisotropic not listed as supported and getExtension failed -- this is legal");
         }
     }
 }
 
 function runHintTestDisabled() {
     debug("Testing MAX_TEXTURE_MAX_ANISOTROPY_EXT with extension disabled");
-    
+
     var MAX_TEXTURE_MAX_ANISOTROPY_EXT = 0x84FF;
     gl.getParameter(MAX_TEXTURE_MAX_ANISOTROPY_EXT);
     wtu.glErrorShouldBe(gl, gl.INVALID_ENUM, "MAX_TEXTURE_MAX_ANISOTROPY_EXT should not be queryable if extension is disabled");
-    
+
     debug("Testing TEXTURE_MAX_ANISOTROPY_EXT with extension disabled");
     var TEXTURE_MAX_ANISOTROPY_EXT = 0x84FE;
     var texture = gl.createTexture();
     gl.bindTexture(gl.TEXTURE_2D, texture);
-   
+
     gl.getTexParameter(gl.TEXTURE_2D, TEXTURE_MAX_ANISOTROPY_EXT);
     wtu.glErrorShouldBe(gl, gl.INVALID_ENUM, "TEXTURE_MAX_ANISOTROPY_EXT should not be queryable if extension is disabled");
 
     gl.texParameterf(gl.TEXTURE_2D, TEXTURE_MAX_ANISOTROPY_EXT, 1);
     wtu.glErrorShouldBe(gl, gl.INVALID_ENUM, "TEXTURE_MAX_ANISOTROPY_EXT should not be settable if extension is disabled");
-    
+
     gl.texParameteri(gl.TEXTURE_2D, TEXTURE_MAX_ANISOTROPY_EXT, 1);
     wtu.glErrorShouldBe(gl, gl.INVALID_ENUM, "TEXTURE_MAX_ANISOTROPY_EXT should not be settable if extension is disabled");
 
     gl.deleteTexture(texture);
 }
 
 function runHintTestEnabled() {
     debug("Testing MAX_TEXTURE_MAX_ANISOTROPY_EXT with extension enabled");
@@ -122,44 +122,44 @@ function runHintTestEnabled() {
     wtu.glErrorShouldBe(gl, gl.NO_ERROR, "MAX_TEXTURE_MAX_ANISOTROPY_EXT query should succeed if extension is enabled");
 
     if(max_anisotropy >= 2){
         testPassed("Minimum value of MAX_TEXTURE_MAX_ANISOTROPY_EXT is 2.0");
     }
     else{
         testFailed("Minimum value of MAX_TEXTURE_MAX_ANISOTROPY_EXT is 2.0, returned values was: " + max_anisotropy);
     }
-    
+
     // TODO make a texture and verify initial value == 1 and setting to less than 1 is invalid value
 
     debug("Testing TEXTURE_MAX_ANISOTROPY_EXT with extension disabled");
     shouldBe("ext.TEXTURE_MAX_ANISOTROPY_EXT", "0x84FE");
 
     var texture = gl.createTexture();
     gl.bindTexture(gl.TEXTURE_2D, texture);
-   
+
     var queried_value = gl.getTexParameter(gl.TEXTURE_2D, ext.TEXTURE_MAX_ANISOTROPY_EXT);
     wtu.glErrorShouldBe(gl, gl.NO_ERROR, "TEXTURE_MAX_ANISOTROPY_EXT query should succeed if extension is enabled");
 
     if(queried_value == 1){
         testPassed("Initial value of TEXTURE_MAX_ANISOTROPY_EXT is 1.0");
     }
     else{
         testFailed("Initial value of TEXTURE_MAX_ANISOTROPY_EXT should be 1.0, returned value was: " + queried_value);
     }
 
     gl.texParameterf(gl.TEXTURE_2D, ext.TEXTURE_MAX_ANISOTROPY_EXT, 0);
     wtu.glErrorShouldBe(gl, gl.INVALID_VALUE, "texParameterf TEXTURE_MAX_ANISOTROPY_EXT set to < 1 should be an invalid value");
-    
+
     gl.texParameteri(gl.TEXTURE_2D, ext.TEXTURE_MAX_ANISOTROPY_EXT, 0);
     wtu.glErrorShouldBe(gl, gl.INVALID_VALUE, "texParameteri TEXTURE_MAX_ANISOTROPY_EXT set to < 1 should be an invalid value");
-    
+
     gl.texParameterf(gl.TEXTURE_2D, ext.TEXTURE_MAX_ANISOTROPY_EXT, max_anisotropy);
     wtu.glErrorShouldBe(gl, gl.NO_ERROR, "texParameterf TEXTURE_MAX_ANISOTROPY_EXT set to >= 2 should succeed");
-    
+
     gl.texParameteri(gl.TEXTURE_2D, ext.TEXTURE_MAX_ANISOTROPY_EXT, max_anisotropy);
     wtu.glErrorShouldBe(gl, gl.NO_ERROR, "texParameteri TEXTURE_MAX_ANISOTROPY_EXT set to >= 2 should succeed");
 
     var queried_value = gl.getTexParameter(gl.TEXTURE_2D, ext.TEXTURE_MAX_ANISOTROPY_EXT);
     if(queried_value == max_anisotropy){
         testPassed("Set value of TEXTURE_MAX_ANISOTROPY_EXT matches expecation");
     }
     else{
--- a/dom/canvas/test/webgl-conf/checkout/conformance/extensions/oes-element-index-uint.html
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/extensions/oes-element-index-uint.html
@@ -74,17 +74,17 @@ for (var ii = 0; ii < 2; ++ii) {
     canvas.height = 50;
 
     gl = wtu.create3DContext(canvas);
 
     if (!gl) {
         testFailed("WebGL context does not exist");
     } else {
         testPassed("WebGL context exists");
-    
+
         var drawType = (ii == 0) ? gl.STATIC_DRAW : gl.DYNAMIC_DRAW;
         debug("Testing " + ((ii == 0) ? "STATIC_DRAW" : "DYNAMIC_DRAW"));
 
 
         // Query the extension and store globally so shouldBe can access it
         ext = gl.getExtension("OES_element_index_uint");
         if (!ext) {
             testPassed("No OES_element_index_uint support -- this is legal");
@@ -124,27 +124,27 @@ function runSupportedTest(extensionEnabl
         } else {
             testPassed("OES_element_index_uint not listed as supported and getExtension failed -- this is legal");
         }
     }
 }
 
 function runDrawTests(drawType) {
     debug("Test that draws with unsigned integer indices produce the expected results");
-    
+
     canvas.width = 50; canvas.height = 50;
     gl.viewport(0, 0, canvas.width, canvas.height);
-    
+
     var program = wtu.setupSimpleColorProgram(gl);
 
     function setupDraw(s) {
         // Create a vertex buffer that cannot be fully indexed via shorts
         var quadArrayLen = 65537 * 3;
         var quadArray = new Float32Array(quadArrayLen);
-        
+
         // Leave all but the last 4 values zero-ed out
         var idx = quadArrayLen - 12;
 
         // Initialized the last 4 values to a quad
         quadArray[idx++] = 1.0 * s;
         quadArray[idx++] = 1.0 * s;
         quadArray[idx++] = 0.0;
 
--- a/dom/canvas/test/webgl-conf/checkout/conformance/extensions/oes-vertex-array-object-bufferData.html
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/extensions/oes-vertex-array-object-bufferData.html
@@ -94,107 +94,107 @@ if (!gl) {
     }
 }
 
 /**
  * The OES_vertex_array_object extension seems to work incorrectly on some handheld devices,
  * namely the Nexus 5, and Nexus 7 (in 2014/01) when using bufferData before binding the VAO.
  * The tested OS was Android KitKat 4.4.2, the effects were the same in all tested browsers
  * (Chrome, Chrome Beta, Firefox, Firefox Beta), so it is likely a driver bug.
- * These devices have the similar Adreno 320 and Adreno 330 GPUs respectively. 
+ * These devices have the similar Adreno 320 and Adreno 330 GPUs respectively.
  *
  * The issuse resulted from this sequence of actions in a requestAnimationFrame loop:
  * 1. upload some vertex buffers with gl.bufferData (eg. colors)
  * 2. bind the VAO
  * 3. clear the canvas
  * 4. draw (some triangles) to the canvas
  * 5. unbind the VAO
- * 
+ *
  * This caused the drawn triangles to be drawn with black (0) for most of the frames, with some
  * rare frames presenting the correct render results. Interestingly on both devices exactly every
- * 64th frame passed (starting with the very first one), the others failed. 
+ * 64th frame passed (starting with the very first one), the others failed.
  * (Because of this, we test multiple frames.)
- * When positions were uploaded, seemingly nothing was drawn, that's likely because the 
+ * When positions were uploaded, seemingly nothing was drawn, that's likely because the
  * position buffer was also all 0s.
  *
  * The issue did not occur:
  * - if step 1. and 2. were swapped
  * - or if step5 was ommited (probably because that makes step 2 a no-op since the VAO is bound)
  */
 function runBufferDataTest() {
     debug("Testing draws with bufferData");
-    
+
     canvas.width = 50; canvas.height = 50;
     gl.viewport(0, 0, canvas.width, canvas.height);
-    
+
     var testColor = [0, 255, 0, 255];
     var clearColor = [255, 0, 0, 255];
-    
+
     // Where the issue occures, this is the sequence of success/failure every time:
     // result:           success fail fail fail fail ... success fail fail ...
     // currentTestCount: 0       1    2    3    4    ... 64      65   66   ...
     // So with just 1 test it passes, but 2 tests are enough. Here we use 3.
-    var numberOfTests = 3; 
+    var numberOfTests = 3;
     var currentTestCount = 0;
-    
+
     var positionLoc = 0;
     var colorLoc = 1;
     var gridRes = 1;
-    
+
     var program = wtu.setupSimpleVertexColorProgram(gl, positionLoc, colorLoc);
-    
+
     var vao0 = ext.createVertexArrayOES();
     ext.bindVertexArrayOES(vao0);
-    
+
     var buffers = wtu.setupIndexedQuadWithOptions(gl,
     { gridRes: gridRes,
       positionLocation: positionLoc
     });
-    
+
     var colorTypedArray = createColorTypedArray();
-    
+
     var colorBuffer = gl.createBuffer(gl.ARRAY_BUFFER);
     gl.bindBuffer(gl.ARRAY_BUFFER, colorBuffer);
     gl.enableVertexAttribArray(colorLoc);
-    gl.vertexAttribPointer(colorLoc, 4, gl.FLOAT, false, 0, 0); 
-    
+    gl.vertexAttribPointer(colorLoc, 4, gl.FLOAT, false, 0, 0);
+
     ext.bindVertexArrayOES(null);
-    
+
     testDrawing();
-    
+
     function testDrawing() {
         // this order works fine:
         // ext.bindVertexArrayOES(vao0);
         // uploadColor();
-        
+
         // this order doesn't:
         uploadColor();
         ext.bindVertexArrayOES(vao0);
-        
+
         wtu.clearAndDrawIndexedQuad(gl, 1, clearColor);
-        
+
         ext.bindVertexArrayOES(null);
 
         //debug("<span>"+currentTestCount+"</span");
         wtu.checkCanvas(gl, testColor, "should be green")
-        
+
         if (++currentTestCount < numberOfTests) {
             testDrawing();
             // wtu.requestAnimFrame(testDrawing);
         } else {
             // clean up
             ext.deleteVertexArrayOES(vao0);
         }
     }
-    
+
     function uploadColor() {
         gl.bindBuffer(gl.ARRAY_BUFFER, colorBuffer);
         gl.bufferData(gl.ARRAY_BUFFER, colorTypedArray, gl.STREAM_DRAW);
     }
-    
+
     function createColorTypedArray() {
         var colors = [];
         var pOffset = 0;
         for (var yy = 0; yy <= gridRes; ++yy) {
           for (var xx = 0; xx <= gridRes; ++xx) {
             colors[pOffset + 0] = testColor[0];
             colors[pOffset + 1] = testColor[1];
             colors[pOffset + 2] = testColor[2];
--- a/dom/canvas/test/webgl-conf/checkout/conformance/extensions/oes-vertex-array-object.html
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/extensions/oes-vertex-array-object.html
@@ -619,41 +619,35 @@ function runBoundDeleteTests() {
 
     // delete the color buffers AND the position buffer, that are bound to the current VAO
     for (var ii = 0; ii < vaos.length; ++ii) {
         ext.bindVertexArrayOES(vaos[ii]);
 
         gl.deleteBuffer(colorBuffer);
         gl.deleteBuffer(positionBuffer);
 
-        var expectRetained = (ii != 0);
-        var shouldBeStr = (expectRetained ? "retained" : "cleared");
-
+        // The buffers should not be accessible at this point. Deleted objects that are bound
+        // in the current context undergo an automatic unbinding
         var boundPositionBuffer = gl.getVertexAttrib(0, gl.VERTEX_ATTRIB_ARRAY_BUFFER_BINDING);
-        if (expectRetained != (boundPositionBuffer == positionBuffer)) {
-            testFailed("Position attrib stored buffer should be " + shouldBeStr + ".");
+        if(boundPositionBuffer == positionBuffer) {
+            testFailed("Position buffer should be automatically unbound when deleted");
         }
-
         var boundColorBuffer = gl.getVertexAttrib(1, gl.VERTEX_ATTRIB_ARRAY_BUFFER_BINDING);
-        if (expectRetained != (boundColorBuffer == colorBuffer)) {
-            testFailed("Color attrib stored buffer should be " + shouldBeStr + ".");
+        if(boundColorBuffer == colorBuffer) {
+            testFailed("Color buffer should be automatically unbound when deleted");
         }
 
-        // If retained, everything should still work. If cleared, drawing should now fail.
         gl.drawElements(gl.TRIANGLES, 6, gl.UNSIGNED_BYTE, 0);
-        var expectedError = (expectRetained ? gl.NO_ERROR : gl.INVALID_OPERATION);
-        wtu.glErrorShouldBe(gl, expectedError,
-                            "Draw call should " + (expectRetained ? "not " : "") + "fail.");
+        wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION, "Draw call should fail with unbound position and color buffers");
 
-        if (!gl.isBuffer(positionBuffer)) {
-            testFailed("Position buffer should count for isBuffer.");
-        }
-        if (!gl.isBuffer(colorBuffer)) {
-            testFailed("Color buffer should count for isBuffer.");
-        }
+        var isPositionBuffer = gl.isBuffer(positionBuffer);
+        var isColorBuffer    = gl.isBuffer(colorBuffer);
+
+        if(isPositionBuffer)  testFailed("Position buffer should no longer exist after last ref removed");
+        if(isColorBuffer)     testFailed("Color buffer should no longer exist after last ref removed");
     }
 }
 
 function runArrayBufferBindTests() {
     debug("");
     debug("Testing that buffer bindings on VAOs don't affect default VAO ARRAY_BUFFER binding.");
 
     ext.bindVertexArrayOES(null);
--- a/dom/canvas/test/webgl-conf/checkout/conformance/extensions/webgl-compressed-texture-atc.html
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/extensions/webgl-compressed-texture-atc.html
@@ -199,17 +199,22 @@ function runTestExtension() {
     // check that all format enums exist.
     for (name in validFormats) {
         var expected = "0x" + validFormats[name].toString(16);
         var actual = "ext['" + name + "']";
         shouldBe(actual, expected);
     }
 
     supportedFormats = gl.getParameter(gl.COMPRESSED_TEXTURE_FORMATS);
-    shouldBe("supportedFormats.length", "3");
+    // There should be exactly 3 formats for WebGL 1.0 and 13 formats for WebGL 2.0.
+    if (contextVersion < 2) {
+        shouldBe("supportedFormats.length", "3");
+    } else {
+        shouldBe("supportedFormats.length", "13");
+    }
 
     // check that all 3 formats exist
     for (var name in validFormats.length) {
         formatExists(validFormats[name], supportedFormats);
     }
 
     // Test each format
     testATC_RGB();
new file mode 100644
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/extensions/webgl-compressed-texture-etc.html
@@ -0,0 +1,154 @@
+<!--
+
+/*
+** Copyright (c) 2015-2016 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL WEBGL_compressed_texture_etc Conformance Tests</title>
+<LINK rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src="../../js/js-test-pre.js"></script>
+<script src="../../js/webgl-test-utils.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+description("This test verifies the functionality of the WEBGL_compressed_texture_etc extension, if it is available.");
+
+debug("");
+var COMPRESSED_RGB_S3TC_DXT1_EXT              = 0x83F0;
+var COMPRESSED_RGBA_S3TC_DXT1_EXT             = 0x83F1;
+var COMPRESSED_RGBA_S3TC_DXT3_EXT             = 0x83F2;
+var COMPRESSED_RGBA_S3TC_DXT5_EXT             = 0x83F3;
+var COMPRESSED_RGB_PVRTC_4BPPV1_IMG           = 0x8C00;
+var COMPRESSED_RGBA_PVRTC_4BPPV1_IMG          = 0x8C02;
+var ETC1_RGB8_OES                             = 0x8D64;
+var COMPRESSED_R11_EAC                        = 0x9270;
+var COMPRESSED_SIGNED_R11_EAC                 = 0x9271;
+var COMPRESSED_RG11_EAC                       = 0x9272;
+var COMPRESSED_SIGNED_RG11_EAC                = 0x9273;
+var COMPRESSED_RGB8_ETC2                      = 0x9274;
+var COMPRESSED_SRGB8_ETC2                     = 0x9275;
+var COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2  = 0x9276;
+var COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 = 0x9277;
+var COMPRESSED_RGBA8_ETC2_EAC                 = 0x9278;
+var COMPRESSED_SRGB8_ALPHA8_ETC2_EAC          = 0x9279;
+
+var wtu = WebGLTestUtils;
+var gl = wtu.create3DContext(undefined, undefined);
+var WEBGL_compressed_texture_etc;
+
+var formats = null;
+
+function runTest() {
+  if (!gl) {
+    testFailed("context does not exist");
+  } else {
+    testPassed("context exists");
+
+    var tex = gl.createTexture();
+    gl.bindTexture(gl.TEXTURE_2D, tex);
+
+    var haveExt = gl.getSupportedExtensions().indexOf("WEBGL_compressed_texture_etc") >= 0;
+    WEBGL_compressed_texture_etc = gl.getExtension("WEBGL_compressed_texture_etc");
+
+    var isPositive = true;
+
+    if (haveExt) {
+      if (WEBGL_compressed_texture_etc !== null) {
+        testPassed("WEBGL_compressed_texture_etc listed as supported and getExtension succeeded");
+      } else {
+        testFailed("WEBGL_compressed_texture_etc listed as supported but getExtension failed");
+        return;
+      }
+    } else {
+      if (WEBGL_compressed_texture_etc !== null) {
+        testFailed("WEBGL_compressed_texture_etc listed as supported but getExtension failed");
+        return;
+      } else {
+        testPassed("No WEBGL_compressed_texture_etc support -- this is legal");
+        isPositive = false;
+      }
+    }
+
+    if (isPositive) {
+      shouldBe("WEBGL_compressed_texture_etc.COMPRESSED_R11_EAC", "0x9270");
+      shouldBe("WEBGL_compressed_texture_etc.COMPRESSED_SIGNED_R11_EAC", "0x9271");
+      shouldBe("WEBGL_compressed_texture_etc.COMPRESSED_RG11_EAC", "0x9272");
+      shouldBe("WEBGL_compressed_texture_etc.COMPRESSED_SIGNED_RG11_EAC", "0x9273");
+      shouldBe("WEBGL_compressed_texture_etc.COMPRESSED_RGB8_ETC2", "0x9274");
+      shouldBe("WEBGL_compressed_texture_etc.COMPRESSED_SRGB8_ETC2", "0x9275");
+      shouldBe("WEBGL_compressed_texture_etc.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2", "0x9276");
+      shouldBe("WEBGL_compressed_texture_etc.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2", "0x9277");
+      shouldBe("WEBGL_compressed_texture_etc.COMPRESSED_RGBA8_ETC2_EAC", "0x9278");
+      shouldBe("WEBGL_compressed_texture_etc.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC", "0x9279");
+    }
+
+    wtu.shouldGenerateGLError(gl, gl.INVALID_ENUM, "gl.compressedTexImage2D(gl.TEXTURE_2D, 0, COMPRESSED_RGB_S3TC_DXT1_EXT, 4, 4, 0, new Uint8Array(8))");
+    wtu.shouldGenerateGLError(gl, gl.INVALID_ENUM, "gl.compressedTexImage2D(gl.TEXTURE_2D, 0, COMPRESSED_RGBA_S3TC_DXT1_EXT, 4, 4, 0, new Uint8Array(8))");
+    wtu.shouldGenerateGLError(gl, gl.INVALID_ENUM, "gl.compressedTexImage2D(gl.TEXTURE_2D, 0, COMPRESSED_RGBA_S3TC_DXT5_EXT, 4, 4, 0, new Uint8Array(16))");
+    wtu.shouldGenerateGLError(gl, gl.INVALID_ENUM, "gl.compressedTexImage2D(gl.TEXTURE_2D, 0, ETC1_RGB8_OES, 4, 4, 0, new Uint8Array(8))");
+    wtu.shouldGenerateGLError(gl, gl.INVALID_ENUM, "gl.compressedTexImage2D(gl.TEXTURE_2D, 0, COMPRESSED_RGB_PVRTC_4BPPV1_IMG, 8, 8, 0, new Uint8Array(8))");
+    wtu.shouldGenerateGLError(gl, gl.INVALID_ENUM, "gl.compressedTexImage2D(gl.TEXTURE_2D, 0, COMPRESSED_RGBA_PVRTC_4BPPV1_IMG, 8, 8, 0, new Uint8Array(8))");
+    wtu.shouldGenerateGLError(gl, gl.INVALID_ENUM, "gl.compressedTexImage2D(gl.TEXTURE_3D, 0, COMPRESSED_R11_EAC, 4, 4, 0, new Uint8Array(8))");
+    wtu.shouldGenerateGLError(gl, gl.INVALID_ENUM, "gl.compressedTexSubImage2D(gl.TEXTURE_3D, 0, 0, 0, 4, 4, COMPRESSED_R11_EAC, new Uint8Array(8))");
+
+    var expected = isPositive ? gl.NO_ERROR : gl.INVALID_ENUM;
+    var expectedSub = isPositive ? gl.NO_ERROR : [gl.INVALID_ENUM, gl.INVALID_OPERATION];
+    wtu.shouldGenerateGLError(gl, expected, "gl.compressedTexImage2D(gl.TEXTURE_2D, 0, COMPRESSED_R11_EAC, 4, 4, 0, new Uint8Array(8))");
+    wtu.shouldGenerateGLError(gl, expectedSub, "gl.compressedTexSubImage2D(gl.TEXTURE_2D, 0, 0, 0, 4, 4, COMPRESSED_R11_EAC, new Uint8Array(8))");
+    wtu.shouldGenerateGLError(gl, expected, "gl.compressedTexImage2D(gl.TEXTURE_2D, 0, COMPRESSED_SIGNED_R11_EAC, 4, 4, 0, new Uint8Array(8))");
+    wtu.shouldGenerateGLError(gl, expected, "gl.compressedTexImage2D(gl.TEXTURE_2D, 0, COMPRESSED_RG11_EAC, 4, 4, 0, new Uint8Array(16))");
+    wtu.shouldGenerateGLError(gl, expected, "gl.compressedTexImage2D(gl.TEXTURE_2D, 0, COMPRESSED_SIGNED_RG11_EAC, 4, 4, 0, new Uint8Array(16))");
+    wtu.shouldGenerateGLError(gl, expected, "gl.compressedTexImage2D(gl.TEXTURE_2D, 0, COMPRESSED_RGB8_ETC2, 4, 4, 0, new Uint8Array(8))");
+    wtu.shouldGenerateGLError(gl, expected, "gl.compressedTexImage2D(gl.TEXTURE_2D, 0, COMPRESSED_SRGB8_ETC2, 4, 4, 0, new Uint8Array(8))");
+    wtu.shouldGenerateGLError(gl, expected, "gl.compressedTexImage2D(gl.TEXTURE_2D, 0, COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2, 4, 4, 0, new Uint8Array(8))");
+    wtu.shouldGenerateGLError(gl, expected, "gl.compressedTexImage2D(gl.TEXTURE_2D, 0, COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2, 4, 4, 0, new Uint8Array(8))");
+    wtu.shouldGenerateGLError(gl, expected, "gl.compressedTexImage2D(gl.TEXTURE_2D, 0, COMPRESSED_RGBA8_ETC2_EAC, 4, 4, 0, new Uint8Array(16))");
+    wtu.shouldGenerateGLError(gl, expected, "gl.compressedTexImage2D(gl.TEXTURE_2D, 0, COMPRESSED_SRGB8_ALPHA8_ETC2_EAC, 4, 4, 0, new Uint8Array(16))");
+
+    wtu.shouldGenerateGLError(gl, gl.NO_ERROR, "formats = gl.getParameter(gl.COMPRESSED_TEXTURE_FORMATS)");
+    shouldBeNonNull("formats");
+    shouldBe("formats.length", isPositive ? "10" : "0");
+
+    debug("");
+    shouldThrow("gl.compressedTexImage2D(gl.TEXTURE_2D, 0, COMPRESSED_R11_EAC, 4, 4, 0, null)");
+    shouldThrow("gl.compressedTexSubImage2D(gl.TEXTURE_2D, 0, 0, 0, 0, 0, COMPRESSED_R11_EAC, null)");
+    shouldThrow("gl.compressedTexImage3D(gl.TEXTURE_2D_ARRAY, 0, COMPRESSED_R11_EAC, 4, 4, 4, 0, null)");
+    shouldThrow("gl.compressedTexSubImage3D(gl.TEXTURE_2D_ARRAY, 0, 0, 0, 0, 0, 0, 0, COMPRESSED_R11_EAC, null)");
+  }
+}
+
+runTest();
+
+var successfullyParsed = true;
+</script>
+<script src="../../js/js-test-post.js"></script>
+</body>
+</html>
--- a/dom/canvas/test/webgl-conf/checkout/conformance/extensions/webgl-compressed-texture-pvrtc.html
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/extensions/webgl-compressed-texture-pvrtc.html
@@ -172,16 +172,17 @@ function runTestExtension() {
     // check that all format enums exist.
     for (name in validFormats) {
         var expected = "0x" + validFormats[name].toString(16);
         var actual = "ext['" + name + "']";
         shouldBe(actual, expected);
     }
 
     supportedFormats = gl.getParameter(gl.COMPRESSED_TEXTURE_FORMATS);
+    // There should be exactly 4 formats for both WebGL 1.0 and WebGL 2.0.
     shouldBe("supportedFormats.length", "4");
 
     // check that all 4 formats exist
     for (var name in validFormats.length) {
         formatExists(validFormats[name], supportedFormats);
     }
 
     // Test each format
new file mode 100644
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/extensions/webgl-compressed-texture-s3tc-srgb.html
@@ -0,0 +1,711 @@
+<!--
+
+/*
+** Copyright (c) 2012-2016 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src="../../js/js-test-pre.js"></script>
+<script src="../../js/webgl-test-utils.js"></script>
+<title>WebGL WEBGL_compressed_texture_s3tc_srgb Conformance Tests</title>
+<style>
+img {
+ border: 1px solid black;
+ margin-right: 1em;
+}
+.testimages {
+}
+
+.testimages br {
+  clear: both;
+}
+
+.testimages > div {
+  float: left;
+  margin: 1em;
+}
+</style>
+</head>
+<body>
+<div id="description"></div>
+<canvas id="canvas" width="8" height="8" style="width: 8px; height: 8px;"></canvas>
+<div id="console"></div>
+<script>
+"use strict";
+description("This test verifies the functionality of the WEBGL_compressed_texture_s3tc_srgb extension, if it is available.");
+
+debug("");
+
+// This is the original image from webgl-compressed-texture-s3tc.html but
+// scaled to 0x40..0xbf inclusive and alpha changed from 0x69 to 0x7f.
+var img_4x4_rgba_raw = new Uint8Array([
+    0xbf,0x40,0x40,0x7f,0x40,0xbf,0x40,0xff,0xbf,0x40,0x40,0xff,0x40,0xbf,0x40,0xff,
+    0x40,0xbf,0x40,0xff,0x40,0xbf,0x40,0xff,0xbf,0x40,0x40,0xff,0x40,0xbf,0x40,0xff,
+    0xbf,0x40,0x40,0xff,0xbf,0x40,0x40,0xff,0xbf,0x40,0x40,0xff,0x40,0xbf,0x40,0xff,
+    0x40,0xbf,0x40,0xff,0x40,0xbf,0x40,0xff,0x40,0xbf,0x40,0xff,0x40,0xbf,0x40,0xff,
+]);
+var img_4x4_rgb_dxt1 = new Uint8Array([
+    0x08,0xba,0xe8,0x45,0x44,0x45,0x40,0x55,
+]);
+var img_4x4_rgba_dxt1 = new Uint8Array([
+    0xa8,0x4d,0x48,0xb2,0x13,0x10,0x15,0x00,
+]);
+var img_4x4_rgba_dxt3 = new Uint8Array([
+    0xf7,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x08,0xba,0xe8,0x45,0x44,0x45,0x40,0x55,
+]);
+var img_4x4_rgba_dxt5 = new Uint8Array([
+    0xff,0x7f,0x01,0x00,0x00,0x00,0x00,0x00,0x08,0xba,0xe8,0x45,0x44,0x45,0x40,0x55,
+]);
+var img_8x8_rgba_raw = new Uint8Array([
+    0xdf,0xa0,0xa0,0x7f,0x40,0xbf,0x40,0xff,0xbf,0x40,0x40,0xff,0x40,0xbf,0x40,0xff,0xbf,0xbf,0x40,0xff,0x40,0x40,0xbf,0xff,0xbf,0xbf,0x40,0xff,0x40,0x40,0xbf,0xff,
+    0x40,0xbf,0x40,0x7f,0x40,0xbf,0x40,0xff,0xbf,0x40,0x40,0xff,0x40,0xbf,0x40,0xff,0x40,0x40,0xbf,0xff,0x40,0x40,0xbf,0xff,0xbf,0xbf,0x40,0xff,0x40,0x40,0xbf,0xff,
+    0xbf,0x40,0x40,0xff,0xbf,0x40,0x40,0xff,0xbf,0x40,0x40,0xff,0x40,0xbf,0x40,0xff,0xbf,0xbf,0x40,0xff,0xbf,0xbf,0x40,0xff,0xbf,0xbf,0x40,0xff,0x40,0x40,0xbf,0xff,
+    0x40,0xbf,0x40,0xff,0x40,0xbf,0x40,0xff,0x40,0xbf,0x40,0xff,0x40,0xbf,0x40,0xff,0x40,0x40,0xbf,0xff,0x40,0x40,0xbf,0xff,0x40,0x40,0xbf,0xff,0x40,0x40,0xbf,0xff,
+    0x40,0xbf,0x40,0xff,0xbf,0x40,0xbf,0xff,0x40,0xbf,0x40,0xff,0xbf,0x40,0xbf,0xff,0x40,0x40,0xbf,0xff,0x40,0xbf,0xbf,0xff,0x40,0x40,0xbf,0xff,0x40,0xbf,0xbf,0xff,
+    0xbf,0x40,0xbf,0xff,0xbf,0x40,0xbf,0xff,0x40,0xbf,0x40,0xff,0xbf,0x40,0xbf,0xff,0x40,0xbf,0xbf,0xff,0x40,0xbf,0xbf,0xff,0x40,0x40,0xbf,0xff,0x40,0xbf,0xbf,0xff,
+    0x40,0xbf,0x40,0x7f,0x40,0xbf,0x40,0xff,0x40,0xbf,0x40,0xff,0xbf,0x40,0xbf,0xff,0x40,0x40,0xbf,0xff,0x40,0x40,0xbf,0xff,0x40,0x40,0xbf,0xff,0x40,0xbf,0xbf,0xff,
+    0xbf,0x40,0xbf,0x7f,0xbf,0x40,0xbf,0xff,0xbf,0x40,0xbf,0xff,0xbf,0x40,0xbf,0xff,0x40,0xbf,0xbf,0xff,0x40,0xbf,0xbf,0xff,0x40,0xbf,0xbf,0xff,0x40,0xbf,0xbf,0xff,
+]);
+var img_8x8_rgb_dxt1 = new Uint8Array([
+    0x08,0xba,0xe8,0x45,0x44,0x45,0x40,0x55,0xe8,0xbd,0x17,0x42,0x44,0x45,0x40,0x55,0x17,0xba,0xe8,0x45,0x11,0x10,0x15,0x00,0xf7,0x45,0x17,0x42,0x11,0x10,0x15,0x00,
+]);
+var img_8x8_rgba_dxt1 = new Uint8Array([
+    0xa8,0x4d,0x48,0xb2,0x13,0x10,0x15,0x00,0xe8,0xbd,0x17,0x42,0x44,0x45,0x40,0x55,0x17,0xba,0xe8,0x45,0x11,0x10,0x15,0x00,0xf7,0x45,0x17,0x42,0x11,0x10,0x15,0x00,
+]);
+var img_8x8_rgba_dxt3 = new Uint8Array([
+    0xf7,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x08,0xba,0xe8,0x45,0x44,0x45,0x40,0x55,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xe8,0xbd,0x17,0x42,0x44,0x45,0x40,0x55,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x17,0xba,0xe8,0x45,0x11,0x10,0x15,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf7,0x45,0x17,0x42,0x11,0x10,0x15,0x00,
+]);
+var img_8x8_rgba_dxt5 = new Uint8Array([
+    0xff,0x7f,0x01,0x00,0x00,0x00,0x00,0x00,0x08,0xba,0xe8,0x45,0x44,0x45,0x40,0x55,0xff,0xff,0x49,0x92,0x24,0x49,0x92,0x24,0xe8,0xbd,0x17,0x42,0x44,0x45,0x40,0x55,0xff,0xff,0x49,0x92,0x24,0x49,0x92,0x24,0x17,0xba,0xe8,0x45,0x11,0x10,0x15,0x00,0xff,0xff,0x49,0x92,0x24,0x49,0x92,0x24,0xf7,0x45,0x17,0x42,0x11,0x10,0x15,0x00,
+]);
+
+var wtu = WebGLTestUtils;
+var contextVersion = wtu.getDefault3DContextVersion();
+var canvas = document.getElementById("canvas");
+var gl = wtu.create3DContext(canvas, {antialias: false});
+var program = wtu.setupTexturedQuad(gl);
+var ext = null;
+var vao = null;
+var validFormats = {
+    COMPRESSED_SRGB_S3TC_DXT1_EXT       : 0x8C4C,
+    COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT : 0x8C4D,
+    COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT : 0x8C4E,
+    COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT : 0x8C4F,
+};
+var name;
+var supportedFormats;
+
+if (!gl) {
+    testFailed("WebGL context does not exist");
+} else {
+    testPassed("WebGL context exists");
+
+    // Run tests with extension disabled
+    runTestDisabled();
+
+    // Query the extension and store globally so shouldBe can access it
+    ext = wtu.getExtensionWithKnownPrefixes(gl, "WEBGL_compressed_texture_s3tc_srgb");
+    if (!ext) {
+        testPassed("No WEBGL_compressed_texture_s3tc_srgb support -- this is legal");
+        runSupportedTest(false);
+    } else {
+        testPassed("Successfully enabled WEBGL_compressed_texture_s3tc_srgb extension");
+
+        runSupportedTest(true);
+        runTestExtension();
+    }
+}
+
+function runSupportedTest(extensionEnabled) {
+    var name = wtu.getSupportedExtensionWithKnownPrefixes(gl, "WEBGL_compressed_texture_s3tc_srgb");
+    if (name !== undefined) {
+        if (extensionEnabled) {
+            testPassed("WEBGL_compressed_texture_s3tc_srgb listed as supported and getExtension succeeded");
+        } else {
+            testFailed("WEBGL_compressed_texture_s3tc_srgb listed as supported but getExtension failed");
+        }
+    } else {
+        if (extensionEnabled) {
+            testFailed("WEBGL_compressed_texture_s3tc_srgb not listed as supported but getExtension succeeded");
+        } else {
+            testPassed("WEBGL_compressed_texture_s3tc_srgb not listed as supported and getExtension failed -- this is legal");
+        }
+    }
+}
+
+
+function runTestDisabled() {
+    debug("Testing binding enum with extension disabled");
+
+    supportedFormats = gl.getParameter(gl.COMPRESSED_TEXTURE_FORMATS);
+    shouldBe("supportedFormats", "[]");
+}
+
+function formatExists(format, supportedFormats) {
+    for (var ii = 0; ii < supportedFormats.length; ++ii) {
+        if (format == supportedFormats[ii]) {
+            testPassed("supported format " + formatToString(format) + " is exists");
+            return;
+        }
+    }
+    testFailed("supported format " + formatToString(format) + " does not exist");
+}
+
+function formatToString(format) {
+    for (var p in ext) {
+        if (ext[p] == format) {
+            return p;
+        }
+    }
+    return "0x" + format.toString(16);
+}
+
+function runTestExtension() {
+    debug("Testing WEBGL_compressed_texture_s3tc_srgb");
+
+    // check that all format enums exist.
+    for (name in validFormats) {
+        var expected = "0x" + validFormats[name].toString(16);
+        var actual = "ext['" + name + "']";
+        shouldBe(actual, expected);
+    }
+
+    supportedFormats = gl.getParameter(gl.COMPRESSED_TEXTURE_FORMATS);
+    // There should be exactly 4 formats for both WebGL 1.0 and WebGL 2.0.
+    shouldBe("supportedFormats.length", "4");
+
+    // check that all 4 formats exist
+    for (var name in validFormats.length) {
+        formatExists(validFormats[name], supportedFormats);
+    }
+
+    // Test each format
+    testDXT1_SRGB();
+    testDXT1_SRGB_ALPHA();
+    testDXT3_SRGB_ALPHA();
+    testDXT5_SRGB_ALPHA();
+}
+
+function testDXT1_SRGB() {
+    var tests = [
+        {   width: 4,
+            height: 4,
+            channels: 3,
+            data: img_4x4_rgb_dxt1,
+            format: ext.COMPRESSED_SRGB_S3TC_DXT1_EXT,
+            hasAlpha: false,
+        },
+        {   width: 8,
+            height: 8,
+            channels: 3,
+            data: img_8x8_rgb_dxt1,
+            format: ext.COMPRESSED_SRGB_S3TC_DXT1_EXT,
+            hasAlpha: false,
+        }
+    ];
+    testDXTTextures(tests);
+}
+
+function testDXT1_SRGB_ALPHA() {
+    var tests = [
+        {   width: 4,
+            height: 4,
+            channels: 4,
+            data: img_4x4_rgba_dxt1,
+            format: ext.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT,
+            // This is a special case -- the texture is still opaque
+            // though it's RGBA.
+            hasAlpha: false,
+        },
+        {   width: 8,
+            height: 8,
+            channels: 4,
+            data: img_8x8_rgba_dxt1,
+            format: ext.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT,
+            // This is a special case -- the texture is still opaque
+            // though it's RGBA.
+            hasAlpha: false,
+        }
+    ];
+    testDXTTextures(tests);
+}
+
+function testDXT3_SRGB_ALPHA() {
+    var tests = [
+        {   width: 4,
+            height: 4,
+            channels: 4,
+            data: img_4x4_rgba_dxt3,
+            format: ext.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT,
+            hasAlpha: true,
+        },
+        {   width: 8,
+            height: 8,
+            channels: 4,
+            data: img_8x8_rgba_dxt3,
+            format: ext.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT,
+            hasAlpha: true,
+        }
+    ];
+    testDXTTextures(tests);
+}
+
+function testDXT5_SRGB_ALPHA() {
+    var tests = [
+        {   width: 4,
+            height: 4,
+            channels: 4,
+            data: img_4x4_rgba_dxt5,
+            format: ext.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT,
+            hasAlpha: true,
+        },
+        {   width: 8,
+            height: 8,
+            channels: 4,
+            data: img_8x8_rgba_dxt5,
+            format: ext.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT,
+            hasAlpha: true,
+        }
+    ];
+    testDXTTextures(tests);
+}
+
+function testDXTTextures(tests) {
+    debug("<hr/>");
+    for (var ii = 0; ii < tests.length; ++ii) {
+        testDXTTexture(tests[ii], false);
+        if (contextVersion >= 2) {
+            debug("<br/>");
+            testDXTTexture(tests[ii], true);
+        }
+    }
+}
+
+function uncompressDXTBlockSRGB(
+    destBuffer, destX, destY, destWidth, src, srcOffset, format) {
+    function make565(src, offset) {
+        return src[offset + 0] + src[offset + 1] * 256;
+    }
+    function make8888From565(c) {
+        return [
+                Math.floor(((c >> 11) & 0x1F) * 255 / 31),
+                Math.floor(((c >>    5) & 0x3F) * 255 / 63),
+                Math.floor(((c >>    0) & 0x1F) * 255 / 31),
+                255
+            ];
+    }
+    function mix(mult, c0, c1, div) {
+        var r = [];
+        for (var ii = 0; ii < c0.length; ++ii) {
+            r[ii] = Math.floor((c0[ii] * mult + c1[ii]) / div);
+        }
+        return r;
+    }
+    var isDXT1 = format == ext.COMPRESSED_SRGB_S3TC_DXT1_EXT ||
+                 format == ext.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;
+    var colorOffset = srcOffset + (isDXT1 ? 0 : 8);
+    var color0 = make565(src, colorOffset + 0);
+    var color1 = make565(src, colorOffset + 2);
+    var c0gtc1 = color0 > color1 || !isDXT1;
+    var rgba0 = make8888From565(color0);
+    var rgba1 = make8888From565(color1);
+    var colors = [
+            rgba0,
+            rgba1,
+            c0gtc1 ? mix(2, rgba0, rgba1, 3) : mix(1, rgba0, rgba1, 2),
+            c0gtc1 ? mix(2, rgba1, rgba0, 3) : [0, 0, 0, 255]
+        ];
+
+    // yea I know there is a lot of math in this inner loop.
+    // so sue me.
+    for (var yy = 0; yy < 4; ++yy) {
+        var pixels = src[colorOffset + 4 + yy];
+        for (var xx = 0; xx < 4; ++xx) {
+            var dstOff = ((destY + yy) * destWidth + destX + xx) * 4;
+            var code = (pixels >> (xx * 2)) & 0x3;
+            var srcColor = colors[code];
+            var alpha;
+            switch (format) {
+            case ext.COMPRESSED_SRGB_S3TC_DXT1_EXT:
+                alpha = 255;
+                break;
+            case ext.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT:
+                alpha = (code == 3 && !c0gtc1) ? 0 : 255;
+                break;
+            case ext.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT:
+                {
+                    var alpha0 = src[srcOffset + yy * 2 + Math.floor(xx / 2)];
+                    var alpha1 = (alpha0 >> ((xx % 2) * 4)) & 0xF;
+                    alpha = alpha1 | (alpha1 << 4);
+                }
+                break;
+            case ext.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT:
+                {
+                    var alpha0 = src[srcOffset + 0];
+                    var alpha1 = src[srcOffset + 1];
+                    var alphaOff = Math.floor(yy / 2) * 3 + 2;
+                    var alphaBits =
+                         src[srcOffset + alphaOff + 0] +
+                         src[srcOffset + alphaOff + 1] * 256 +
+                         src[srcOffset + alphaOff + 2] * 65536;
+                    var alphaShift = (yy % 2) * 12 + xx * 3;
+                    var alphaCode = (alphaBits >> alphaShift) & 0x7;
+                    if (alpha0 > alpha1) {
+                        switch (alphaCode) {
+                        case 0:
+                            alpha = alpha0;
+                            break;
+                        case 1:
+                            alpha = alpha1;
+                            break;
+                        default:
+                            alpha = ((8 - alphaCode) * alpha0 + (alphaCode - 1) * alpha1) / 7;
+                            break;
+                        }
+                    } else {
+                        switch (alphaCode) {
+                        case 0:
+                            alpha = alpha0;
+                            break;
+                        case 1:
+                            alpha = alpha1;
+                            break;
+                        case 6:
+                            alpha = 0;
+                            break;
+                        case 7:
+                            alpha = 255;
+                            break;
+                        default:
+                            alpha = ((6 - alphaCode) * alpha0 + (alphaCode - 1) * alpha1) / 5;
+                            break;
+                        }
+                    }
+                }
+                break;
+            default:
+                throw "bad format";
+            }
+            destBuffer[dstOff + 0] = sRGBChannelToLinear(srcColor[0]);
+            destBuffer[dstOff + 1] = sRGBChannelToLinear(srcColor[1]);
+            destBuffer[dstOff + 2] = sRGBChannelToLinear(srcColor[2]);
+            destBuffer[dstOff + 3] = alpha;
+        }
+    }
+}
+
+function getBlockSize(format) {
+  var isDXT1 = format == ext.COMPRESSED_SRGB_S3TC_DXT1_EXT ||
+               format == ext.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;
+  return isDXT1 ? 8 : 16;
+}
+
+function uncompressDXTSRGB(width, height, data, format) {
+    if (width % 4 || height % 4) throw "bad width or height";
+
+    var dest = new Uint8Array(width * height * 4);
+    var blocksAcross = width / 4;
+    var blocksDown = height / 4;
+    var blockSize = getBlockSize(format);
+    for (var yy = 0; yy < blocksDown; ++yy) {
+        for (var xx = 0; xx < blocksAcross; ++xx) {
+            uncompressDXTBlockSRGB(
+                dest, xx * 4, yy * 4, width, data,
+                (yy * blocksAcross + xx) * blockSize, format);
+        }
+    }
+    return dest;
+}
+
+function copyRect(data, srcX, srcY, dstX, dstY, width, height, stride) {
+  var bytesPerLine = width * 4;
+  var srcOffset = srcX * 4 + srcY * stride;
+  var dstOffset = dstX * 4 + dstY * stride;
+  for (; height > 0; --height) {
+    for (var ii = 0; ii < bytesPerLine; ++ii) {
+      data[dstOffset + ii] = data[srcOffset + ii];
+    }
+    srcOffset += stride;
+    dstOffset += stride;
+  }
+}
+
+function testDXTTexture(test, useTexStorage) {
+    var data = new Uint8Array(test.data);
+    var width = test.width;
+    var height = test.height;
+    var format = test.format;
+
+    var uncompressedData = uncompressDXTSRGB(width, height, data, format);
+
+    canvas.width = width;
+    canvas.height = height;
+    gl.viewport(0, 0, width, height);
+    debug("testing " + formatToString(format) + " " + width + "x" + height +
+          (useTexStorage ? " via texStorage2D" : " via compressedTexImage2D"));
+
+    var tex = gl.createTexture();
+    gl.bindTexture(gl.TEXTURE_2D, tex);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);
+    if (useTexStorage) {
+        gl.texStorage2D(gl.TEXTURE_2D, 1, format, width, height);
+        wtu.glErrorShouldBe(gl, gl.NO_ERROR, "allocating compressed texture via texStorage2D");
+        wtu.clearAndDrawUnitQuad(gl);
+        wtu.glErrorShouldBe(gl, gl.NO_ERROR, "drawing unit quad");
+        var clearColor = (test.hasAlpha ? [0, 0, 0, 0] : [0, 0, 0, 255]);
+        wtu.checkCanvas(gl, clearColor, "texture should be initialized to black");
+        gl.compressedTexSubImage2D(gl.TEXTURE_2D, 0, 0, 0, width, height, format, data);
+        wtu.glErrorShouldBe(gl, gl.NO_ERROR, "uploading compressed texture data via compressedTexSubImage2D");
+    } else {
+        gl.compressedTexImage2D(gl.TEXTURE_2D, 0, format, width, height, 0, data);
+        wtu.glErrorShouldBe(gl, gl.NO_ERROR, "uploading compressed texture");
+    }
+    gl.generateMipmap(gl.TEXTURE_2D);
+    wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION, "trying to generate mipmaps from compressed texture");
+    wtu.glErrorShouldBe(gl, gl.NO_ERROR, "after clearing generateMipmap error");
+    wtu.clearAndDrawUnitQuad(gl);
+    wtu.glErrorShouldBe(gl, gl.NO_ERROR, "drawing unit quad 1");
+    compareRect(width, height, test.channels, width, height, uncompressedData, data, format, "NEAREST");
+    // Test again with linear filtering.
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
+    wtu.clearAndDrawUnitQuad(gl);
+    wtu.glErrorShouldBe(gl, gl.NO_ERROR, "drawing unit quad 2");
+    compareRect(width, height, test.channels, width, height, uncompressedData, data, format, "LINEAR");
+
+    if (!useTexStorage) {
+        // It's not allowed to redefine textures defined via texStorage2D.
+        gl.compressedTexImage2D(gl.TEXTURE_2D, 0, format, width, height, 1, data);
+        wtu.glErrorShouldBe(gl, gl.INVALID_VALUE, "non 0 border");
+
+        gl.compressedTexImage2D(gl.TEXTURE_2D, 0, format, width + 4, height, 0, data);
+        wtu.glErrorShouldBe(gl, gl.INVALID_VALUE, "data size does not match dimensions");
+        gl.compressedTexImage2D(gl.TEXTURE_2D, 0, format, width, height + 4, 0, data);
+        wtu.glErrorShouldBe(gl, gl.INVALID_VALUE, "data size does not match dimensions");
+        gl.compressedTexImage2D(gl.TEXTURE_2D, 0, format, width - 4, height, 0, data);
+        wtu.glErrorShouldBe(gl, gl.INVALID_VALUE, "data size does not match dimensions");
+        gl.compressedTexImage2D(gl.TEXTURE_2D, 0, format, width, height - 4, 0, data);
+        wtu.glErrorShouldBe(gl, gl.INVALID_VALUE, "data size does not match dimensions");
+
+        gl.compressedTexImage2D(gl.TEXTURE_2D, 0, format, width - 1, height, 0, data);
+        wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION, "invalid dimensions");
+        gl.compressedTexImage2D(gl.TEXTURE_2D, 0, format, width - 2, height, 0, data);
+        wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION, "invalid dimensions");
+        gl.compressedTexImage2D(gl.TEXTURE_2D, 0, format, width, height - 1, 0, data);
+        wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION, "invalid dimensions");
+        gl.compressedTexImage2D(gl.TEXTURE_2D, 0, format, width, height - 2, 0, data);
+        wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION, "invalid dimensions");
+
+        if (width == 4) {
+            gl.compressedTexImage2D(gl.TEXTURE_2D, 1, format, 1, height, 0, data);
+            wtu.glErrorShouldBe(gl, gl.NO_ERROR, "valid dimensions for level > 0");
+            gl.compressedTexImage2D(gl.TEXTURE_2D, 1, format, 2, height, 0, data);
+            wtu.glErrorShouldBe(gl, gl.NO_ERROR, "valid dimensions for level > 0");
+        }
+        if (height == 4) {
+            gl.compressedTexImage2D(gl.TEXTURE_2D, 1, format, width, 1, 0, data);
+            wtu.glErrorShouldBe(gl, gl.NO_ERROR, "valid dimensions for level > 0");
+            gl.compressedTexImage2D(gl.TEXTURE_2D, 1, format, width, 2, 0, data);
+            wtu.glErrorShouldBe(gl, gl.NO_ERROR, "valid dimensions for level > 0");
+        }
+    }
+
+    // pick a wrong format that uses the same amount of data.
+    var wrongFormat;
+    switch (format) {
+    case ext.COMPRESSED_SRGB_S3TC_DXT1_EXT:
+      wrongFormat = ext.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;
+      break;
+    case ext.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT:
+      wrongFormat = ext.COMPRESSED_SRGB_S3TC_DXT1_EXT;
+      break;
+    case ext.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT:
+      wrongFormat = ext.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT;
+      break;
+    case ext.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT:
+      wrongFormat = ext.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;
+      break;
+    }
+
+    gl.compressedTexSubImage2D(gl.TEXTURE_2D, 0, 0, 0, width, height, wrongFormat, data);
+    wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION, "format does not match");
+
+    gl.compressedTexSubImage2D(gl.TEXTURE_2D, 0, 4, 0, width, height, format, data);
+    wtu.glErrorShouldBe(gl, gl.INVALID_VALUE, "dimension out of range");
+    gl.compressedTexSubImage2D(gl.TEXTURE_2D, 0, 0, 4, width, height, format, data);
+    wtu.glErrorShouldBe(gl, gl.INVALID_VALUE, "dimension out of range");
+
+    gl.compressedTexSubImage2D(gl.TEXTURE_2D, 0, 0, 0, width + 4, height, format, data);
+    wtu.glErrorShouldBe(gl, gl.INVALID_VALUE, "data size does not match dimensions");
+    gl.compressedTexSubImage2D(gl.TEXTURE_2D, 0, 0, 0, width, height + 4, format, data);
+    wtu.glErrorShouldBe(gl, gl.INVALID_VALUE, "data size does not match dimensions");
+    gl.compressedTexSubImage2D(gl.TEXTURE_2D, 0, 0, 0, width - 4, height, format, data);
+    wtu.glErrorShouldBe(gl, gl.INVALID_VALUE, "data size does not match dimensions");
+    gl.compressedTexSubImage2D(gl.TEXTURE_2D, 0, 0, 0, width, height - 4, format, data);
+    wtu.glErrorShouldBe(gl, gl.INVALID_VALUE, "data size does not match dimensions");
+
+    gl.compressedTexSubImage2D(gl.TEXTURE_2D, 0, 0, 0, width - 1, height, format, data);
+    wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION, "invalid dimensions");
+    gl.compressedTexSubImage2D(gl.TEXTURE_2D, 0, 0, 0, width - 2, height, format, data);
+    wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION, "invalid dimensions");
+    gl.compressedTexSubImage2D(gl.TEXTURE_2D, 0, 0, 0, width, height - 1, format, data);
+    wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION, "invalid dimensions");
+    gl.compressedTexSubImage2D(gl.TEXTURE_2D, 0, 0, 0, width, height - 2, format, data);
+    wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION, "invalid dimensions");
+
+    var subData = new Uint8Array(data.buffer, 0, getBlockSize(format));
+
+    if (width == 8 && height == 8) {
+        gl.compressedTexSubImage2D(gl.TEXTURE_2D, 0, 1, 0, 4, 4, format, subData);
+        wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION, "invalid offset");
+        gl.compressedTexSubImage2D(gl.TEXTURE_2D, 0, 0, 1, 4, 4, format, subData);
+        wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION, "invalid offset");
+    }
+
+    var stride = width * 4;
+    for (var yoff = 0; yoff < height; yoff += 4) {
+        for (var xoff = 0; xoff < width; xoff += 4) {
+            copyRect(uncompressedData, 0, 0, xoff, yoff, 4, 4, stride);
+            gl.compressedTexSubImage2D(gl.TEXTURE_2D, 0, xoff, yoff, 4, 4, format, subData);
+            wtu.glErrorShouldBe(gl, gl.NO_ERROR, "uploading compressed texture");
+            // First test NEAREST filtering.
+            gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);
+            gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);
+            wtu.clearAndDrawUnitQuad(gl);
+            compareRect(width, height, test.channels, width, height, uncompressedData, data, format, "NEAREST");
+            wtu.glErrorShouldBe(gl, gl.NO_ERROR, "drawing unit quad");
+            // Next test LINEAR filtering.
+            gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
+            gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
+            wtu.clearAndDrawUnitQuad(gl);
+            wtu.glErrorShouldBe(gl, gl.NO_ERROR, "drawing unit quad");
+            compareRect(width, height, test.channels, width, height, uncompressedData, data, format, "LINEAR");
+        }
+    }
+}
+
+function insertImg(element, caption, img) {
+    var div = document.createElement("div");
+    div.appendChild(img);
+    var label = document.createElement("div");
+    label.appendChild(document.createTextNode(caption));
+    div.appendChild(label);
+    element.appendChild(div);
+}
+
+function makeImage(imageWidth, imageHeight, dataWidth, data, alpha) {
+    var scale = 8;
+    var c = document.createElement("canvas");
+    c.width = imageWidth * scale;
+    c.height = imageHeight * scale;
+    var ctx = c.getContext("2d");
+    for (var yy = 0; yy < imageHeight; ++yy) {
+        for (var xx = 0; xx < imageWidth; ++xx) {
+            var offset = (yy * dataWidth + xx) * 4;
+            ctx.fillStyle = "rgba(" +
+                    data[offset + 0] + "," +
+                    data[offset + 1] + "," +
+                    data[offset + 2] + "," +
+                    (alpha ? data[offset + 3] / 255 : 1) + ")";
+            ctx.fillRect(xx * scale, yy * scale, scale, scale);
+        }
+    }
+    return wtu.makeImageFromCanvas(c);
+}
+
+// See EXT_texture_sRGB, Section 3.8.x, sRGB Texture Color Conversion.
+function sRGBChannelToLinear(value) {
+    value = value / 255;
+    if (value <= 0.04045) {
+        value = value / 12.92;
+    } else {
+        value = Math.pow((value + 0.055) / 1.055, 2.4);
+    }
+    return Math.trunc(value * 255 + 0.5);
+}
+
+function compareRect(
+        actualWidth, actualHeight, actualChannels,
+        dataWidth, dataHeight, expectedData,
+        testData, testFormat, filteringMode) {
+    var actual = new Uint8Array(actualWidth * actualHeight * 4);
+    gl.readPixels(
+            0, 0, actualWidth, actualHeight, gl.RGBA, gl.UNSIGNED_BYTE, actual);
+    wtu.glErrorShouldBe(gl, gl.NO_ERROR, "reading back pixels");
+
+    var div = document.createElement("div");
+    div.className = "testimages";
+    insertImg(div, "expected", makeImage(
+            actualWidth, actualHeight, dataWidth, expectedData,
+            actualChannels == 4));
+    insertImg(div, "actual", makeImage(
+            actualWidth, actualHeight, actualWidth, actual,
+            actualChannels == 4));
+    div.appendChild(document.createElement('br'));
+    document.getElementById("console").appendChild(div);
+
+    // This threshold is required because the values we get back from the
+    // implementation don't exactly match our javascript implementation.
+    // This is probably due to allowances in the way sRGB interacts with S3TC.
+    var threshold = 2;
+    var failed = false;
+    for (var yy = 0; yy < actualHeight; ++yy) {
+        for (var xx = 0; xx < actualWidth; ++xx) {
+            var actualOffset = (yy * actualWidth + xx) * 4;
+            var expectedOffset = (yy * dataWidth + xx) * 4;
+            var expected = [
+                    expectedData[expectedOffset + 0],
+                    expectedData[expectedOffset + 1],
+                    expectedData[expectedOffset + 2],
+                    (actualChannels == 3 ? 255 : expectedData[expectedOffset + 3])
+            ];
+            for (var jj = 0; jj < 4; ++jj) {
+                if (Math.abs(actual[actualOffset + jj] - expected[jj]) > threshold) {
+                    failed = true;
+                    var was = actual.slice(actualOffset, actualOffset + 4);
+                    testFailed('at (' + xx + ', ' + yy + ') expected: '
+                        + expected + ' ± ' + threshold + '; was ' + was);
+                }
+            }
+        }
+    }
+    if (!failed) {
+        testPassed("texture rendered correctly with " + filteringMode + " filtering");
+    }
+}
+
+debug("");
+var successfullyParsed = true;
+</script>
+<script src="../../js/js-test-post.js"></script>
+
+</body>
+</html>
--- a/dom/canvas/test/webgl-conf/checkout/conformance/extensions/webgl-compressed-texture-s3tc.html
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/extensions/webgl-compressed-texture-s3tc.html
@@ -179,16 +179,17 @@ function runTestExtension() {
     // check that all format enums exist.
     for (name in validFormats) {
         var expected = "0x" + validFormats[name].toString(16);
         var actual = "ext['" + name + "']";
         shouldBe(actual, expected);
     }
 
     supportedFormats = gl.getParameter(gl.COMPRESSED_TEXTURE_FORMATS);
+    // There should be exactly 4 formats for both WebGL 1.0 and WebGL 2.0.
     shouldBe("supportedFormats.length", "4");
 
     // check that all 4 formats exist
     for (var name in validFormats.length) {
         formatExists(validFormats[name], supportedFormats);
     }
 
     // Test each format
@@ -208,16 +209,21 @@ function testDXT1_RGB() {
             hasAlpha: false,
         },
         {   width: 8,
             height: 8,
             channels: 3,
             data: img_8x8_rgb_dxt1,
             format: ext.COMPRESSED_RGB_S3TC_DXT1_EXT,
             hasAlpha: false,
+            subX0: 0,
+            subY0: 0,
+            subWidth: 4,
+            subHeight: 4,
+            subData: img_4x4_rgb_dxt1
         }
     ];
     testDXTTextures(tests);
 }
 
 function testDXT1_RGBA() {
     var tests = [
         {   width: 4,
@@ -231,17 +237,16 @@ function testDXT1_RGBA() {
         },
         {   width: 8,
             height: 8,
             channels: 4,
             data: img_8x8_rgba_dxt1,
             format: ext.COMPRESSED_RGBA_S3TC_DXT1_EXT,
             // This is a special case -- the texture is still opaque
             // though it's RGBA.
-            hasAlpha: false,
         }
     ];
     testDXTTextures(tests);
 }
 
 function testDXT3_RGBA() {
     var tests = [
         {   width: 4,
@@ -252,16 +257,21 @@ function testDXT3_RGBA() {
             hasAlpha: true,
         },
         {   width: 8,
             height: 8,
             channels: 4,
             data: img_8x8_rgba_dxt3,
             format: ext.COMPRESSED_RGBA_S3TC_DXT3_EXT,
             hasAlpha: true,
+            subX0: 0,
+            subY0: 0,
+            subWidth: 4,
+            subHeight: 4,
+            subData: img_4x4_rgba_dxt3
         }
     ];
     testDXTTextures(tests);
 }
 
 function testDXT5_RGBA() {
     var tests = [
         {   width: 4,
@@ -272,16 +282,21 @@ function testDXT5_RGBA() {
             hasAlpha: true,
         },
         {   width: 8,
             height: 8,
             channels: 4,
             data: img_8x8_rgba_dxt5,
             format: ext.COMPRESSED_RGBA_S3TC_DXT5_EXT,
             hasAlpha: true,
+            subX0: 0,
+            subY0: 0,
+            subWidth: 4,
+            subHeight: 4,
+            subData: img_4x4_rgba_dxt5
         }
     ];
     testDXTTextures(tests);
 }
 
 function testDXTTextures(tests) {
     debug("<hr/>");
     for (var ii = 0; ii < tests.length; ++ii) {
@@ -424,16 +439,35 @@ function uncompressDXT(width, height, da
             uncompressDXTBlock(
                 dest, xx * 4, yy * 4, width, data,
                 (yy * blocksAcross + xx) * blockSize, format);
         }
     }
     return dest;
 }
 
+function uncompressDXTIntoSubRegion(width, height, subX0, subY0, subWidth, subHeight, data, format)
+{
+    if (width % 4 || height % 4 || subX0 % 4 || subY0 % 4 || subWidth % 4 || subHeight % 4)
+        throw "bad dimension";
+
+    var dest = new Uint8Array(width * height * 4);
+    var blocksAcross = subWidth / 4;
+    var blocksDown = subHeight / 4;
+    var blockSize = getBlockSize(format);
+    for (var yy = 0; yy < blocksDown; ++yy) {
+        for (var xx = 0; xx < blocksAcross; ++xx) {
+            uncompressDXTBlock(
+                dest, subX0 + xx * 4, subY0 + yy * 4, width, data,
+                (yy * blocksAcross + xx) * blockSize, format);
+        }
+    }
+    return dest;
+}
+
 function copyRect(data, srcX, srcY, dstX, dstY, width, height, stride) {
   var bytesPerLine = width * 4;
   var srcOffset = srcX * 4 + srcY * stride;
   var dstOffset = dstX * 4 + dstY * stride;
   for (; height > 0; --height) {
     for (var ii = 0; ii < bytesPerLine; ++ii) {
       data[dstOffset + ii] = data[srcOffset + ii];
     }
@@ -458,16 +492,41 @@ function testDXTTexture(test, useTexStor
 
     var tex = gl.createTexture();
     gl.bindTexture(gl.TEXTURE_2D, tex);
     gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
     gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
     gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);
     gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);
     if (useTexStorage) {
+        if (test.subData) {
+            var uncompressedDataSub = uncompressDXTIntoSubRegion(
+                width, height, test.subX0, test.subY0, test.subWidth, test.subHeight, test.subData, format);
+            var tex1 = gl.createTexture();
+            gl.bindTexture(gl.TEXTURE_2D, tex1);
+            gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
+            gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
+            gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);
+            gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);
+
+            gl.texStorage2D(gl.TEXTURE_2D, 1, format, width, height);
+            wtu.glErrorShouldBe(gl, gl.NO_ERROR, "allocating compressed texture via texStorage2D");
+            gl.compressedTexSubImage2D(
+                gl.TEXTURE_2D, 0, test.subX0, test.subY0, test.subWidth, test.subHeight, format, test.subData);
+            wtu.glErrorShouldBe(gl, gl.NO_ERROR, "uploading compressed texture data via compressedTexSubImage2D");
+
+            wtu.clearAndDrawUnitQuad(gl);
+            wtu.glErrorShouldBe(gl, gl.NO_ERROR, "drawing unit quad 1");
+            compareRect(width, height, test.channels, uncompressedDataSub, "NEAREST");
+
+            // Clean up and recover
+            gl.deleteTexture(tex1);
+            gl.bindTexture(gl.TEXTURE_2D, tex);
+        }
+
         gl.texStorage2D(gl.TEXTURE_2D, 1, format, width, height);
         wtu.glErrorShouldBe(gl, gl.NO_ERROR, "allocating compressed texture via texStorage2D");
         wtu.clearAndDrawUnitQuad(gl);
         wtu.glErrorShouldBe(gl, gl.NO_ERROR, "drawing unit quad");
         var clearColor = (test.hasAlpha ? [0, 0, 0, 0] : [0, 0, 0, 255]);
         wtu.checkCanvas(gl, clearColor, "texture should be initialized to black");
         gl.compressedTexSubImage2D(gl.TEXTURE_2D, 0, 0, 0, width, height, format, data);
         wtu.glErrorShouldBe(gl, gl.NO_ERROR, "uploading compressed texture data via compressedTexSubImage2D");
@@ -475,23 +534,23 @@ function testDXTTexture(test, useTexStor
         gl.compressedTexImage2D(gl.TEXTURE_2D, 0, format, width, height, 0, data);
         wtu.glErrorShouldBe(gl, gl.NO_ERROR, "uploading compressed texture");
     }
     gl.generateMipmap(gl.TEXTURE_2D);
     wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION, "trying to generate mipmaps from compressed texture");
     wtu.glErrorShouldBe(gl, gl.NO_ERROR, "after clearing generateMipmap error");
     wtu.clearAndDrawUnitQuad(gl);
     wtu.glErrorShouldBe(gl, gl.NO_ERROR, "drawing unit quad 1");
-    compareRect(width, height, test.channels, width, height, uncompressedData, data, format, "NEAREST");
+    compareRect(width, height, test.channels, uncompressedData, "NEAREST");
     // Test again with linear filtering.
     gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
     gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
     wtu.clearAndDrawUnitQuad(gl);
     wtu.glErrorShouldBe(gl, gl.NO_ERROR, "drawing unit quad 2");
-    compareRect(width, height, test.channels, width, height, uncompressedData, data, format, "LINEAR");
+    compareRect(width, height, test.channels, uncompressedData, "LINEAR");
 
     if (!useTexStorage) {
         // It's not allowed to redefine textures defined via texStorage2D.
         gl.compressedTexImage2D(gl.TEXTURE_2D, 0, format, width, height, 1, data);
         wtu.glErrorShouldBe(gl, gl.INVALID_VALUE, "non 0 border");
 
         gl.compressedTexImage2D(gl.TEXTURE_2D, 0, format, width + 4, height, 0, data);
         wtu.glErrorShouldBe(gl, gl.INVALID_VALUE, "data size does not match dimensions");
@@ -582,93 +641,85 @@ function testDXTTexture(test, useTexStor
         for (var xoff = 0; xoff < width; xoff += 4) {
             copyRect(uncompressedData, 0, 0, xoff, yoff, 4, 4, stride);
             gl.compressedTexSubImage2D(gl.TEXTURE_2D, 0, xoff, yoff, 4, 4, format, subData);
             wtu.glErrorShouldBe(gl, gl.NO_ERROR, "uploading compressed texture");
             // First test NEAREST filtering.
             gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);
             gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);
             wtu.clearAndDrawUnitQuad(gl);
-            compareRect(width, height, test.channels, width, height, uncompressedData, data, format, "NEAREST");
+            compareRect(width, height, test.channels, uncompressedData, "NEAREST");
             wtu.glErrorShouldBe(gl, gl.NO_ERROR, "drawing unit quad");
             // Next test LINEAR filtering.
             gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
             gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
             wtu.clearAndDrawUnitQuad(gl);
             wtu.glErrorShouldBe(gl, gl.NO_ERROR, "drawing unit quad");
-            compareRect(width, height, test.channels, width, height, uncompressedData, data, format, "LINEAR");
+            compareRect(width, height, test.channels, uncompressedData, "LINEAR");
         }
     }
 }
 
 function insertImg(element, caption, img) {
     var div = document.createElement("div");
     div.appendChild(img);
     var label = document.createElement("div");
     label.appendChild(document.createTextNode(caption));
     div.appendChild(label);
     element.appendChild(div);
 }
 
-function makeImage(imageWidth, imageHeight, dataWidth, data, alpha) {
+function makeImage(imageWidth, imageHeight, data, alpha) {
     var scale = 8;
     var c = document.createElement("canvas");
     c.width = imageWidth * scale;
     c.height = imageHeight * scale;
     var ctx = c.getContext("2d");
     for (var yy = 0; yy < imageHeight; ++yy) {
         for (var xx = 0; xx < imageWidth; ++xx) {
-            var offset = (yy * dataWidth + xx) * 4;
+            var offset = (yy * imageWidth + xx) * 4;
             ctx.fillStyle = "rgba(" +
                     data[offset + 0] + "," +
                     data[offset + 1] + "," +
                     data[offset + 2] + "," +
                     (alpha ? data[offset + 3] / 255 : 1) + ")";
             ctx.fillRect(xx * scale, yy * scale, scale, scale);
         }
     }
     return wtu.makeImageFromCanvas(c);
 }
-function compareRect(
-        actualWidth, actualHeight, actualChannels,
-        dataWidth, dataHeight, expectedData,
-        testData, testFormat, filteringMode) {
-    var actual = new Uint8Array(actualWidth * actualHeight * 4);
-    gl.readPixels(
-            0, 0, actualWidth, actualHeight, gl.RGBA, gl.UNSIGNED_BYTE, actual);
+
+function compareRect(width, height, channels, expectedData, filteringMode) {
+    var actual = new Uint8Array(width * height * 4);
+    gl.readPixels(0, 0, width, height, gl.RGBA, gl.UNSIGNED_BYTE, actual);
     wtu.glErrorShouldBe(gl, gl.NO_ERROR, "reading back pixels");
 
     var div = document.createElement("div");
     div.className = "testimages";
-    insertImg(div, "expected", makeImage(
-            actualWidth, actualHeight, dataWidth, expectedData,
-            actualChannels == 4));
-    insertImg(div, "actual", makeImage(
-            actualWidth, actualHeight, actualWidth, actual,
-            actualChannels == 4));
+    insertImg(div, "expected", makeImage(width, height, expectedData, channels == 4));
+    insertImg(div, "actual", makeImage(width, height, actual, channels == 4));
     div.appendChild(document.createElement('br'));
     document.getElementById("console").appendChild(div);
 
     var failed = false;
-    for (var yy = 0; yy < actualHeight; ++yy) {
-        for (var xx = 0; xx < actualWidth; ++xx) {
-            var actualOffset = (yy * actualWidth + xx) * 4;
-            var expectedOffset = (yy * dataWidth + xx) * 4;
+    for (var yy = 0; yy < height; ++yy) {
+        for (var xx = 0; xx < width; ++xx) {
+            var offset = (yy * width + xx) * 4;
             var expected = [
-                    expectedData[expectedOffset + 0],
-                    expectedData[expectedOffset + 1],
-                    expectedData[expectedOffset + 2],
-                    (actualChannels == 3 ? 255 : expectedData[expectedOffset + 3])
+                expectedData[offset + 0],
+                expectedData[offset + 1],
+                expectedData[offset + 2],
+                (channels == 3 ? 255 : expectedData[offset + 3])
             ];
             for (var jj = 0; jj < 4; ++jj) {
-                if (actual[actualOffset + jj] != expected[jj]) {
+                if (actual[offset + jj] != expected[jj]) {
                     failed = true;
-                    var was = actual[actualOffset + 0].toString();
+                    var was = actual[offset + 0].toString();
                     for (var j = 1; j < 4; ++j) {
-                        was += "," + actual[actualOffset + j];
+                        was += "," + actual[offset + j];
                     }
                     testFailed('at (' + xx + ', ' + yy +
                                          ') expected: ' + expected + ' was ' + was);
                 }
             }
         }
     }
     if (!failed) {
--- a/dom/canvas/test/webgl-conf/checkout/conformance/extensions/webgl-debug-shaders.html
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/extensions/webgl-debug-shaders.html
@@ -135,16 +135,17 @@ function runTestEnabled() {
     }
 
     // Test changing the source. Make sure we get the correct source each time.
     debug("test changing source");
     shader = gl.createShader(gl.FRAGMENT_SHADER);
     gl.shaderSource(shader, "void main() { gl_FragColor = vec4(gl_FragCoord.x, 0.0, 0.0, 1.0); }");
     gl.compileShader(shader);
     shouldBeTrue("gl.getShaderParameter(shader, gl.COMPILE_STATUS)");
+    shouldThrow("ext.getTranslatedShaderSource(null)");
     translatedSource = ext.getTranslatedShaderSource(shader);
     shouldBeTrue('translatedSource && translatedSource.indexOf("gl_FragCoord") >= 0');
     // change the source but don't compile.
     gl.shaderSource(shader, "void main() { gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0); }");
     // the source should NOT change. It should be the same as the old source.
     newTranslatedSource = ext.getTranslatedShaderSource(shader);
     shouldBe('newTranslatedSource', 'translatedSource');
     // now compile.
--- a/dom/canvas/test/webgl-conf/checkout/conformance/extensions/webgl-depth-texture.html
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/extensions/webgl-depth-texture.html
@@ -195,143 +195,157 @@ function runTestExtension() {
           'TEXTURE_CUBE_MAP_NEGATIVE_Y',
           'TEXTURE_CUBE_MAP_POSITIVE_Z',
           'TEXTURE_CUBE_MAP_NEGATIVE_Z'
         ];
         for (var tt = 0; tt < targets.length; ++tt) {
             wtu.shouldGenerateGLError(gl, gl.INVALID_OPERATION, 'gl.texImage2D(gl.' + targets[ii] + ', 1, gl.' + typeInfo.format + ', 1, 1, 0, gl.' + typeInfo.format + ', ' + typeStr + ', null)');
         }
 
-        // check 2d textures.
-        tex = gl.createTexture();
-        gl.bindTexture(gl.TEXTURE_2D, tex);
-        gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
-        gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
-        gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
-        gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
-
-        // test level > 0
-        wtu.shouldGenerateGLError(gl, gl.INVALID_OPERATION, 'gl.texImage2D(gl.TEXTURE_2D, 1, gl.' + typeInfo.format + ', 1, 1, 0, gl.' + typeInfo.format + ', ' + typeStr + ', null)');
-
-        // test with data
-        wtu.shouldGenerateGLError(gl, gl.INVALID_OPERATION, 'gl.texImage2D(gl.TEXTURE_2D, 0, gl.' + typeInfo.format + ', 1, 1, 0, gl.' + typeInfo.format + ', ' + typeStr + ', ' + typeInfo.data + ')');
-
-        // test with canvas
-        wtu.shouldGenerateGLError(gl, [gl.INVALID_VALUE, gl.INVALID_ENUM, gl.INVALID_OPERATION], 'gl.texImage2D(gl.TEXTURE_2D, 0, gl.' + typeInfo.format + ', gl.' + typeInfo.format + ', ' + typeStr  + ', canvas2)');
-
-        // test copyTexImage2D
-        wtu.shouldGenerateGLError(gl, [gl.INVALID_ENUM, gl.INVALID_OPERATION], 'gl.copyTexImage2D(gl.TEXTURE_2D, 0, gl.' + typeInfo.format + ', 0, 0, 1, 1, 0)');
-
-        // test real thing
-        wtu.shouldGenerateGLError(gl, gl.NO_ERROR, 'gl.texImage2D(gl.TEXTURE_2D, 0, gl.' + typeInfo.format + ', ' + res + ', ' + res + ', 0, gl.' + typeInfo.format + ', ' + typeStr + ', null)');
-
-        // test texSubImage2D
-        wtu.shouldGenerateGLError(gl, gl.INVALID_OPERATION, 'gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, 1, 1, gl.' + typeInfo.format + ', ' + typeStr  + ', ' + typeInfo.data + ')');
+        // The WebGL_depth_texture extension supports both NEAREST and
+        // LINEAR filtering for depth textures, even though LINEAR
+        // doesn't have much meaning, and isn't supported in WebGL
+        // 2.0. Still, test both.
+        var filterModes = [
+          'LINEAR',
+          'NEAREST'
+        ];
 
-        // test copyTexSubImage2D
-        wtu.shouldGenerateGLError(gl, gl.INVALID_OPERATION, 'gl.copyTexSubImage2D(gl.TEXTURE_2D, 0, 0, 0, 0, 0, 1, 1)');
-
-        // test generateMipmap
-        wtu.shouldGenerateGLError(gl, gl.INVALID_OPERATION, 'gl.generateMipmap(gl.TEXTURE_2D)');
-
-        var fbo = gl.createFramebuffer();
-        gl.bindFramebuffer(gl.FRAMEBUFFER, fbo);
-        gl.framebufferTexture2D(gl.FRAMEBUFFER, gl[typeInfo.attachment], gl.TEXTURE_2D, tex, 0);
+        for (var jj = 0; jj < filterModes.length; ++jj) {
+            debug('testing ' + filterModes[jj] + ' filtering');
+            var filterMode = gl[filterModes[jj]];
 
-        // Ensure DEPTH_BITS returns >= 16 bits for UNSIGNED_SHORT and UNSIGNED_INT, >= 24 UNSIGNED_INT_24_8_WEBGL.
-        // If there is stencil, ensure STENCIL_BITS reports >= 8 for UNSIGNED_INT_24_8_WEBGL.
-        shouldBeGreaterThanOrEqual('gl.getParameter(gl.DEPTH_BITS)', typeInfo.depthBits);
-        if (typeInfo.stencilBits === undefined) {
-            shouldBe('gl.getParameter(gl.STENCIL_BITS)', '0');
-        } else {
-            shouldBeGreaterThanOrEqual('gl.getParameter(gl.STENCIL_BITS)', typeInfo.stencilBits);
-        }
-
-        // TODO: remove this check if the spec is updated to require these combinations to work.
-        if (gl.checkFramebufferStatus(gl.FRAMEBUFFER) != gl.FRAMEBUFFER_COMPLETE)
-        {
-            // try adding a color buffer.
-            var colorTex = gl.createTexture();
-            gl.bindTexture(gl.TEXTURE_2D, colorTex);
+            // check 2d textures.
+            tex = gl.createTexture();
+            gl.bindTexture(gl.TEXTURE_2D, tex);
             gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
             gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
-            gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
-            gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
-            gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, res, res, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
-            gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, colorTex, 0);
-        }
+            gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, filterMode);
+            gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, filterMode);
+
+            // test level > 0
+            wtu.shouldGenerateGLError(gl, gl.INVALID_OPERATION, 'gl.texImage2D(gl.TEXTURE_2D, 1, gl.' + typeInfo.format + ', 1, 1, 0, gl.' + typeInfo.format + ', ' + typeStr + ', null)');
+
+            // test with data
+            wtu.shouldGenerateGLError(gl, gl.INVALID_OPERATION, 'gl.texImage2D(gl.TEXTURE_2D, 0, gl.' + typeInfo.format + ', 1, 1, 0, gl.' + typeInfo.format + ', ' + typeStr + ', ' + typeInfo.data + ')');
 
-        shouldBe('gl.checkFramebufferStatus(gl.FRAMEBUFFER)', 'gl.FRAMEBUFFER_COMPLETE');
+            // test with canvas
+            wtu.shouldGenerateGLError(gl, [gl.INVALID_VALUE, gl.INVALID_ENUM, gl.INVALID_OPERATION], 'gl.texImage2D(gl.TEXTURE_2D, 0, gl.' + typeInfo.format + ', gl.' + typeInfo.format + ', ' + typeStr  + ', canvas2)');
+
+            // test copyTexImage2D
+            wtu.shouldGenerateGLError(gl, [gl.INVALID_ENUM, gl.INVALID_OPERATION], 'gl.copyTexImage2D(gl.TEXTURE_2D, 0, gl.' + typeInfo.format + ', 0, 0, 1, 1, 0)');
+
+            // test real thing
+            wtu.shouldGenerateGLError(gl, gl.NO_ERROR, 'gl.texImage2D(gl.TEXTURE_2D, 0, gl.' + typeInfo.format + ', ' + res + ', ' + res + ', 0, gl.' + typeInfo.format + ', ' + typeStr + ', null)');
 
-        // use the default texture to render with while we return to the depth texture.
-        gl.bindTexture(gl.TEXTURE_2D, null);
+            // test texSubImage2D
+            wtu.shouldGenerateGLError(gl, gl.INVALID_OPERATION, 'gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, 1, 1, gl.' + typeInfo.format + ', ' + typeStr  + ', ' + typeInfo.data + ')');
+
+            // test copyTexSubImage2D
+            wtu.shouldGenerateGLError(gl, gl.INVALID_OPERATION, 'gl.copyTexSubImage2D(gl.TEXTURE_2D, 0, 0, 0, 0, 0, 1, 1)');
+
+            // test generateMipmap
+            wtu.shouldGenerateGLError(gl, gl.INVALID_OPERATION, 'gl.generateMipmap(gl.TEXTURE_2D)');
 
-        // render the z-quad
-        gl.enable(gl.DEPTH_TEST);
-        gl.clearColor(1, 0, 0, 1);
-        gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
-        gl.drawArrays(gl.TRIANGLES, 0, 6);
+            var fbo = gl.createFramebuffer();
+            gl.bindFramebuffer(gl.FRAMEBUFFER, fbo);
+            gl.framebufferTexture2D(gl.FRAMEBUFFER, gl[typeInfo.attachment], gl.TEXTURE_2D, tex, 0);
 
-        dumpIt(gl, res, "--first--");
+            // Ensure DEPTH_BITS returns >= 16 bits for UNSIGNED_SHORT and UNSIGNED_INT, >= 24 UNSIGNED_INT_24_8_WEBGL.
+            // If there is stencil, ensure STENCIL_BITS reports >= 8 for UNSIGNED_INT_24_8_WEBGL.
+            shouldBeGreaterThanOrEqual('gl.getParameter(gl.DEPTH_BITS)', typeInfo.depthBits);
+            if (typeInfo.stencilBits === undefined) {
+                shouldBe('gl.getParameter(gl.STENCIL_BITS)', '0');
+            } else {
+                shouldBeGreaterThanOrEqual('gl.getParameter(gl.STENCIL_BITS)', typeInfo.stencilBits);
+            }
 
-        // render the depth texture.
-        gl.bindFramebuffer(gl.FRAMEBUFFER, null);
-        gl.bindTexture(gl.TEXTURE_2D, tex);
-        gl.clearColor(0, 0, 1, 1);
-        gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
-        gl.drawArrays(gl.TRIANGLES, 0, 6);
+            // TODO: remove this check if the spec is updated to require these combinations to work.
+            if (gl.checkFramebufferStatus(gl.FRAMEBUFFER) != gl.FRAMEBUFFER_COMPLETE)
+            {
+                // try adding a color buffer.
+                var colorTex = gl.createTexture();
+                gl.bindTexture(gl.TEXTURE_2D, colorTex);
+                gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
+                gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
+                gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
+                gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
+                gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, res, res, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
+                gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, colorTex, 0);
+            }
 
-        var actualPixels = new Uint8Array(res * res * 4);
-        gl.readPixels(0, 0, res, res, gl.RGBA, gl.UNSIGNED_BYTE, actualPixels);
+            shouldBe('gl.checkFramebufferStatus(gl.FRAMEBUFFER)', 'gl.FRAMEBUFFER_COMPLETE');
+
+            // use the default texture to render with while we return to the depth texture.
+            gl.bindTexture(gl.TEXTURE_2D, null);
 
-        dumpIt(gl, res, "--depth--");
+            // render the z-quad
+            gl.enable(gl.DEPTH_TEST);
+            gl.clearColor(1, 0, 0, 1);
+            gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+            gl.drawArrays(gl.TRIANGLES, 0, 6);
+
+            dumpIt(gl, res, "--first--");
 
-        // Check that each pixel's R value is less than that of the previous pixel
-        // in either direction. Basically verify we have a gradient.
-        var success = true;
-        for (var yy = 0; yy < res; ++yy) {
-          for (var xx = 0; xx < res; ++xx) {
-            var actual = (yy * res + xx) * 4;
-            var left = actual - 4;
-            var down = actual - res * 4;
+            // render the depth texture.
+            gl.bindFramebuffer(gl.FRAMEBUFFER, null);
+            gl.bindTexture(gl.TEXTURE_2D, tex);
+            gl.clearColor(0, 0, 1, 1);
+            gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+            gl.drawArrays(gl.TRIANGLES, 0, 6);
+
+            var actualPixels = new Uint8Array(res * res * 4);
+            gl.readPixels(0, 0, res, res, gl.RGBA, gl.UNSIGNED_BYTE, actualPixels);
+
+            dumpIt(gl, res, "--depth--");
 
-            if (xx > 0) {
-              if (actualPixels[actual] <= actualPixels[left]) {
-                  testFailed("actual(" + actualPixels[actual] + ") < left(" + actualPixels[left] + ")");
-                  success = false;
-              }
-            }
-            if (yy > 0) {
-                if (actualPixels[actual] <= actualPixels[down]) {
-                    testFailed("actual(" + actualPixels[actual] + ") < down(" + actualPixels[down] + ")");
-                    success = false;
+            // Check that each pixel's R value is less than that of the previous pixel
+            // in either direction. Basically verify we have a gradient.
+            var success = true;
+            for (var yy = 0; yy < res; ++yy) {
+                for (var xx = 0; xx < res; ++xx) {
+                    var actual = (yy * res + xx) * 4;
+                    var left = actual - 4;
+                    var down = actual - res * 4;
+
+                    if (xx > 0) {
+                        if (actualPixels[actual] <= actualPixels[left]) {
+                            testFailed("actual(" + actualPixels[actual] + ") < left(" + actualPixels[left] + ")");
+                            success = false;
+                        }
+                    }
+                    if (yy > 0) {
+                        if (actualPixels[actual] <= actualPixels[down]) {
+                            testFailed("actual(" + actualPixels[actual] + ") < down(" + actualPixels[down] + ")");
+                            success = false;
+                        }
+                    }
                 }
             }
-          }
-        }
 
-        // Check that bottom left corner is vastly different thatn top right.
-        if (actualPixels[(res * res - 1) * 4] - actualPixels[0] < 0xC0) {
-            testFailed("corners are not different enough");
-            success = false;
-        }
+            // Check that bottom left corner is vastly different thatn top right.
+            if (actualPixels[(res * res - 1) * 4] - actualPixels[0] < 0xC0) {
+                testFailed("corners are not different enough");
+                success = false;
+            }
+
+            if (success) {
+                testPassed("depth texture rendered correctly.");
+            }
 
-        if (success) {
-            testPassed("depth texture rendered correctly.");
+            // check limitations
+            gl.bindFramebuffer(gl.FRAMEBUFFER, fbo);
+            gl.framebufferTexture2D(gl.FRAMEBUFFER, gl[typeInfo.attachment], gl.TEXTURE_2D, null, 0);
+            var badAttachment = typeInfo.attachment == 'DEPTH_ATTACHMENT' ? 'DEPTH_STENCIL_ATTACHMENT' : 'DEPTH_ATTACHMENT';
+            wtu.shouldGenerateGLError(gl, gl.NO_ERROR, 'gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.' + badAttachment + ', gl.TEXTURE_2D, tex, 0)');
+            shouldNotBe('gl.checkFramebufferStatus(gl.FRAMEBUFFER)', 'gl.FRAMEBUFFER_COMPLETE');
+            wtu.shouldGenerateGLError(gl, gl.INVALID_FRAMEBUFFER_OPERATION, 'gl.clear(gl.DEPTH_BUFFER_BIT)');
+            gl.bindFramebuffer(gl.FRAMEBUFFER, null);
+            shouldBe('gl.getError()', 'gl.NO_ERROR');
         }
-
-        // check limitations
-        gl.bindFramebuffer(gl.FRAMEBUFFER, fbo);
-        gl.framebufferTexture2D(gl.FRAMEBUFFER, gl[typeInfo.attachment], gl.TEXTURE_2D, null, 0);
-        var badAttachment = typeInfo.attachment == 'DEPTH_ATTACHMENT' ? 'DEPTH_STENCIL_ATTACHMENT' : 'DEPTH_ATTACHMENT';
-        wtu.shouldGenerateGLError(gl, gl.NO_ERROR, 'gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.' + badAttachment + ', gl.TEXTURE_2D, tex, 0)');
-        shouldNotBe('gl.checkFramebufferStatus(gl.FRAMEBUFFER)', 'gl.FRAMEBUFFER_COMPLETE');
-        wtu.shouldGenerateGLError(gl, gl.INVALID_FRAMEBUFFER_OPERATION, 'gl.clear(gl.DEPTH_BUFFER_BIT)');
-        gl.bindFramebuffer(gl.FRAMEBUFFER, null);
-        shouldBe('gl.getError()', 'gl.NO_ERROR');
     }
 }
 
 debug("");
 var successfullyParsed = true;
 </script>
 <script src="../../js/js-test-post.js"></script>
 </body>
new file mode 100644
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/extensions/webgl-draw-buffers-framebuffer-unsupported.html
@@ -0,0 +1,147 @@
+<!--
+
+/*
+** Copyright (c) 2016 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL WEBGL_draw_buffers FRAMEBUFFER_UNSUPPORTED Test</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src="../../js/js-test-pre.js"></script>
+<script src="../../js/webgl-test-utils.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<canvas id="canvas" width="2" height="2"> </canvas>
+
+<script>
+"use strict";
+var wtu = WebGLTestUtils;
+var gl;
+var canvas = document.getElementById("canvas");
+var fb1 = null;
+var fb2 = null;
+
+function checkFramebuffer(expected) {
+    var actual = gl.checkFramebufferStatus(gl.FRAMEBUFFER);
+    if (expected.indexOf(actual) < 0) {
+        var msg = "checkFramebufferStatus expects [";
+        for (var index = 0; index < expected.length; ++index) {
+            msg += wtu.glEnumToString(gl, expected[index]);
+            if (index + 1 < expected.length)
+                msg += ", ";
+        }
+        msg += "], was " + wtu.glEnumToString(gl, actual);
+        testFailed(msg);
+    } else {
+        var msg = "checkFramebufferStatus got " + wtu.glEnumToString(gl, actual) +
+                  " as expected";
+        testPassed(msg);
+    }
+}
+
+function testImageAttachedTwoPoints() {
+    debug("");
+    debug("Checking an image is attached to more than one color attachment in a framebuffer.");
+
+    var tex1 = gl.createTexture();
+    var tex2 = gl.createTexture();
+    gl.bindTexture(gl.TEXTURE_2D, tex1);
+    gl.texImage2D(gl.TEXTURE_2D,
+                  0,                                          // level
+                  gl.RGBA,                                    // internalFormat
+                  1,                                          // width
+                  1,                                          // height
+                  0,                                          // border
+                  gl.RGBA,                                    // format
+                  gl.UNSIGNED_BYTE,                           // type
+                  new Uint8Array(4));                         // data
+    gl.bindTexture(gl.TEXTURE_2D, tex2);
+    gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 1, 1, 0, gl.RGBA, gl.UNSIGNED_BYTE, new Uint8Array(4));
+    wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Texture creation should succeed.");
+
+    gl.bindFramebuffer(gl.FRAMEBUFFER, fb1);
+    gl.framebufferTexture2D(gl.FRAMEBUFFER, ext.COLOR_ATTACHMENT0_WEBGL, gl.TEXTURE_2D, tex1, 0);
+    checkFramebuffer([gl.FRAMEBUFFER_COMPLETE]);
+    gl.framebufferTexture2D(gl.FRAMEBUFFER, ext.COLOR_ATTACHMENT1_WEBGL, gl.TEXTURE_2D, tex2, 0);
+    checkFramebuffer([gl.FRAMEBUFFER_COMPLETE]);
+    gl.framebufferTexture2D(gl.FRAMEBUFFER, ext.COLOR_ATTACHMENT2_WEBGL, gl.TEXTURE_2D, tex1, 0);
+    checkFramebuffer([gl.FRAMEBUFFER_UNSUPPORTED]);
+
+    gl.bindFramebuffer(gl.FRAMEBUFFER, null);
+    gl.bindFramebuffer(gl.FRAMEBUFFER, fb2);
+    var texCube = gl.createTexture();
+    gl.bindTexture(gl.TEXTURE_CUBE_MAP, texCube);
+    for (var target = gl.TEXTURE_CUBE_MAP_POSITIVE_X; target < gl.TEXTURE_CUBE_MAP_POSITIVE_X + 6; target++) {
+        gl.texImage2D(target, 0, gl.RGBA, 1, 1, 0, gl.RGBA, gl.UNSIGNED_BYTE, new Uint8Array(4));
+    }
+    gl.framebufferTexture2D(gl.FRAMEBUFFER, ext.COLOR_ATTACHMENT0_WEBGL, gl.TEXTURE_CUBE_MAP_POSITIVE_X, texCube, 0);
+    checkFramebuffer([gl.FRAMEBUFFER_COMPLETE]);
+    gl.framebufferTexture2D(gl.FRAMEBUFFER, ext.COLOR_ATTACHMENT1_WEBGL, gl.TEXTURE_CUBE_MAP_POSITIVE_Y, texCube, 0);
+    checkFramebuffer([gl.FRAMEBUFFER_COMPLETE]);
+    gl.framebufferTexture2D(gl.FRAMEBUFFER, ext.COLOR_ATTACHMENT2_WEBGL, gl.TEXTURE_CUBE_MAP_POSITIVE_X, texCube, 0);
+    checkFramebuffer([gl.FRAMEBUFFER_UNSUPPORTED]);
+
+    // Clean up
+    gl.deleteTexture(tex1);
+    gl.deleteTexture(tex2);
+    gl.deleteTexture(texCube);
+}
+
+description("This tests FRAMEBUFFER_UNSUPPORTED.");
+
+shouldBeNonNull("gl = wtu.create3DContext(undefined, undefined, 1)");
+fb1 = gl.createFramebuffer();
+fb2 = gl.createFramebuffer();
+
+var ext = gl.getExtension("WEBGL_draw_buffers");
+if (!ext) {
+    testPassed("No WEBGL_draw_buffers support -- this is legal");
+} else {
+    var bufs = [ext.COLOR_ATTACHMENT0_WEBGL, ext.COLOR_ATTACHMENT1_WEBGL, ext.COLOR_ATTACHMENT2_WEBGL];
+    gl.bindFramebuffer(gl.FRAMEBUFFER, fb1);
+    ext.drawBuffersWEBGL(bufs);
+    wtu.glErrorShouldBe(gl, gl.NO_ERROR, "should be able to call drawBuffersWEBGL successfully");
+    gl.bindFramebuffer(gl.FRAMEBUFFER, fb2);
+    ext.drawBuffersWEBGL(bufs);
+    wtu.glErrorShouldBe(gl, gl.NO_ERROR, "should be able to call drawBuffersWEBGL successfully");
+
+    testPassed("Successfully enabled WEBGL_draw_buffers extension");
+    testImageAttachedTwoPoints();
+
+    gl.deleteFramebuffer(fb1);
+    gl.deleteFramebuffer(fb2);
+}
+
+debug("");
+var successfullyParsed = true;
+</script>
+<script src="../../js/js-test-post.js"></script>
+
+</body>
+</html>
--- a/dom/canvas/test/webgl-conf/checkout/conformance/extensions/webgl-draw-buffers.html
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/extensions/webgl-draw-buffers.html
@@ -49,22 +49,34 @@ void main() {
 precision mediump float;
 uniform vec4 u_colors[$(numDrawingBuffers)];
 void main() {
     for (int i = 0; i < $(numDrawingBuffers); ++i) {
         gl_FragData[i] = u_colors[i];
     }
 }
 </script>
+<script id="fshaderNoWrite" type="x-shader/x-fragment">
+#extension GL_EXT_draw_buffers : require
+void main() {
+}
+</script>
 <script id="fshaderRed" type="x-shader/x-fragment">
 precision mediump float;
 void main() {
     gl_FragColor = vec4(1,0,0,1);
 }
 </script>
+<script id="fshaderRedWithExtension" type="x-shader/x-fragment">
+#extension GL_EXT_draw_buffers : require
+precision mediump float;
+void main() {
+    gl_FragColor = vec4(1,0,0,1);
+}
+</script>
 <script id="fshaderMacroDisabled" type="x-shader/x-fragment">
 #ifdef GL_EXT_draw_buffers
   bad code here
 #endif
 precision mediump float;
 void main() {
     gl_FragColor = vec4(0,0,0,0);
 }
@@ -97,16 +109,17 @@ description("This test verifies the func
 
 debug("");
 
 var wtu = WebGLTestUtils;
 var canvas = document.getElementById("canvas");
 var output = document.getElementById("console");
 var gl = wtu.create3DContext(canvas);
 var ext = null;
+var programWithMaxDrawBuffersEqualOne = null;
 
 var extensionConstants = [
   { name: "MAX_COLOR_ATTACHMENTS_WEBGL", enum: 0x8CDF, expectedFn: function(v) { return v >= 4; }, passMsg: " should be >= 4"},
   { name: "MAX_DRAW_BUFFERS_WEBGL",      enum: 0x8824, expectedFn: function(v) { return v > 0; }, passMsg: " should be > 0"},
 
   { name: "COLOR_ATTACHMENT0_WEBGL",     enum: 0x8CE0, },
   { name: "COLOR_ATTACHMENT1_WEBGL",     enum: 0x8CE1, },
   { name: "COLOR_ATTACHMENT2_WEBGL",     enum: 0x8CE2, },
@@ -249,25 +262,31 @@ function testShaders(tests, sub) {
     gl.deleteProgram(program);
   });
 }
 
 function runShadersTestDisabled() {
   debug("");
   debug("test shaders disabled");
 
+  var sub = {numDrawingBuffers: 1};
   testShaders([
     { shaders: ["vshader", "fshaderMacroDisabled"],
       msg: "GL_EXT_draw_buffers should not be defined in GLSL",
     },
     { shaders: ["vshader", "fshader"],
       msg: "#extension GL_EXT_draw_buffers should not be allowed in GLSL",
       expectFailure: true,
     },
-  ], {numDrawingBuffers: 1});
+  ], sub);
+
+  programWithMaxDrawBuffersEqualOne = createExtDrawBuffersProgram("fshaderBuiltInConstEnabled", sub);
+  wtu.setupUnitQuad(gl);
+  wtu.clearAndDrawUnitQuad(gl);
+  wtu.checkCanvas(gl, [0, 255, 0, 255], "should be green");
   wtu.glErrorShouldBe(gl, gl.NO_ERROR, "there should be no errors");
 }
 
 function runShadersTestEnabled() {
   debug("");
   debug("test shaders enabled");
 
   var sub = {numDrawingBuffers: gl.getParameter(ext.MAX_DRAW_BUFFERS_WEBGL)};
@@ -281,16 +300,24 @@ function runShadersTestEnabled() {
   ], sub);
 
   var program = createExtDrawBuffersProgram("fshaderBuiltInConstEnabled", sub);
   wtu.setupUnitQuad(gl);
   wtu.clearAndDrawUnitQuad(gl);
   wtu.checkCanvas(gl, [0, 255, 0, 255], "should be green");
   gl.deleteProgram(program);
   wtu.glErrorShouldBe(gl, gl.NO_ERROR, "there should be no errors");
+
+  debug("");
+  debug("test that gl_MaxDrawBuffers is frozen at link time and enabling the extension won't change it.");
+  gl.useProgram(programWithMaxDrawBuffersEqualOne);
+  wtu.clearAndDrawUnitQuad(gl);
+  wtu.checkCanvas(gl, [0, 255, 0, 255], "should be green");
+  gl.deleteProgram(programWithMaxDrawBuffersEqualOne);
+  wtu.glErrorShouldBe(gl, gl.NO_ERROR, "there should be no errors");
 }
 
 function runAttachmentTestDisabled() {
   debug("");
   debug("test attachment disabled");
   var tex = gl.createTexture();
   var fb = gl.createFramebuffer();
   gl.bindTexture(gl.TEXTURE_2D, tex);
@@ -399,16 +426,17 @@ function runDrawTests() {
 
   [fb, fb2, halfFB1, halfFB2, endsFB, middleFB].forEach(function(fbo) {
     gl.bindFramebuffer(gl.FRAMEBUFFER, fb);
     ext.drawBuffersWEBGL(bufs);
   });
 
   var checkProgram = wtu.setupTexturedQuad(gl);
   var redProgram = wtu.setupProgram(gl, ["vshader", "fshaderRed"], ["a_position"]);
+  var redProgramWithExtension = wtu.setupProgram(gl, ["vshader", "fshaderRedWithExtension"], ["a_position"]);
   var drawProgram = createExtDrawBuffersProgram("fshader", {numDrawingBuffers: maxDrawingBuffers});
   var width = 64;
   var height = 64;
   var attachments = [];
   // Makes 6 framebuffers.
   // fb and fb2 have all the attachments.
   // halfFB1 has the first half of the attachments
   // halfFB2 has the second half of the attachments
@@ -529,46 +557,87 @@ function runDrawTests() {
 
   debug("test clearing clears all the textures");
   gl.bindFramebuffer(gl.FRAMEBUFFER, fb);
   gl.clearColor(0, 1, 0, 1);
   gl.clear(gl.COLOR_BUFFER_BIT);
 
   checkAttachmentsForColor(attachments, [0, 255, 0, 255]);
 
+  debug("test a fragment shader writing to neither gl_FragColor nor gl_FragData does not touch attachments");
+  var noWriteProgram = wtu.setupProgram(gl, ["vshader", "fshaderNoWrite"], ["a_position"]);
+  wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Should be no GL error setting up the program");
+  if (!noWriteProgram) {
+    testFailed("Setup a program where fragment shader writes nothing failed");
+  } else {
+    gl.useProgram(noWriteProgram);
+    wtu.drawUnitQuad(gl);
+
+    checkAttachmentsForColor(attachments, [0, 255, 0, 255]);
+    gl.deleteProgram(noWriteProgram);
+  }
+
   debug("test that NONE draws nothing");
   gl.bindFramebuffer(gl.FRAMEBUFFER, fb);
   ext.drawBuffersWEBGL(nones);
   gl.useProgram(redProgram);
   wtu.clearAndDrawUnitQuad(gl);
 
   checkAttachmentsForColor(attachments, [0, 255, 0, 255]);
 
-  debug("test that gl_FragColor broadcasts");
+  debug("test that gl_FragColor does not broadcast unless extension is enabled in fragment shader");
   gl.bindFramebuffer(gl.FRAMEBUFFER, fb);
   ext.drawBuffersWEBGL(bufs);
   gl.useProgram(redProgram);
   wtu.drawUnitQuad(gl);
 
+  checkAttachmentsForColorFn(attachments, function(attachment, index) {
+    return (index == 0) ? [255, 0, 0, 255] : [0, 255, 0, 255];
+  });
+
+  debug("test that gl_FragColor broadcasts if extension is enabled in fragment shader");
+  gl.clear(gl.COLOR_BUFFER_BIT);
+  gl.bindFramebuffer(gl.FRAMEBUFFER, fb);
+  ext.drawBuffersWEBGL(bufs);
+  gl.useProgram(redProgramWithExtension);
+  wtu.drawUnitQuad(gl);
+
   checkAttachmentsForColor(attachments, [255, 0, 0, 255]);
 
   if (maxUsable > 1) {
+    // First half of color buffers disable.
     var bufs1 = makeColorAttachmentArray(maxUsable);
+    // Second half of color buffers disable.
     var bufs2 = makeColorAttachmentArray(maxUsable);
+    // Color buffers with even indices disabled.
+    var bufs3 = makeColorAttachmentArray(maxUsable);
+    // Color buffers with odd indices disabled.
+    var bufs4 = makeColorAttachmentArray(maxUsable);
     for (var ii = 0; ii < maxUsable; ++ii) {
       if (ii < half) {
         bufs1[ii] = gl.NONE;
       } else {
         bufs2[ii] = gl.NONE;
       }
+      if (ii % 2) {
+        bufs3[ii] = gl.NONE;
+      } else {
+        bufs4[ii] = gl.NONE;
+      }
     }
 
     debug("test setting first half to NONE and clearing");
 
     gl.bindFramebuffer(gl.FRAMEBUFFER, fb);
+    // We should clear all buffers rather than depending on the previous
+    // gl_FragColor broadcasts test to succeed and setting the colors.
+    ext.drawBuffersWEBGL(bufs);
+    gl.clearColor(1, 0, 0, 1);
+    gl.clear(gl.COLOR_BUFFER_BIT);
+
     ext.drawBuffersWEBGL(bufs1);
     gl.clearColor(0, 1, 0, 1);
     gl.clear(gl.COLOR_BUFFER_BIT);
 
     checkAttachmentsForColorFn(attachments, function(attachment, index) {
       return index < half ? [255, 0, 0, 255] : [0, 255, 0, 255];
     });
 
@@ -583,16 +652,17 @@ function runDrawTests() {
     });
 
     debug("test setting second half to NONE and clearing");
 
     gl.bindFramebuffer(gl.FRAMEBUFFER, fb);
     ext.drawBuffersWEBGL(bufs);
     gl.clearColor(1, 0, 0, 1);
     gl.clear(gl.COLOR_BUFFER_BIT);
+
     ext.drawBuffersWEBGL(bufs2);
     gl.clearColor(0, 0, 1, 1);
     gl.clear(gl.COLOR_BUFFER_BIT);
     checkAttachmentsForColorFn(attachments, function(attachment, index) {
       return index < half ? [0, 0, 255, 255] : [255, 0, 0, 255];
     });
 
     debug("test setting second half to NONE and drawing");
@@ -600,16 +670,44 @@ function runDrawTests() {
     gl.bindFramebuffer(gl.FRAMEBUFFER, fb);
     gl.useProgram(drawProgram);
     wtu.drawUnitQuad(gl);
 
     checkAttachmentsForColorFn(attachments, function(attachment, index) {
       return index < half ? attachment.color : [255, 0, 0, 255];
     });
 
+    debug("test setting buffers with even indices to NONE and clearing");
+
+    gl.bindFramebuffer(gl.FRAMEBUFFER, fb);
+    ext.drawBuffersWEBGL(bufs);
+    gl.clearColor(1, 0, 0, 1);
+    gl.clear(gl.COLOR_BUFFER_BIT);
+    ext.drawBuffersWEBGL(bufs3);
+    gl.clearColor(1, 0, 1, 1);
+    gl.clear(gl.COLOR_BUFFER_BIT);
+
+    checkAttachmentsForColorFn(attachments, function(attachment, index) {
+      return (index % 2) ? [255, 0, 0, 255] : [255, 0, 255, 255];
+    });
+
+    debug("test setting buffers with odd indices to NONE and drawing");
+
+    gl.bindFramebuffer(gl.FRAMEBUFFER, fb);
+    ext.drawBuffersWEBGL(bufs);
+    gl.clearColor(0, 0, 0, 1);
+    gl.clear(gl.COLOR_BUFFER_BIT);
+    gl.useProgram(drawProgram);
+    ext.drawBuffersWEBGL(bufs4);
+    wtu.drawUnitQuad(gl);
+
+    checkAttachmentsForColorFn(attachments, function(attachment, index) {
+      return (index % 2 == 0) ? [0, 0, 0, 255] : attachment.color;
+    });
+
     gl.bindFramebuffer(gl.FRAMEBUFFER, halfFB1);
     ext.drawBuffersWEBGL(bufs);
     drawAndCheckAttachments(
       halfFB1, "framebuffer that only has first half of attachments",
       function(attachment, index) {
         return index < half;
       });
 
@@ -687,16 +785,17 @@ function runDrawTests() {
   gl.deleteFramebuffer(fb2);
   gl.deleteFramebuffer(halfFB1);
   gl.deleteFramebuffer(halfFB2);
   attachments.forEach(function(attachment) {
     gl.deleteTexture(attachment.texture);
   });
   gl.deleteProgram(checkProgram);
   gl.deleteProgram(redProgram);
+  gl.deleteProgram(redProgramWithExtension);
   gl.deleteProgram(drawProgram);
 }
 
 function runPreserveTests() {
   debug("");
   debug("--------- preserve tests -----------");
 
   debug("Testing that frame buffer is cleared after compositing");
--- a/dom/canvas/test/webgl-conf/checkout/conformance/glsl/bugs/00_test_list.txt
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/glsl/bugs/00_test_list.txt
@@ -1,31 +1,35 @@
 --min-version 1.0.4 angle-ambiguous-function-call.html
 --min-version 1.0.4 angle-constructor-invalid-parameters.html
 --min-version 1.0.3 angle-d3d11-compiler-error.html
 --min-version 1.0.3 angle-dx-variable-bug.html
 --min-version 1.0.3 array-of-struct-with-int-first-position.html
+--min-version 1.0.4 bool-type-cast-bug-int-float.html
 --min-version 1.0.3 compare-loop-index-to-uniform.html
 --min-version 1.0.3 complex-glsl-does-not-crash.html
 --min-version 1.0.4 compound-assignment-type-combination.html
 --min-version 1.0.3 conditional-discard-in-loop.html
 --min-version 1.0.3 conditional-discard-optimization.html
 --min-version 1.0.3 constant-precision-qualifier.html
 --min-version 1.0.3 --max-version 1.99 essl3-shaders-with-webgl1.html
 --min-version 1.0.4 floor-div-cos-should-not-truncate.html
 --min-version 1.0.3 floored-division-accuracy.html
 --min-version 1.0.3 fragcoord-linking-bug.html
 --min-version 1.0.4 gl-fragcoord-multisampling-bug.html
+--min-version 1.0.4 global-invariant-does-not-leak-across-shaders.html
+--min-version 1.0.4 invariant-does-not-leak-across-shaders.html
 --min-version 1.0.4 logic-inside-block-without-braces.html
 --min-version 1.0.3 long-expressions-should-not-crash.html
 --min-version 1.0.4 loop-if-loop-gradient.html
 --min-version 1.0.3 modulo-arithmetic-accuracy.html
 --min-version 1.0.3 multiplication-assignment.html
 --min-version 1.0.3 nested-functions-should-not-crash.html
 --min-version 1.0.4 nested-loops-with-break-and-continue.html
+--min-version 1.0.4 nested-sequence-operator.html
 --min-version 1.0.4 pow-of-small-constant-in-user-defined-function.html
 --min-version 1.0.4 pow-with-constant-exponent-should-not-crash.html
 --min-version 1.0.4 qualcomm-crash.html
 --min-version 1.0.4 qualcomm-loop-with-continue-crash.html
 --min-version 1.0.3 sampler-array-using-loop-index.html
 --min-version 1.0.4 sampler-struct-function-arg.html
 --min-version 1.0.4 sequence-operator-evaluation-order.html
 --min-version 1.0.4 sketchfab-lighting-shader-crash.html
new file mode 100644
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/glsl/bugs/bool-type-cast-bug-int-float.html
@@ -0,0 +1,333 @@
+<!--
+
+/*
+** Copyright (c) 2016 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>Verify int(bool) and float(bool) work correctly (Mac AMD driver bug)</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<script src="../../../js/js-test-pre.js"></script>
+<script src="../../../js/webgl-test-utils.js"></script>
+</head>
+<body>
+<canvas id="canvas" width="2" height="2"> </canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vshader-int1" type="x-shader/x-vertex">
+attribute vec3 aPosition;
+varying mediump float fvalue;
+uniform bool bvalue;
+
+void main() {
+    gl_Position = vec4(aPosition, 1);
+    int ivalue = int(bvalue);
+    if (ivalue == 0) {
+        fvalue = 0.0;
+    } else if (ivalue == 1) {
+        fvalue = 1.0;
+    } else {
+        fvalue = -1.0;
+    }
+}
+</script>
+<script id="fshader-int1" type="x-shader/x-fragment">
+varying mediump float fvalue;
+
+void main() {
+    if (fvalue == 1.0)
+        gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);
+    else if (fvalue == 0.0)
+        gl_FragColor = vec4(0.0, 1.0, 0.0, 1.0);
+    else
+        gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);
+}
+</script>
+
+<script id="vshader-int2" type="x-shader/x-vertex">
+attribute vec3 aPosition;
+
+void main() {
+    gl_Position = vec4(aPosition, 1);
+}
+</script>
+<script id="fshader-int2" type="x-shader/x-fragment">
+uniform bool bvalue;
+
+void main() {
+    int ivalue = int(bvalue);
+
+    if (ivalue == 1)
+        gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);
+    else if (ivalue == 0)
+        gl_FragColor = vec4(0.0, 1.0, 0.0, 1.0);
+    else
+        gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);
+}
+</script>
+
+<script id="vshader-float1" type="x-shader/x-vertex">
+attribute vec3 aPosition;
+varying mediump float fvalue;
+uniform bool bvalue;
+
+void main() {
+    gl_Position = vec4(aPosition, 1);
+    fvalue = float(bvalue);
+}
+</script>
+<script id="fshader-float1" type="x-shader/x-fragment">
+varying mediump float fvalue;
+
+void main() {
+    if (fvalue == 1.0)
+        gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);
+    else if (fvalue == 0.0)
+        gl_FragColor = vec4(0.0, 1.0, 0.0, 1.0);
+    else
+        gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);
+}
+</script>
+
+<script id="vshader-float2" type="x-shader/x-vertex">
+attribute vec3 aPosition;
+
+void main() {
+    gl_Position = vec4(aPosition, 1);
+}
+</script>
+<script id="fshader-float2" type="x-shader/x-fragment">
+uniform bool bvalue;
+
+void main() {
+    mediump float fvalue = float(bvalue);
+
+    if (fvalue == 1.0)
+        gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);
+    else if (fvalue == 0.0)
+        gl_FragColor = vec4(0.0, 1.0, 0.0, 1.0);
+    else
+        gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);
+}
+</script>
+
+<script id="vshader-vec2-1" type="x-shader/x-vertex">
+attribute vec3 aPosition;
+varying mediump vec2 fvalue;
+uniform bool bvalue;
+
+void main() {
+    gl_Position = vec4(aPosition, 1);
+    fvalue = vec2(bvalue);
+}
+</script>
+<script id="fshader-vec2-1" type="x-shader/x-fragment">
+varying mediump vec2 fvalue;
+
+void main() {
+    if (fvalue == vec2(1.0, 1.0))
+        gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);
+    else if (fvalue == vec2(0.0, 0.0))
+        gl_FragColor = vec4(0.0, 1.0, 0.0, 1.0);
+    else
+        gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);
+}
+</script>
+
+<script id="vshader-vec2-2" type="x-shader/x-vertex">
+attribute vec3 aPosition;
+
+void main() {
+    gl_Position = vec4(aPosition, 1);
+}
+</script>
+<script id="fshader-vec2-2" type="x-shader/x-fragment">
+precision mediump float;
+uniform bool bvalue;
+
+void main() {
+    vec2 fvalue = vec2(bvalue);
+
+    if (fvalue == vec2(1.0, 1.0))
+        gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);
+    else if (fvalue == vec2(0.0, 0.0))
+        gl_FragColor = vec4(0.0, 1.0, 0.0, 1.0);
+    else
+        gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);
+}
+</script>
+
+<script id="vshader-vec3-1" type="x-shader/x-vertex">
+attribute vec3 aPosition;
+varying mediump vec3 fvalue;
+uniform bool bvalue;
+
+void main() {
+    gl_Position = vec4(aPosition, 1);
+    fvalue = vec3(bvalue);
+}
+</script>
+<script id="fshader-vec3-1" type="x-shader/x-fragment">
+varying mediump vec3 fvalue;
+
+void main() {
+    if (fvalue == vec3(1.0, 1.0, 1.0))
+        gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);
+    else if (fvalue == vec3(0.0, 0.0, 0.0))
+        gl_FragColor = vec4(0.0, 1.0, 0.0, 1.0);
+    else
+        gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);
+}
+</script>
+
+<script id="vshader-vec3-2" type="x-shader/x-vertex">
+attribute vec3 aPosition;
+
+void main() {
+    gl_Position = vec4(aPosition, 1);
+}
+</script>
+<script id="fshader-vec3-2" type="x-shader/x-fragment">
+precision mediump float;
+uniform bool bvalue;
+
+void main() {
+    vec3 fvalue = vec3(bvalue);
+
+    if (fvalue == vec3(1.0, 1.0, 1.0))
+        gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);
+    else if (fvalue == vec3(0.0, 0.0, 0.0))
+        gl_FragColor = vec4(0.0, 1.0, 0.0, 1.0);
+    else
+        gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);
+}
+</script>
+
+<script id="vshader-vec4-1" type="x-shader/x-vertex">
+attribute vec3 aPosition;
+varying mediump vec4 fvalue;
+uniform bool bvalue;
+
+void main() {
+    gl_Position = vec4(aPosition, 1);
+    fvalue = vec4(bvalue);
+}
+</script>
+<script id="fshader-vec4-1" type="x-shader/x-fragment">
+varying mediump vec4 fvalue;
+
+void main() {
+    if (fvalue == vec4(1.0, 1.0, 1.0, 1.0))
+        gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);
+    else if (fvalue == vec4(0.0, 0.0, 0.0, 0.0))
+        gl_FragColor = vec4(0.0, 1.0, 0.0, 1.0);
+    else
+        gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);
+}
+</script>
+
+<script id="vshader-vec4-2" type="x-shader/x-vertex">
+attribute vec3 aPosition;
+
+void main() {
+    gl_Position = vec4(aPosition, 1);
+}
+</script>
+<script id="fshader-vec4-2" type="x-shader/x-fragment">
+precision mediump float;
+uniform bool bvalue;
+
+void main() {
+    vec4 fvalue = vec4(bvalue);
+
+    if (fvalue == vec4(1.0, 1.0, 1.0, 1.0))
+        gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);
+    else if (fvalue == vec4(0.0, 0.0, 0.0, 0.0))
+        gl_FragColor = vec4(0.0, 1.0, 0.0, 1.0);
+    else
+        gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);
+}
+</script>
+
+    <script type="application/javascript">
+"use strict";
+description("Verify int(bool) and float(bool) work correctly");
+debug("");
+var wtu = WebGLTestUtils;
+function test() {
+    var gl = wtu.create3DContext("canvas");
+    if (!gl) {
+        testFailed("context does not exist");
+        return;
+    }
+    wtu.setupUnitQuad(gl);
+
+    var testCases = [
+        { vshader: "vshader-int1", fshader: "fshader-int1", desc: "vertex shader int" },
+        { vshader: "vshader-int2", fshader: "fshader-int2", desc: "fragment shader int" },
+        { vshader: "vshader-float1", fshader: "fshader-float1", desc: "vertex shader float" },
+        { vshader: "vshader-float2", fshader: "fshader-float2", desc: "fragment shader float" },
+        { vshader: "vshader-vec2-1", fshader: "fshader-vec2-1", desc: "vertex shader vec2" },
+        { vshader: "vshader-vec2-2", fshader: "fshader-vec2-2", desc: "fragment shader vec2" },
+        { vshader: "vshader-vec3-1", fshader: "fshader-vec3-1", desc: "vertex shader vec3" },
+        { vshader: "vshader-vec3-2", fshader: "fshader-vec3-2", desc: "fragment shader vec3" },
+        { vshader: "vshader-vec4-1", fshader: "fshader-vec4-1", desc: "vertex shader vec4" },
+        { vshader: "vshader-vec4-2", fshader: "fshader-vec4-2", desc: "fragment shader vec4" },
+    ];
+
+    for (var idx = 0; idx < testCases.length; ++idx) {
+        var test = testCases[idx];
+
+        debug("");
+        var program = wtu.setupProgram(gl, [test.vshader, test.fshader], ["aPosition"]);
+        if (!program) {
+            testFailed("Fail to set up program");
+        } else {
+            var uniformLoc = gl.getUniformLocation(program, 'bvalue');
+            debug("Testing " + test.desc + " with false");
+            gl.uniform1i(uniformLoc, 0);
+            wtu.drawUnitQuad(gl);
+            wtu.checkCanvas(gl, [0, 255, 0, 255]);
+            debug("Testing " + test.desc + " with true");
+            gl.uniform1i(uniformLoc, 1);
+            wtu.drawUnitQuad(gl);
+            wtu.checkCanvas(gl, [255, 0, 0, 255]);
+            gl.deleteProgram(program);
+            wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors from testing");
+        }
+    }
+};
+
+test();
+
+debug("");
+var successfullyParsed = true;
+</script>
+<script src="../../../js/js-test-post.js"></script>
+</body>
+</html>
+
--- a/dom/canvas/test/webgl-conf/checkout/conformance/glsl/bugs/compound-assignment-type-combination.html
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/glsl/bugs/compound-assignment-type-combination.html
@@ -30,111 +30,18 @@
 <head>
 <meta charset="utf-8">
 <title>Result type should match the l-value type in compound assignment</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
 <link rel="stylesheet" href="../../../resources/glsl-feature-tests.css"/>
 <script src="../../../js/js-test-pre.js"></script>
 <script src="../../../js/webgl-test-utils.js"></script>
 <script src="../../../js/glsl-conformance-test.js"></script>
-<script id="VertexTemplate" type="x-shader/x-vertex">
-precision mediump float;
-
-uniform $(rtype) ur;
-uniform $(ltype) ul;
-
-void main() {
-    $(ltype) a = ul;
-    a $(op) ur;
-    gl_Position = vec4(float(a$(ltypeToScalar)));
-}
-</script>
-<script id="FragmentTemplate" type="x-shader/x-fragment">
-precision mediump float;
-
-uniform $(rtype) ur;
-uniform $(ltype) ul;
-
-void main() {
-    $(ltype) a = ul;
-    a $(op) ur;
-    gl_FragColor = vec4(float(a$(ltypeToScalar)));
-}
-</script>
+<script src="../../../js/tests/compound-assignment-type-combination.js"></script>
 </head>
-<body onload="runTest()">
+<body onload="runTest(1)">
 <div id="description"></div>
 <div id="console"></div>
 <script type="application/javascript">
-"use strict";
 description();
-
-var wtu = WebGLTestUtils;
-
-// ESSL 1.00 spec section 5.8 (also ESSL 3.00 spec section 5.8):
-// "The l-value and the expression must satisfy the semantic requirements of both op and equals (=)"
-// In the semantic requirements of assignment (=):
-// "The lvalue-expression and rvalue-expression must have the same type"
-
-var runTest = function() {
-  var vsTemplate = document.getElementById('VertexTemplate').text;
-  var fsTemplate = document.getElementById('FragmentTemplate').text;
-
-  var tests = [];
-
-  var baseTypes = ['float', 'int'];
-  var vecTypes = [['vec2', 'vec3', 'vec4', 'mat2', 'mat3', 'mat4'], ['ivec2', 'ivec3', 'ivec4']];
-  var ops = ['+=', '-=', '*=', '/='];
-
-  var fs, vs;
-  for (var k = 0; k < ops.length; ++k) {
-    var op = ops[k];
-    for (var i = 0; i < baseTypes.length; ++i) {
-      var baseType = baseTypes[i];
-      for (var j = 0; j < vecTypes[i].length; ++j) {
-        var vecType = vecTypes[i][j];
-        var vecTypeToScalar = vecType.substring(0, 3) == 'mat' ? '[0].x' : '.x';
-
-        var pushTest = function(ltype, rtype, ltypeToScalar, expectSuccess) {
-            vs = wtu.replaceParams(vsTemplate, {ltype: ltype, rtype: rtype, ltypeToScalar: ltypeToScalar, op: op});
-            fs = wtu.replaceParams(fsTemplate, {ltype: ltype, rtype: rtype, ltypeToScalar: ltypeToScalar, op: op});
-            tests.push({
-                vShaderSource: vs,
-                vShaderSuccess: expectSuccess,
-                linkSuccess: expectSuccess,
-                passMsg: ltype + " " + op + " " + rtype + " in a vertex shader should " + (expectSuccess ? "succeed." : "fail.")
-            });
-            tests.push({
-                fShaderSource: fs,
-                fShaderSuccess: expectSuccess,
-                linkSuccess: expectSuccess,
-                passMsg: ltype + " " + op + " " + rtype + " in a fragment shader should " + (expectSuccess ? "succeed." : "fail.")
-            });
-        }
-
-        // "scalar op= vector" is not okay, since the result of op is a vector,
-        // which can't be assigned to a scalar.
-        pushTest(baseType, vecType, '', false);
-
-        if (j > 0) {
-            var vecType2 = vecTypes[i][j - 1];
-            // "vector1 op= vector2" is not okay when vector1 and vector2 have
-            // different dimensions.
-            pushTest(vecType, vecType2, vecTypeToScalar, false);
-        }
-
-        // "vector op= scalar" is okay.
-        pushTest(vecType, baseType, vecTypeToScalar, true);
-
-        // "vector1 op= vector2" is okay when vector1 and vector2 have the same
-        // type (does a component-wise operation or matrix multiplication).
-        pushTest(vecType, vecType, vecTypeToScalar, true);
-      }
-    }
-  }
-
-  GLSLConformanceTester.runTests(tests);
-}
-
-var successfullyParsed = true;
 </script>
 </body>
 </html>
--- a/dom/canvas/test/webgl-conf/checkout/conformance/glsl/bugs/conditional-discard-in-loop.html
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/glsl/bugs/conditional-discard-in-loop.html
@@ -36,69 +36,69 @@
 
 <body>
 <canvas id="output" style="border: none;" width="256" height="256"></canvas>
 <div id="description"></div>
 <div id="console"></div>
 
 <script id="shader-vs" type="x-shader/x-vertex">
 // Inputs
-attribute vec4 a_position; 
-attribute vec2 a_tex_coords; 
+attribute vec4 a_position;
+attribute vec2 a_tex_coords;
 
 // Output
-varying vec2   v_tex_coords; 
-    
-void main(void) { 
-    v_tex_coords = a_tex_coords; 
+varying vec2   v_tex_coords;
+
+void main(void) {
+    v_tex_coords = a_tex_coords;
     gl_Position  = a_position;
-} 
+}
 </script>
 
 <script id="shader-fs" type="x-shader/x-fragment">
-precision mediump float; 
+precision mediump float;
 
 // Constants
-const float TEXEL_COUNT_V = 256.0; 
-const float TEXEL_HEIGHT  = 1.0 / TEXEL_COUNT_V; 
+const float TEXEL_COUNT_V = 256.0;
+const float TEXEL_HEIGHT  = 1.0 / TEXEL_COUNT_V;
 const float SEP_IX        = TEXEL_COUNT_V / 2.0;
 
-const vec4 GREEN = vec4(0.0, 1.0, 0.0, 1.0); 
-const vec4 BLUE  = vec4(0.0, 0.0, 1.0, 1.0); 
+const vec4 GREEN = vec4(0.0, 1.0, 0.0, 1.0);
+const vec4 BLUE  = vec4(0.0, 0.0, 1.0, 1.0);
 
 // Input
-varying vec2 v_tex_coords; 
+varying vec2 v_tex_coords;
 
-uniform sampler2D u_data; 
+uniform sampler2D u_data;
 
 // Without this function or directly returning the data, the issue does not occur
 mediump vec4 UnpackData(in vec4 inData) {
      float s = inData.x;
-     // Note s is always 0 
-     // mod(0, 1) = 0 
-     // So return value = (0, 0, -1, 0) 
+     // Note s is always 0
+     // mod(0, 1) = 0
+     // So return value = (0, 0, -1, 0)
     return vec4(0.0, 0.0, mod(s, 1.0) - 1.0, 0.0);
-    
+
     // Comment out the line above and uncomment the line below and the test succeeds on angle-dx11
     // return vec4(0.0, 0.0, -1.0, 0.0);
-} 
+}
 
 void main(void) {
-     // Set initial color 
-    gl_FragColor = BLUE; 
+     // Set initial color
+    gl_FragColor = BLUE;
 
     if (gl_FragCoord.y <= SEP_IX) {
         mediump vec2 addr = vec2(v_tex_coords.x, TEXEL_HEIGHT);
 
         for (float e_ix = 0.0; e_ix < TEXEL_COUNT_V; ++e_ix) {
             vec4 entry = texture2D(u_data, addr);
             mediump vec4 unpack = UnpackData(entry);
 
-            // Buffer is filled with 0, unpack is always (0, 0, -1, 0) 
-            // So discard is always triggered  
+            // Buffer is filled with 0, unpack is always (0, 0, -1, 0)
+            // So discard is always triggered
             if (unpack.z == -1.0) {
                 discard;
             }
 
             addr.y += unpack.z * TEXEL_HEIGHT;
         }
         // If discard is not triggered the output color is blue
     }
@@ -119,41 +119,41 @@ debug("This is a conformance suite test 
 
 var wtu = WebGLTestUtils;
 var canvas = document.getElementById("output");
 var gl = wtu.create3DContext(canvas);
 if (!gl) {
   testFailed("context does not exist");
 } else {
 
-  // Create texture filled with zero's  
+  // Create texture filled with zero's
   var tex = gl.createTexture();
   gl.bindTexture(gl.TEXTURE_2D, tex);
   gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, 	 gl.CLAMP_TO_EDGE);
   gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, 	 gl.CLAMP_TO_EDGE);
   gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);
   gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);
   wtu.fillTexture(gl, tex, 256, 256, [0, 0, 0, 0]);
 
-  // Clear complete viewport to red    
+  // Clear complete viewport to red
   gl.clearColor(1.0, 0.0, 0.0, 1.0);
   gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
-  
+
   var attribBuffers = wtu.setupUnitQuad(gl, 0, 1);
   var program = wtu.setupProgram(gl, ["shader-vs", "shader-fs"], ["a_position", "a_tex_coords"], [0, 1], true);
 
-  // Bind texture  
+  // Bind texture
   var uniformMap = wtu.getUniformMap(gl, program);
   gl.activeTexture(gl.TEXTURE0);
   gl.bindTexture(gl.TEXTURE_2D, tex);
   gl.uniform1i(uniformMap.u_data.location, 0);
 
   // Draw
   wtu.drawUnitQuad(gl);
-  
+
   // Verify output
   wtu.checkCanvasRect(gl, 0,   0, 256, 128, [ 255,   0,   0, 255 ], "should be red",    1);
   wtu.checkCanvasRect(gl, 0, 128, 256, 128, [   0, 255,   0, 255 ], "should be green",  1);
 }
 
 var successfullyParsed = true;
 </script>
 <script src="../../../js/js-test-post.js"></script>
new file mode 100644
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/glsl/bugs/global-invariant-does-not-leak-across-shaders.html
@@ -0,0 +1,98 @@
+<!--
+
+/*
+** Copyright (c) 2016 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>Global invariant does not leak across shaders</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<script src="../../../js/js-test-pre.js"></script>
+<script src="../../../js/webgl-test-utils.js"></script>
+<script src="../../../js/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="InvariantVertex" type="x-shader/x-vertex">
+#pragma STDGL invariant(all)
+
+void main()
+{
+    gl_Position = vec4(1.0, 0.0, 0.0, 1.0);
+}
+</script>
+<script id="Fragment" type="x-shader/x-fragment">
+precision mediump float;
+
+void main()
+{
+    gl_FragColor = vec4(0.0, 1.0, 0.0, 1.0);
+}
+</script>
+<script id="VertexWithVarying" type="x-shader/x-vertex">
+varying vec2 testVarying;
+
+void main() {
+    gl_Position = vec4(1.0, 0.0, 0.0, 1.0);
+    testVarying = vec2(0.0, 0.0);
+}
+</script>
+<script id="FragmentWithVarying" type="x-shader/x-fragment">
+precision mediump float;
+varying vec2 testVarying;
+
+void main()
+{
+    gl_FragColor = vec4(testVarying, 0.0, 1.0);
+}
+</script>
+<script type="text/javascript">
+"use strict";
+description("The use of the global invariant pragma in one shader must not affect other shaders.");
+
+GLSLConformanceTester.runTests([
+  {
+    vShaderId: "InvariantVertex",
+    vShaderSuccess: true,
+    fShaderId: "Fragment",
+    fShaderSuccess: true,
+    linkSuccess: true,
+    passMsg: "Shaders using global invariant pragma should compile and link."
+  },
+  {
+    vShaderId: "VertexWithVarying",
+    vShaderSuccess: true,
+    fShaderId: "FragmentWithVarying",
+    fShaderSuccess: true,
+    linkSuccess: true,
+    passMsg: "Shaders not using global invariant pragma should compile and link."
+  },
+]);
+</script>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/glsl/bugs/invariant-does-not-leak-across-shaders.html
@@ -0,0 +1,95 @@
+<!--
+
+/*
+** Copyright (c) 2016 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>Invariant does not leak across shaders</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<script src="../../../js/js-test-pre.js"></script>
+<script src="../../../js/webgl-test-utils.js"></script>
+<script src="../../../js/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="InvariantVertex" type="x-shader/x-vertex">
+varying vec4 v_varying;
+invariant v_varying;
+
+void main()
+{
+    gl_Position = v_varying;
+}
+</script>
+<script id="InvariantFragment" type="x-shader/x-fragment">
+precision mediump float;
+invariant varying vec4 v_varying;
+
+void main()
+{
+    gl_FragColor = v_varying;
+}
+</script>
+<script id="VertexWithVarying" type="x-shader/x-vertex">
+varying vec4 v_varying;
+
+void main() {
+    gl_Position = v_varying;
+}
+</script>
+<script type="text/javascript">
+"use strict";
+description("The use of the invariant qualifier in one shader must not affect other shaders.");
+
+debug("");
+debug("This is a deliberate subset of conformance/glsl/misc/shaders-with-invariance.html.");
+debug("Compared with the original tests, order of the tests is different.");
+debug("This test covers an ANGLE bug. See crbug.com/634813.");
+
+GLSLConformanceTester.runTests([
+  {
+    vShaderId: "InvariantVertex",
+    vShaderSuccess: true,
+    fShaderId: "InvariantFragment",
+    fShaderSuccess: true,
+    linkSuccess: true,
+    passMsg: "Shaders using invariant qualifier should compile and link."
+  },
+  {
+    vShaderId: "VertexWithVarying",
+    vShaderSuccess: true,
+    fShaderId: "InvariantFragment",
+    fShaderSuccess: true,
+    linkSuccess: false,
+    passMsg: "vertex shader with variant varying and fragment shader with invariant varying must fail"
+  },
+]);
+</script>
+</body>
+</html>
--- a/dom/canvas/test/webgl-conf/checkout/conformance/glsl/bugs/loop-if-loop-gradient.html
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/glsl/bugs/loop-if-loop-gradient.html
@@ -30,17 +30,17 @@
 <head>
 <meta charset="utf-8">
 <title>Gradient loop in if in loop crash</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
 <script src="../../../js/js-test-pre.js"></script>
 <script src="../../../js/webgl-test-utils.js"></script>
 <script id='vshader' type='x-shader/x-vertex'>
 precision highp float;
-void main() { 
+void main() {
 gl_Position = vec4( 1.0, 1.0, 1.0, 1.0 );
 }
 </script>
 <script id='fshader' type='x-shader/x-fragment'>
 precision mediump float;
 uniform lowp sampler2D iChannel0;
 
 void main(){
new file mode 100644
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/glsl/bugs/nested-sequence-operator.html
@@ -0,0 +1,68 @@
+<!--
+
+/*
+** Copyright (c) 2016 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>Nested sequence operator</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<script src="../../../js/js-test-pre.js"></script>
+<script src="../../../js/webgl-test-utils.js"></script>
+<script src="../../../js/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="fshaderNestedSequenceOperator" type="x-shader/x-fragment">
+precision mediump float;
+// Note that keep_flop_positive is expected to keep its default value false.
+uniform bool keep_flop_positive;
+float flop;
+void main()
+{
+    flop = -1.0,
+    (flop *= -1.0,
+    keep_flop_positive ? 0.0 : flop *= -1.0),
+    gl_FragColor = vec4(0, -flop, 0, 1);
+}
+</script>
+<script type="text/javascript">
+"use strict";
+description("Test a nested sequence operator with a ternary operator inside. The ternary operator needs to be converted into an if statement on a HLSL based WebGL backend, which makes this case tricky.");
+
+GLSLConformanceTester.runRenderTests([
+{
+  fShaderId: 'fshaderNestedSequenceOperator',
+  fShaderSuccess: true,
+  linkSuccess: true,
+  passMsg: "Nested sequence operator is evaluated in the expected order."
+}
+]);
+</script>
+</body>
+</html>
--- a/dom/canvas/test/webgl-conf/checkout/conformance/glsl/bugs/qualcomm-crash.html
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/glsl/bugs/qualcomm-crash.html
@@ -30,17 +30,17 @@
 <head>
 <meta charset="utf-8">
 <title>Qualcomm program link crash Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
 <script src="../../../js/js-test-pre.js"></script>
 <script src="../../../js/webgl-test-utils.js"></script>
 <script id='vshader1' type='x-shader/x-vertex'>
 precision highp float;
-void main() { 
+void main() {
 gl_Position = vec4( 1.0, 1.0, 1.0, 1.0 );
 }
 </script>
 <script id='fshader1' type='x-shader/x-fragment'>
 precision highp float;
 uniform int renderType;
 uniform sampler2D texMap;
 void main() {
--- a/dom/canvas/test/webgl-conf/checkout/conformance/glsl/bugs/sampler-struct-function-arg.html
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/glsl/bugs/sampler-struct-function-arg.html
@@ -84,17 +84,17 @@ if (!gl) {
     gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
     gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
     wtu.fillTexture(gl, textureGreen, 1, 1, [0, 255, 0, 255]);
     gl.bindTexture(gl.TEXTURE_2D, null);
 
     // Clear complete viewport to red
     gl.clearColor(1.0, 0.0, 0.0, 1.0);
     gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
-      
+
     var attribBuffers = wtu.setupUnitQuad(gl, 0, 1);
     var program = wtu.setupProgram(gl, ["shader-vs", "shader-fs"], ["a_position"], [0], true);
 
     if (!program) {
         testFailed("Shader compilation/link failed");
     } else {
         // Bind texture
         var uniformMap = wtu.getUniformMap(gl, program);
--- a/dom/canvas/test/webgl-conf/checkout/conformance/glsl/bugs/sequence-operator-evaluation-order.html
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/glsl/bugs/sequence-operator-evaluation-order.html
@@ -24,76 +24,114 @@
 */
 
 -->
 
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
-<title>GLSL ternary operator should be evaluated after previous operands in a sequence</title>
+<title>GLSL short-circuiting operators should be evaluated after previous operands in a sequence</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
 <script src="../../../js/js-test-pre.js"></script>
 <script src="../../../js/webgl-test-utils.js"></script>
+<script src="../../../js/glsl-conformance-test.js"></script>
 </head>
 <body>
 <canvas id="canvas" width="64" height="64"> </canvas>
 <div id="description"></div>
 <div id="console"></div>
-<script id="vshader" type="x-shader/x-vertex">
-attribute vec3 aPosition;
-
-void main() {
-    gl_Position = vec4(aPosition, 1);
-}
-</script>
 <script id="fshaderSequenceSideEffectsAffectTernary" type="x-shader/x-fragment">
 precision mediump float;
 
 bool correct = true;
 
-uniform float u;
+uniform float u_zero;
 
 float wrong() {
     correct = false;
     return 0.0;
 }
 
 void main() {
     // ESSL 1.00 section 5.9, about sequence operator:
     // "All expressions are evaluated, in order, from left to right"
     // Also use a ternary operator where the third operand has side effects to make sure
     // only the second operand is evaluated.
-    float a = u; // Expected to be -0.5
+    float a = u_zero - 0.5; // Result should be -0.5.
     float green = (a++, a > 0.0 ? 1.0 : wrong());
     gl_FragColor = vec4(0.0, correct ? green : 0.0, 0.0, 1.0);
 }
 </script>
+<script id="fshaderSequenceSideEffectsAffectAnd" type="x-shader/x-fragment">
+precision mediump float;
+
+uniform bool u_false;
+
+bool sideEffectA = false;
+bool funcA() {
+    sideEffectA = true;
+    return true;
+}
+
+bool sideEffectB = false;
+bool funcB() {
+    sideEffectB = true;
+    return true;
+}
+
+void main() {
+    bool b = (funcA(), u_false == sideEffectA && funcB());
+    gl_FragColor = (!b && sideEffectA && !sideEffectB) ? vec4(0, 1, 0, 1) : vec4(1, 0, 0, 1);
+}
+</script>
+<script id="fshaderSequenceSideEffectsAffectOr" type="x-shader/x-fragment">
+precision mediump float;
+
+uniform bool u_false;
+
+bool sideEffectA = false;
+bool funcA() {
+    sideEffectA = true;
+    return false;
+}
+
+bool sideEffectB = false;
+bool funcB() {
+    sideEffectB = true;
+    return false;
+}
+
+void main() {
+    bool b = (funcA(), (u_false == !sideEffectA) || funcB());
+    gl_FragColor = (b && sideEffectA && !sideEffectB) ? vec4(0, 1, 0, 1) : vec4(1, 0, 0, 1);
+}
+</script>
 <script type="application/javascript">
 "use strict";
-description("Ternary operator should be evaluated after previous operands in a sequence");
+description();
 debug("");
 debug("This test is targeted to stress syntax tree transformations that might need to be done in shader translation to unfold operators.");
-var wtu = WebGLTestUtils;
-function test() {
-  var gl = wtu.create3DContext("canvas");
-  if (!gl) {
-    testFailed("WebGL context does not exist");
-    return;
-  }
-  wtu.setupUnitQuad(gl);
 
-  debug("");
-  debug("Expression where first operand of a sequence operator has side effects which affect the second operand that is a ternary operator");
-  var prog = wtu.setupProgram(gl, ["vshader", "fshaderSequenceSideEffectsAffectTernary"], ["aPosition"], undefined, true);
-  var u = gl.getUniformLocation(prog, 'u');
-  gl.uniform1f(u, -0.5);
-  wtu.clearAndDrawUnitQuad(gl);
-  wtu.checkCanvas(gl, [0, 255, 0, 255]);
-
-};
-
-test();
-finishTest();
+GLSLConformanceTester.runRenderTests([
+{
+  fShaderId: 'fshaderSequenceSideEffectsAffectTernary',
+  fShaderSuccess: true,
+  linkSuccess: true,
+  passMsg: 'Expression where first operand of a sequence operator has side effects which affect the second operand that is a ternary operator'
+},
+{
+  fShaderId: 'fshaderSequenceSideEffectsAffectAnd',
+  fShaderSuccess: true,
+  linkSuccess: true,
+  passMsg: 'Expression where first operand of a sequence operator has side effects which affect the second operand that is an and operator'
+},
+{
+  fShaderId: 'fshaderSequenceSideEffectsAffectOr',
+  fShaderSuccess: true,
+  linkSuccess: true,
+  passMsg: 'Expression where first operand of a sequence operator has side effects which affect the second operand that is an or operator'
+}
+]);
 </script>
 </body>
 </html>
 
--- a/dom/canvas/test/webgl-conf/checkout/conformance/glsl/constructors/glsl-construct-bvec2.html
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/glsl/constructors/glsl-construct-bvec2.html
@@ -37,24 +37,24 @@
 <script src="../../../js/glsl-conformance-test.js"></script>
 <script src="../../../js/glsl-constructor-tests-generator.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script>
 "use strict";
-var targetType = "bvec2"; 
+var targetType = "bvec2";
 description("Test " + targetType + " constructor expressions.");
 
 var testSet = GLSLConstructorTestsGenerator.getDefaultTestSet(targetType);
 
 // Generate tests
 var testCases = GLSLConstructorTestsGenerator.getConstructorTests(targetType, testSet);
- 
-// Run the tests 
+
+// Run the tests
 GLSLConformanceTester.runTests(testCases);
 
 debug("");
 var successfullyParsed = true;
 </script>
 </body>
 </html>
--- a/dom/canvas/test/webgl-conf/checkout/conformance/glsl/constructors/glsl-construct-bvec3.html
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/glsl/constructors/glsl-construct-bvec3.html
@@ -37,24 +37,24 @@
 <script src="../../../js/glsl-conformance-test.js"></script>
 <script src="../../../js/glsl-constructor-tests-generator.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script>
 "use strict";
-var targetType = "bvec3"; 
+var targetType = "bvec3";
 description("Test " + targetType + " constructor expressions.");
 
 var testSet = GLSLConstructorTestsGenerator.getDefaultTestSet(targetType);
 
 // Generate tests
 var testCases = GLSLConstructorTestsGenerator.getConstructorTests(targetType, testSet);
- 
-// Run the tests 
+
+// Run the tests
 GLSLConformanceTester.runTests(testCases);
 
 debug("");
 var successfullyParsed = true;
 </script>
 </body>
 </html>
--- a/dom/canvas/test/webgl-conf/checkout/conformance/glsl/constructors/glsl-construct-bvec4.html
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/glsl/constructors/glsl-construct-bvec4.html
@@ -37,24 +37,24 @@
 <script src="../../../js/glsl-conformance-test.js"></script>
 <script src="../../../js/glsl-constructor-tests-generator.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script>
 "use strict";
-var targetType = "bvec4"; 
+var targetType = "bvec4";
 description("Test " + targetType + " constructor expressions.");
 
 var testSet = GLSLConstructorTestsGenerator.getDefaultTestSet(targetType);
 
 // Generate tests
 var testCases = GLSLConstructorTestsGenerator.getConstructorTests(targetType, testSet);
- 
-// Run the tests 
+
+// Run the tests
 GLSLConformanceTester.runTests(testCases);
 
 debug("");
 var successfullyParsed = true;
 </script>
 </body>
 </html>
--- a/dom/canvas/test/webgl-conf/checkout/conformance/glsl/constructors/glsl-construct-ivec2.html
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/glsl/constructors/glsl-construct-ivec2.html
@@ -37,24 +37,24 @@
 <script src="../../../js/glsl-conformance-test.js"></script>
 <script src="../../../js/glsl-constructor-tests-generator.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script>
 "use strict";
-var targetType = "ivec2"; 
+var targetType = "ivec2";
 description("Test " + targetType + " constructor expressions.");
 
 var testSet = GLSLConstructorTestsGenerator.getDefaultTestSet(targetType);
 
 // Generate tests
 var testCases = GLSLConstructorTestsGenerator.getConstructorTests(targetType, testSet);
- 
-// Run the tests 
+
+// Run the tests
 GLSLConformanceTester.runTests(testCases);
 
 debug("");
 var successfullyParsed = true;
 </script>
 </body>
 </html>
--- a/dom/canvas/test/webgl-conf/checkout/conformance/glsl/constructors/glsl-construct-ivec3.html
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/glsl/constructors/glsl-construct-ivec3.html
@@ -37,24 +37,24 @@
 <script src="../../../js/glsl-conformance-test.js"></script>
 <script src="../../../js/glsl-constructor-tests-generator.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script>
 "use strict";
-var targetType = "ivec3"; 
+var targetType = "ivec3";
 description("Test " + targetType + " constructor expressions.");
 
 var testSet = GLSLConstructorTestsGenerator.getDefaultTestSet(targetType);
 
 // Generate tests
 var testCases = GLSLConstructorTestsGenerator.getConstructorTests(targetType, testSet);
- 
-// Run the tests 
+
+// Run the tests
 GLSLConformanceTester.runTests(testCases);
 
 debug("");
 var successfullyParsed = true;
 </script>
 </body>
 </html>
--- a/dom/canvas/test/webgl-conf/checkout/conformance/glsl/constructors/glsl-construct-ivec4.html
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/glsl/constructors/glsl-construct-ivec4.html
@@ -37,24 +37,24 @@
 <script src="../../../js/glsl-conformance-test.js"></script>
 <script src="../../../js/glsl-constructor-tests-generator.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script>
 "use strict";
-var targetType = "ivec4"; 
+var targetType = "ivec4";
 description("Test " + targetType + " constructor expressions.");
 
 var testSet = GLSLConstructorTestsGenerator.getDefaultTestSet(targetType);
 
 // Generate tests
 var testCases = GLSLConstructorTestsGenerator.getConstructorTests(targetType, testSet);
- 
-// Run the tests 
+
+// Run the tests
 GLSLConformanceTester.runTests(testCases);
 
 debug("");
 var successfullyParsed = true;
 </script>
 </body>
 </html>
--- a/dom/canvas/test/webgl-conf/checkout/conformance/glsl/constructors/glsl-construct-mat2.html
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/glsl/constructors/glsl-construct-mat2.html
@@ -37,24 +37,24 @@
 <script src="../../../js/glsl-conformance-test.js"></script>
 <script src="../../../js/glsl-constructor-tests-generator.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script>
 "use strict";
-var targetType = "mat2"; 
+var targetType = "mat2";
 description("Test " + targetType + " constructor expressions.");
 
 var testSet = GLSLConstructorTestsGenerator.getDefaultTestSet(targetType);
 
 // Generate tests
 var testCases = GLSLConstructorTestsGenerator.getConstructorTests(targetType, testSet);
- 
-// Run the tests 
+
+// Run the tests
 GLSLConformanceTester.runTests(testCases);
 
 debug("");
 var successfullyParsed = true;
 </script>
 </body>
 </html>
--- a/dom/canvas/test/webgl-conf/checkout/conformance/glsl/constructors/glsl-construct-mat3.html
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/glsl/constructors/glsl-construct-mat3.html
@@ -37,24 +37,24 @@
 <script src="../../../js/glsl-conformance-test.js"></script>
 <script src="../../../js/glsl-constructor-tests-generator.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script>
 "use strict";
-var targetType = "mat3"; 
+var targetType = "mat3";
 description("Test " + targetType + " constructor expressions.");
 
 var testSet = GLSLConstructorTestsGenerator.getDefaultTestSet(targetType);
 
 // Generate tests
 var testCases = GLSLConstructorTestsGenerator.getConstructorTests(targetType, testSet);
- 
-// Run the tests 
+
+// Run the tests
 GLSLConformanceTester.runTests(testCases);
 
 debug("");
 var successfullyParsed = true;
 </script>
 </body>
 </html>
--- a/dom/canvas/test/webgl-conf/checkout/conformance/glsl/constructors/glsl-construct-mat4.html
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/glsl/constructors/glsl-construct-mat4.html
@@ -37,24 +37,24 @@
 <script src="../../../js/glsl-conformance-test.js"></script>
 <script src="../../../js/glsl-constructor-tests-generator.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script>
 "use strict";
-var targetType = "mat4"; 
+var targetType = "mat4";
 description("Test " + targetType + " constructor expressions.");
 
 var testSet = GLSLConstructorTestsGenerator.getDefaultTestSet(targetType);
 
 // Generate tests
 var testCases = GLSLConstructorTestsGenerator.getConstructorTests(targetType, testSet);
- 
-// Run the tests 
+
+// Run the tests
 GLSLConformanceTester.runTests(testCases);
 
 debug("");
 var successfullyParsed = true;
 </script>
 </body>
 </html>
--- a/dom/canvas/test/webgl-conf/checkout/conformance/glsl/constructors/glsl-construct-vec2.html
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/glsl/constructors/glsl-construct-vec2.html
@@ -37,24 +37,24 @@
 <script src="../../../js/glsl-conformance-test.js"></script>
 <script src="../../../js/glsl-constructor-tests-generator.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script>
 "use strict";
-var targetType = "vec2"; 
+var targetType = "vec2";
 description("Test " + targetType + " constructor expressions.");
 
 var testSet = GLSLConstructorTestsGenerator.getDefaultTestSet(targetType);
 
 // Generate tests
 var testCases = GLSLConstructorTestsGenerator.getConstructorTests(targetType, testSet);
- 
-// Run the tests 
+
+// Run the tests
 GLSLConformanceTester.runTests(testCases);
 
 debug("");
 var successfullyParsed = true;
 </script>
 </body>
 </html>
--- a/dom/canvas/test/webgl-conf/checkout/conformance/glsl/constructors/glsl-construct-vec3.html
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/glsl/constructors/glsl-construct-vec3.html
@@ -37,24 +37,24 @@
 <script src="../../../js/glsl-conformance-test.js"></script>
 <script src="../../../js/glsl-constructor-tests-generator.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script>
 "use strict";
-var targetType = "vec3"; 
+var targetType = "vec3";
 description("Test " + targetType + " constructor expressions.");
 
 var testSet = GLSLConstructorTestsGenerator.getDefaultTestSet(targetType);
 
 // Generate tests
 var testCases = GLSLConstructorTestsGenerator.getConstructorTests(targetType, testSet);
- 
-// Run the tests 
+
+// Run the tests
 GLSLConformanceTester.runTests(testCases);
 
 debug("");
 var successfullyParsed = true;
 </script>
 </body>
 </html>
--- a/dom/canvas/test/webgl-conf/checkout/conformance/glsl/constructors/glsl-construct-vec4.html
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/glsl/constructors/glsl-construct-vec4.html
@@ -37,24 +37,24 @@
 <script src="../../../js/glsl-conformance-test.js"></script>
 <script src="../../../js/glsl-constructor-tests-generator.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script>
 "use strict";
-var targetType = "vec4"; 
+var targetType = "vec4";
 description("Test " + targetType + " constructor expressions.");
 
 var testSet = GLSLConstructorTestsGenerator.getDefaultTestSet(targetType);
 
 // Generate tests
 var testCases = GLSLConstructorTestsGenerator.getConstructorTests(targetType, testSet);
- 
-// Run the tests 
+
+// Run the tests
 GLSLConformanceTester.runTests(testCases);
 
 debug("");
 var successfullyParsed = true;
 </script>
 </body>
 </html>
--- a/dom/canvas/test/webgl-conf/checkout/conformance/glsl/functions/glsl-function-distance.html
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/glsl/functions/glsl-function-distance.html
@@ -72,26 +72,26 @@ GLSLGenerator.runFeatureTest({
         "   return length(p1 - p2);",
         "}"].join("\n")
     }
   ],
   gridRes: 8,
   tests: [
     ["$(output) = vec4(",
      "    $(func)(",
-     "        $(input).x * 8.0 - 4.0,", 
+     "        $(input).x * 8.0 - 4.0,",
      "        $(input).y * 8.0 - 4.0) / 8.0,",
      "    0,",
      "    0,",
      "    1);"].join("\n"),
     ["$(output) = vec4(",
      "    0,",
      "    $(func)(",
      "        $(input).xy * 8.0 - 4.0,",
-     "        $(input).wz * 8.0 - 4.0) / 8.0,", 
+     "        $(input).wz * 8.0 - 4.0) / 8.0,",
      "    0, 1);"].join("\n"),
     ["$(output) = vec4(",
      "    0, 0,",
      "    $(func)(",
      "        $(input).xyz * 8.0 - 4.0,",
      "        $(input).yzw * 8.0 - 4.0) / 8.0,",
      "    1);"].join("\n"),
     ["$(output) = vec4(",
--- a/dom/canvas/test/webgl-conf/checkout/conformance/glsl/functions/glsl-function-dot.html
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/glsl/functions/glsl-function-dot.html
@@ -73,26 +73,26 @@ GLSLGenerator.runFeatureTest({
         "   return p1.x * p2.x + p1.y * p2.y + p1.z * p2.z + p1.w * p2.w;",
         "}"].join("\n")
     }
   ],
   gridRes: 8,
   tests: [
     ["$(output) = vec4(",
      "    $(func)(",
-     "        $(input).x * 8.0 - 4.0,", 
+     "        $(input).x * 8.0 - 4.0,",
      "        $(input).y * 8.0 - 4.0) / 8.0,",
      "    0,",
      "    0,",
      "    1);"].join("\n"),
     ["$(output) = vec4(",
      "    0,",
      "    $(func)(",
      "        $(input).xy * 8.0 - 4.0,",
-     "        $(input).wz * 8.0 - 4.0) / 8.0,", 
+     "        $(input).wz * 8.0 - 4.0) / 8.0,",
      "    0, 1);"].join("\n"),
     ["$(output) = vec4(",
      "    0, 0,",
      "    $(func)(",
      "        $(input).xyz * 8.0 - 4.0,",
      "        $(input).yzw * 8.0 - 4.0) / 8.0,",
      "    1);"].join("\n"),
     ["$(output) = vec4(",
--- a/dom/canvas/test/webgl-conf/checkout/conformance/glsl/misc/shader-with-short-circuiting-operators.html
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/glsl/misc/shader-with-short-circuiting-operators.html
@@ -68,34 +68,34 @@ void main()
 <script id="vshader1" type="x-shader/x-vertex">
 attribute vec4 vPosition;
 varying vec4 vPassThrough;
 
 void main()
 {
     int x = 1;
     $(variables)
-      
+
     if ($(condition))
     { /*do nothing*/ }
 
     /* if x was unmodified return green, else return red */
     vPassThrough = (x == 1) ? vec4(0, 1, 0, 1) : vec4(1, 0, 0, 1);
     gl_Position = vPosition;
 }
 </script>
 
 <script id="fshader1" type="x-shader/x-fragment">
 precision mediump float;
 
 void main()
 {
     int x = 1;
     $(variables)
-        
+
     if ($(condition))
     { /*do nothing*/ }
 
     gl_FragColor = (x == 1) ? vec4(0, 1, 0, 1) : vec4(1, 0, 0, 1);
 }
 </script>
 
 <!-- Main body of the Webgl program -->
--- a/dom/canvas/test/webgl-conf/checkout/conformance/glsl/misc/shaders-with-invariance.html
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/glsl/misc/shaders-with-invariance.html
@@ -194,17 +194,17 @@ void main()
 {
     gl_FragColor = gl_FrontFacing ? vec4(1, 1, 1, 1) : vec4(0, 0, 0, 1);
 }
 </script>
 <script>
 // GLSL 1.0.17 4.3.5
 "use strict";
 // See GLSL ES spec 1.0.17 section 4.6.4 "Invariance and linkage".
-GLSLConformanceTester.runTests([
+var cases = [
   {
     vShaderId: "vertexShaderVariant",
     vShaderSuccess: true,
     fShaderId: "fragmentShaderInvariant",
     fShaderSuccess: true,
     linkSuccess: false,
     passMsg: "vertex shader with variant varying and fragment shader with invariant varying must fail",
   },
@@ -212,24 +212,16 @@ GLSLConformanceTester.runTests([
     vShaderId: "vertexShaderInvariant",
     vShaderSuccess: true,
     fShaderId: "fragmentShaderVariant",
     fShaderSuccess: true,
     linkSuccess: false,
     passMsg: "vertex shader with invariant varying and fragment shader with variant varying must fail",
   },
   {
-    vShaderId: "vertexShaderVariant",
-    vShaderSuccess: true,
-    fShaderId: "fragmentShaderGlobalInvariant",
-    fShaderSuccess: true,
-    linkSuccess: false,
-    passMsg: "vertex shader with variant varying and fragment shader with invariant (global setting) varying must fail",
-  },
-  {
     vShaderId: "vertexShaderGlobalInvariant",
     vShaderSuccess: true,
     fShaderId: "fragmentShaderVariant",
     fShaderSuccess: true,
     linkSuccess: false,
     passMsg: "vertex shader with invariant (global setting) varying and fragment shader with variant varying must fail",
   },
   {
@@ -268,24 +260,16 @@ GLSLConformanceTester.runTests([
     vShaderId: "vertexShaderInvariant",
     vShaderSuccess: true,
     fShaderId: "fragmentShaderSeparateInvariantWrongOrder",
     fShaderSuccess: false,
     linkSuccess: false,
     passMsg: "fragment shader with invariant (separately set in wrong order) varying must fail",
   },
   {
-    vShaderId: "vertexShaderInvariant",
-    vShaderSuccess: true,
-    fShaderId: "fragmentShaderGlobalInvariant",
-    fShaderSuccess: true,
-    linkSuccess: true,
-    passMsg: "vertex shader with invariant varying and fragment shader with invariant (global setting) varying must succeed",
-  },
-  {
     vShaderId: "vertexShaderInvariantGlPosition",
     vShaderSuccess: true,
     fShaderId: "fragmentShaderInvariantGlFragCoord",
     fShaderSuccess: true,
     linkSuccess: true,
     passMsg: "vertex shader with invariant gl_Position and fragment shader with invariant gl_FragCoord must succeed",
   },
   {
@@ -339,13 +323,31 @@ GLSLConformanceTester.runTests([
   {
     vShaderId: "vertexShaderVariant",
     vShaderSuccess: true,
     fShaderId: "fragmentShaderInvariantGlFrontFacing",
     fShaderSuccess: false,
     linkSuccess: false,
     passMsg: "fragment shader with invariant gl_FrontFacing must fail compilation",
   },
-]);
+  {
+    vShaderId: "vertexShaderVariant",
+    vShaderSuccess: true,
+    fShaderId: "fragmentShaderGlobalInvariant",
+    fShaderSuccess: true,
+    linkSuccess: false,
+    passMsg: "vertex shader with variant varying and fragment shader with invariant (global setting) varying must fail",
+  },
+  {
+    vShaderId: "vertexShaderInvariant",
+    vShaderSuccess: true,
+    fShaderId: "fragmentShaderGlobalInvariant",
+    fShaderSuccess: true,
+    linkSuccess: true,
+    passMsg: "vertex shader with invariant varying and fragment shader with invariant (global setting) varying must succeed",
+  }
+];
+
+GLSLConformanceTester.runTests(cases);
 var successfullyParsed = true;
 </script>
 </body>
 </html>
--- a/dom/canvas/test/webgl-conf/checkout/conformance/glsl/misc/shaders-with-uniform-structs.html
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/glsl/misc/shaders-with-uniform-structs.html
@@ -35,81 +35,81 @@
 <script src="../../../js/js-test-pre.js"></script>
 <script src="../../../js/webgl-test-utils.js"></script>
 <script src="../../../js/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShaderStructSequence" type="text/something-not-javascript">
-// Structures must have the same name, sequence of type names, and 
+// Structures must have the same name, sequence of type names, and
 // type definitions, and field names to be considered the same type.
 // GLSL 1.017 4.2.4
 precision mediump float;
 struct info {
   vec4 pos;
   vec4 color;
 };
 
 uniform info uni;
 void main()
 {
     gl_Position = uni.pos;
 }
 </script>
 <script id="fragmentShaderStructSequence" type="text/something-not-javascript">
-// Structures must have the same name, sequence of type names, and 
+// Structures must have the same name, sequence of type names, and
 // type definitions, and field names to be considered the same type.
 // GLSL 1.017 4.2.4
 precision mediump float;
 struct info {
   vec4 color;
   vec4 pos;
 };
 
 uniform info uni;
 void main()
 {
     gl_FragColor = uni.color;
 }
 </script>
 <script id="vertexShaderStructName" type="text/something-not-javascript">
-// Structures must have the same name, sequence of type names, and 
+// Structures must have the same name, sequence of type names, and
 // type definitions, and field names to be considered the same type.
 // GLSL 1.017 4.2.4
 precision mediump float;
 struct info {
   vec4 pos;
   vec4 color;
 };
 
 uniform info uni;
 void main()
 {
     gl_Position = uni.pos;
 }
 </script>
 <script id="fragmentShaderStructNameFailure" type="text/something-not-javascript">
-// Structures must have the same name, sequence of type names, and 
+// Structures must have the same name, sequence of type names, and
 // type definitions, and field names to be considered the same type.
 // GLSL 1.017 4.2.4
 precision mediump float;
 struct info1 {
   vec4 pos;
   vec4 color;
 };
 
 uniform info1 uni;
 void main()
 {
     gl_FragColor = uni.color;
 }
 </script>
 <script id="fragmentShaderStructNameSuccess" type="text/something-not-javascript">
-// Structures must have the same name, sequence of type names, and 
+// Structures must have the same name, sequence of type names, and
 // type definitions, and field names to be considered the same type.
 // GLSL 1.017 4.2.4
 precision mediump float;
 
 // Add a struct before info to make sure the struct info here is assigned
 // a different internal unique ID from the struct info in vertex shader.
 struct extra {
   vec4 p;
@@ -124,96 +124,96 @@ uniform info uni;
 void main()
 {
     extra my;
     my.p = uni.color;
     gl_FragColor = my.p;
 }
 </script>
 <script id="vertexShaderStructFieldName" type="text/something-not-javascript">
-// Structures must have the same name, sequence of type names, and 
+// Structures must have the same name, sequence of type names, and
 // type definitions, and field names to be considered the same type.
 // GLSL 1.017 4.2.4
 precision mediump float;
 struct info {
   vec4 pos;
   vec4 color;
 };
 
 uniform info uni;
 void main()
 {
     gl_Position = uni.pos;
 }
 </script>
 <script id="fragmentShaderStructFieldName" type="text/something-not-javascript">
-// Structures must have the same name, sequence of type names, and 
+// Structures must have the same name, sequence of type names, and
 // type definitions, and field names to be considered the same type.
 // GLSL 1.017 4.2.4
 precision mediump float;
 struct info {
   vec4 pos1;
   vec4 color;
 };
 
 uniform info uni;
 void main()
 {
     gl_FragColor = uni.color;
 }
 </script>
 <script id="vertexShaderStructFieldType" type="text/something-not-javascript">
-// Structures must have the same name, sequence of type names, and 
+// Structures must have the same name, sequence of type names, and
 // type definitions, and field names to be considered the same type.
 // GLSL 1.017 4.2.4
 precision mediump float;
 struct info {
   vec4 pos;
   vec4 color;
 };
 
 uniform info uni;
 void main()
 {
     gl_Position = uni.pos;
 }
 </script>
 <script id="fragmentShaderStructFieldType" type="text/something-not-javascript">
-// Structures must have the same name, sequence of type names, and 
+// Structures must have the same name, sequence of type names, and
 // type definitions, and field names to be considered the same type.
 // GLSL 1.017 4.2.4
 precision mediump float;
 struct info {
   vec3 pos;
   vec4 color;
 };
 
 uniform info uni;
 void main()
 {
     gl_FragColor = uni.color;
 }
 </script>
 <script id="vertexShaderStructFieldPrecision" type="text/something-not-javascript">
-// Structures must have the same name, sequence of type names, and 
+// Structures must have the same name, sequence of type names, and
 // type definitions, and field names to be considered the same type.
 // GLSL 1.017 4.2.4
 struct info {
   mediump vec4 pos;
   highp vec4 color;
 };
 
 uniform info uni;
 void main()
 {
     gl_Position = uni.pos;
 }
 </script>
 <script id="fragmentShaderStructFieldPrecision" type="text/something-not-javascript">
-// Structures must have the same name, sequence of type names, and 
+// Structures must have the same name, sequence of type names, and
 // type definitions, and field names to be considered the same type.
 // GLSL 1.017 4.2.4
 precision mediump float;
 struct info {
   vec4 pos;
   vec4 color;
 };
 
--- a/dom/canvas/test/webgl-conf/checkout/conformance/glsl/misc/struct-specifiers-in-uniforms.html
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/glsl/misc/struct-specifiers-in-uniforms.html
@@ -35,17 +35,17 @@
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="fragmentShader" type="text/something-not-javascript">
 precision mediump float;
 uniform struct S { $(type) field;} s;
 void main() {
-    // All uniforms are required to be zero initialized. Add the color green 
+    // All uniforms are required to be zero initialized. Add the color green
     // to make the rendering test pass.
     gl_FragColor = $(asVec4) + vec4(0.0, 1.0, 0.0, 1.0);
 }
 </script>
 <script>
 "use strict";
 description("Verifies that structure specifiers work with uniforms.");
 var tests = [];
--- a/dom/canvas/test/webgl-conf/checkout/conformance/glsl/samplers/glsl-function-texture2dprojlod.html
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/glsl/samplers/glsl-function-texture2dprojlod.html
@@ -100,17 +100,17 @@ if (gl.getParameter(gl.MAX_VERTEX_TEXTUR
 function runTest() {
   shouldBe("colors.length", "9");
   for (var ss = 0; ss < 2; ++ss) {
     debug("");
     debug(ss ? "testing vec4 version" : "testing vec3 version");
     var program = wtu.setupProgram(
         gl, ['vshader2d' + ss, 'fshader2d'], ['vPosition', 'texCoord0'], [0, 1]);
     wtu.setupUnitQuad(gl, 0, 1);
-    
+
     var tex = gl.createTexture();
     gl.bindTexture(gl.TEXTURE_2D, tex);
     gl.texParameteri(
         gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST_MIPMAP_NEAREST);
     gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);
     gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.REPEAT);
     gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.REPEAT);
 
@@ -122,17 +122,17 @@ function runTest() {
       var c = document.createElement("canvas");
       c.width = size;
       c.height = size;
       var ctx = c.getContext("2d");
       ctx.fillStyle = "rgb(0,0,0)";
       ctx.fillRect(0, 0, size, size);
       ctx.fillStyle = "rgb(" + color.color[0] + "," + color.color[1] + "," + color.color[2] + ")";
       ctx.fillRect(size / 2, 0, size / 2, size / 2);
-      
+
       gl.texImage2D(gl.TEXTURE_2D, ii, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, c);
     }
 
     var lodLoc = gl.getUniformLocation(program, "lod");
     var divLoc = gl.getUniformLocation(program, "divisor");
 
     for (var div = 1; div < 4; ++div) {
       for (var ii = 0; ii < colors.length - 1; ++ii) {
--- a/dom/canvas/test/webgl-conf/checkout/conformance/glsl/variables/gl-fragcoord-xy-values.html
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/glsl/variables/gl-fragcoord-xy-values.html
@@ -37,166 +37,166 @@
 <body>
 <canvas id="canvas" width="32" height="32">
 </canvas>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vshader" type="x-shader/x-vertex">
 // Inputs
 attribute vec4 aPosInfo;
-	
+
 // Outputs
 varying vec2 vTargetPixelCoord;
-     
+
 void main()
-{ 
+{
   vTargetPixelCoord = aPosInfo.zw;
 
   gl_PointSize = 1.0;
   gl_Position  = vec4(aPosInfo.xy, 0.0, 1.0);
 }
 </script>
 
 <script id="fshader" type="x-shader/x-fragment">
 precision mediump float;
 
 // Inputs
-varying vec2 vTargetPixelCoord; 
+varying vec2 vTargetPixelCoord;
 
-// Colors used to signal correctness  
+// Colors used to signal correctness
 const vec4 red   = vec4(1.0, 0.0, 0.0, 1.0);
 const vec4 green = vec4(0.0, 1.0, 0.0, 1.0);
-    
+
 void main()
 {
   // Check pixel index
   bool pixelIxValid = (floor(gl_FragCoord.xy) == vTargetPixelCoord);
 
   // Check fractional part of coordinates
   bool fracCoordValid = all(lessThan(abs(fract(gl_FragCoord.xy) - vec2(0.5)), vec2(0.0001)));
-       
+
   gl_FragColor = (pixelIxValid && fracCoordValid) ? green : red;
 }
 </script>
 
 <script id="test_fshader" type="x-shader/x-fragment">
 // Shader to test if the frame buffer positions within the output pixel are different for the five render passes
 // Pass on frame buffer position in varying, change in vertex shader : vTargetPixelCoord = aPosInfo.xy;
 // Set test_fshader in setupProgram()
 
 precision mediump float;
 
 // Inputs
-varying vec2 vTargetPixelCoord; 
+varying vec2 vTargetPixelCoord;
 
 const vec2 pixSize = vec2(2.0/32.0, 2.0/32.0);
-    
+
 void main()
 {
   // Coordinates within a framebuffer pixel [0, 1>
   vec2 inPixelCoord = fract(vTargetPixelCoord / pixSize);
 
   // Create different color dependent on the position inside the framebuffer pixel
-  float r = (inPixelCoord.x < 0.4) ? 0.2 : (inPixelCoord.x > 0.6) ? 0.8 : 0.5;  
-  float g = (inPixelCoord.y < 0.4) ? 0.2 : (inPixelCoord.y > 0.6) ? 0.8 : 0.5;  
-             
+  float r = (inPixelCoord.x < 0.4) ? 0.2 : (inPixelCoord.x > 0.6) ? 0.8 : 0.5;
+  float g = (inPixelCoord.y < 0.4) ? 0.2 : (inPixelCoord.y > 0.6) ? 0.8 : 0.5;
+
   gl_FragColor = vec4(r, g, 0.0, 1.0);
 }
 </script>
 
 <script>
 "use strict";
-    
+
 // Test if gl_FragCoord.xy values are always of the form :
 // (first framebuffer pixel index + 0.5, second framebuffer pixel index + 0.5)
 // (if no multisampling)
-    
-// This is done by rendering a set of points which targets either the center of the 
+
+// This is done by rendering a set of points which targets either the center of the
 // output pixel or the center of one of the quadrants
-     
+
 // Constants
 var floatsPerAttribute = 4;
 
 // Globals
 var wtu;
 var gl;
 var program;
 var vxBuffer;
 
 // Set data for one attribute (framebuffer.xy, pixel_index.xy)
-function setPixelData(data, dIx, xx, yy, xSize, ySize, xOffset, yOffset) 
+function setPixelData(data, dIx, xx, yy, xSize, ySize, xOffset, yOffset)
 {
   // Frame buffer first coordinate [-1, 1]
-  data[dIx++] = (xx + 0.5) * xSize + xOffset - 1; 
+  data[dIx++] = (xx + 0.5) * xSize + xOffset - 1;
 
   // Frame buffer second coordinate [-1, 1]
   data[dIx++] = (yy + 0.5) * ySize + yOffset - 1;
-      
+
   // Frame buffer pixel first index
-  data[dIx++] = xx; 
+  data[dIx++] = xx;
 
   // Frame buffer pixel second index
-  data[dIx++] = yy; 
+  data[dIx++] = yy;
 
-  return dIx; 
+  return dIx;
 }
 
 // Create attribute data
-function createAttributeData(xOffset, yOffset) 
+function createAttributeData(xOffset, yOffset)
 {
   // Retrieve realised dimensions of viewport
   var widthPx    = gl.drawingBufferWidth;
   var heightPx   = gl.drawingBufferHeight;
-  var pixelCount = widthPx * heightPx;      
+  var pixelCount = widthPx * heightPx;
 
   // Pixel size in framebuffer coordinates
   var pWidth  = 2 / widthPx;
-  var pHeight = 2 / heightPx; 
+  var pHeight = 2 / heightPx;
   var data = new Float32Array(pixelCount * floatsPerAttribute);
   var dIx = 0;
-  for (var yy = 0; yy < heightPx; ++yy) 
-    for (var xx = 0; xx < widthPx; ++xx) 
+  for (var yy = 0; yy < heightPx; ++yy)
+    for (var xx = 0; xx < widthPx; ++xx)
       dIx = setPixelData(data, dIx, xx, yy, pWidth, pHeight,  xOffset * pWidth,  yOffset * pHeight);
-        
+
   if (dIx !== data.length)
     wtu.error("gl-fragcoord-xy-values.html, createAttributeData(), index not correct at end");
 
-  return data;    
+  return data;
 }
-        
-// Initialize test        
-function init() 
+
+// Initialize test
+function init()
 {
   description("tests gl_FragCoord.xy values");
 
   wtu = WebGLTestUtils;
   gl = wtu.create3DContext("canvas", { antialias: false });
   program = wtu.setupProgram(gl, ["vshader", "fshader"], ["aPosInfo"]);
   vxBuffer = gl.createBuffer();
-      
+
   gl.bindBuffer(gl.ARRAY_BUFFER, vxBuffer);
   gl.enableVertexAttribArray(0);
   gl.vertexAttribPointer(0, floatsPerAttribute, gl.FLOAT, false, 0, 0);
 }
-        
-// Render data        
+
+// Render data
 function render(xOffset, yOffset, passMsg)
 {
   // Set attribute data
   var data = createAttributeData(xOffset, yOffset);
   gl.bufferData(gl.ARRAY_BUFFER, data, gl.DYNAMIC_DRAW);
 
   gl.clear(gl.COLOR_BUFFER_BIT);
   gl.drawArrays(gl.POINTS, 0, data.length / floatsPerAttribute);
   wtu.glErrorShouldBe(gl, gl.NO_ERROR, "no errors from draw");
   var green = [0, 255, 0, 255];
   wtu.checkCanvas(gl, green, passMsg);
 }
 
-// Run tests    
+// Run tests
 init();
 render(0, 0, "green : sampling at center of output pixel is correct");
 render(0.25, 0.25, "green : sampling in top right quadrant of output pixel is correct");
 render(-0.25, 0.25, "green : sampling in top left quadrant of output pixel is correct");
 render( 0.25, -0.25, "green : sampling in bottom right quadrant of output pixel is correct");
 render(-0.25, -0.25, "green : sampling in bottom left quadrant of output pixel is correct");
 var successfullyParsed = true;
 </script>
--- a/dom/canvas/test/webgl-conf/checkout/conformance/glsl/variables/gl-frontfacing.html
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/glsl/variables/gl-frontfacing.html
@@ -84,19 +84,19 @@ function init()
       for (var ii = 0; ii < 2; ++ii) {
         var color = [
             ii == 0 ? 255 : 0,
             ii == 0 ? 0 : 255,
             0
         ];
         var msg = "should be " + color;
         wtu.checkCanvasRect(
-            gl, 
-            xx + quarterStep + halfStep * ii, 
-            yy + quarterStep + halfStep * ii, 
+            gl,
+            xx + quarterStep + halfStep * ii,
+            yy + quarterStep + halfStep * ii,
             1, 1, color, msg, 4);
       }
     }
   }
 }
 
 init();
 var successfullyParsed = true;
--- a/dom/canvas/test/webgl-conf/checkout/conformance/misc/bad-arguments-test.html
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/misc/bad-arguments-test.html
@@ -40,23 +40,23 @@
 <script>
 "use strict";
 var wtu = WebGLTestUtils;
 description("Tests calling WebGL APIs with wrong argument types");
 
 
 var testArguments = [
   { value: "foo",
-    throws: true },
+    throwsForNullables: true },
   { value: 0,
-    throws: true },
+    throwsForNullables: true },
   { value: null,
-    throws: false },
+    throwsForNullables: false },
   { value: undefined,
-    throws: false }
+    throwsForNullables: false }
 ];
 
 var argument;
 
 var context = wtu.create3DContext();
 var program;
 var shader;
 var loc;
@@ -67,55 +67,55 @@ wtu.loadStandardProgramAsync(context, fu
 
     assertMsg(program != null, "Program Compiled");
     assertMsg(shader != null, "Shader Compiled");
 
     loc = context.getUniformLocation(program, "u_modelViewProjMatrix");
     assertMsg(loc != null, "getUniformLocation succeeded");
 
     for (var i = 0; i < testArguments.length; ++i) {
-      var func, func2;
-      if (testArguments[i].throws) {
+      argument = testArguments[i].value;
+
+      debug('Testing argument: ' + argument);
+
+      // These functions don't accept nullable arguments any more.
+      shouldThrow("context.compileShader(argument)");
+      shouldThrow("context.linkProgram(argument)");
+      shouldThrow("context.attachShader(program, argument)");
+      shouldThrow("context.attachShader(argument, shader)");
+      shouldThrow("context.detachShader(program, argument)");
+      shouldThrow("context.detachShader(argument, shader)");
+      shouldThrow("context.shaderSource(argument, 'foo')");
+      shouldThrow("context.bindAttribLocation(argument, 0, 'foo')");
+      shouldThrow("context.getProgramInfoLog(argument)");
+      shouldThrow("context.getProgramParameter(argument, 0)");
+      shouldThrow("context.getShaderInfoLog(argument)");
+      shouldThrow("context.getShaderParameter(argument, 0)");
+      shouldThrow("context.getShaderSource(argument)");
+      shouldThrow("context.getUniform(argument, loc)");
+      shouldThrow("context.getUniform(program, argument)");
+      shouldThrow("context.getUniformLocation(argument, 'u_modelViewProjMatrix')");
+
+      // The following entry points still accept nullable arguments.
+      var func;
+      if (testArguments[i].throwsForNullables) {
         func = shouldThrow;
-        func2 = shouldThrow;
       } else {
         func = shouldBeUndefined;
-        func2 = shouldBeNull;
       }
-      argument = testArguments[i].value;
-      func("context.compileShader(argument)");
-      func("context.linkProgram(argument)");
-      func("context.attachShader(program, argument)");
-      func("context.attachShader(argument, shader)");
-      func("context.detachShader(program, argument)");
-      func("context.detachShader(argument, shader)");
-      func("context.useProgram(argument)");
-      func("context.shaderSource(argument, 'foo')");
-      func("context.bindAttribLocation(argument, 0, 'foo')");
+
       func("context.bindBuffer(context.ARRAY_BUFFER, argument)");
       func("context.bindFramebuffer(context.FRAMEBUFFER, argument)");
       func("context.bindRenderbuffer(context.RENDERBUFFER, argument)");
       func("context.bindTexture(context.TEXTURE_2D, argument)");
       func("context.framebufferRenderbuffer(context.FRAMEBUFFER, context.DEPTH_ATTACHMENT, context.RENDERBUFFER, argument)");
       func("context.framebufferTexture2D(context.FRAMEBUFFER, context.COLOR_ATTACHMENT0, context.TEXTURE_2D, argument, 0)");
       func("context.uniform2fv(argument, new Float32Array([0.0, 0.0]))");
       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')");
-
+      func("context.useProgram(argument)");
     }
+    finishTest();
   });
 });
-
-var successfullyParsed = true;
 </script>
-
-<script src="../../js/js-test-post.js"></script>
 </body>
 </html>
--- a/dom/canvas/test/webgl-conf/checkout/conformance/misc/expando-loss.html
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/misc/expando-loss.html
@@ -170,28 +170,28 @@ function testVertexAttributeBuffers() {
 
     var program = wtu.setupSimpleColorProgram(gl);
     var position = gl.getAttribLocation(program, "vPosition");
 
     var buffer = gl.createBuffer();
     setTestExpandos(buffer);
     gl.bindBuffer(gl.ARRAY_BUFFER, buffer);
     gl.vertexAttribPointer(position, 2, gl.FLOAT, false, 0, 0);
-    assertMsg(buffer === gl.getVertexAttrib(position, gl.VERTEX_ATTRIB_ARRAY_BUFFER_BINDING), 
+    assertMsg(buffer === gl.getVertexAttrib(position, gl.VERTEX_ATTRIB_ARRAY_BUFFER_BINDING),
         "getVertexAttrib(VERTEX_ATTRIB_ARRAY_BUFFER_BINDING) return instance set with vertexAttribPointer");
     gl.bindBuffer(gl.ARRAY_BUFFER, null);
-    
+
     // Garbage collect Javascript references. Remaining references should be internal to WebGL.
     buffer = null;
-    program = null;    
+    program = null;
     webglHarnessCollectGarbage();
 
     var retrievedBuffer = gl.getVertexAttrib(position, gl.VERTEX_ATTRIB_ARRAY_BUFFER_BINDING);
     verifyTestExpandos(retrievedBuffer, "Vertex Attribute Buffer");
-    shouldBeType(retrievedBuffer, 'WebGLBuffer'); 
+    shouldBeType(retrievedBuffer, 'WebGLBuffer');
 
     debug('');
 }
 
 // Attach renderbuffers to framebuffers and verify no expando loss ocurrs when you call
 // getFramebufferAttachmentParameter
 function testFrameBufferAttachments() {
     debug('FrameBuffer Attachments');
--- a/dom/canvas/test/webgl-conf/checkout/conformance/more/README.md
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/more/README.md
@@ -17,17 +17,17 @@ Running the tests
   4. Open all_tests.html in your browser.
 
 
 Want to contribute?
 -------------------
 
   1. Fork this repo
   2. Run <code>gen_tests.rb</code>
-  3. Look into templates/ to see which functions lack tests (also see <a href="../raw/master/methods.txt">methods.txt</a> and <a href="http://dxr.mozilla.org/mozilla-central/source/dom/interfaces/canvas/nsICanvasRenderingContextWebGL.idl">nsICanvasRenderingContextWebGL.idl</a>):
+  3. Look into templates/ to see which functions lack tests (also see <a href="../raw/master/methods.txt">methods.txt</a> and <a href="http://mxr.mozilla.org/mozilla-central/source/dom/interfaces/canvas/nsICanvasRenderingContextWebGL.idl">nsICanvasRenderingContextWebGL.idl</a>):
     1. copy methodName.html to functions/methodName.html and write tests that test the results of valid inputs.
     2. copy methodNameBadArgs.html to functions/methodNameBadArgs.html and write tests to assert that invalid inputs throw exceptions.
     3. If your test causes a segfault, add the following to the top of the script tag: <code>Tests.autorun = false; Tests.message = "Caution: this may crash your browser";</code>
   4. For each performance test:
     1. Write a performance/myTestName.html and set <code>Tests.autorun = false;</code>
   5. If you have a test that you would like to run over the whole API or want to generate tests programmatically, add them to gen_tests.rb or write your own script.
   6. Create a commit for each file. (E.g. <code>for f in $(git status | grep -e "^#\\s*functions/\\S*$" | sed "s/^#\s*//"); do git add $f; git commit -m $f; done</code>)
   7. Send me a pull request.
--- a/dom/canvas/test/webgl-conf/checkout/conformance/more/all_tests.html
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/more/all_tests.html
@@ -53,347 +53,347 @@
   </script>
 </head>
 <body onload="seqLoader()">
 
     <div>
       <iframe src="conformance/badArgsArityLessThanArgc.html" width="110" height="42"></iframe>
       <h2><a href="conformance/badArgsArityLessThanArgc.html">conformance/badArgsArityLessThanArgc.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe src="conformance/constants.html" width="110" height="42"></iframe>
       <h2><a href="conformance/constants.html">conformance/constants.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe src="conformance/fuzzTheAPI.html" width="110" height="42"></iframe>
       <h2><a href="conformance/fuzzTheAPI.html">conformance/fuzzTheAPI.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe src="conformance/getContext.html" width="110" height="42"></iframe>
       <h2><a href="conformance/getContext.html">conformance/getContext.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe src="conformance/methods.html" width="110" height="42"></iframe>
       <h2><a href="conformance/methods.html">conformance/methods.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe src="conformance/quickCheckAPI.html" width="110" height="42"></iframe>
       <h2><a href="conformance/quickCheckAPI.html">conformance/quickCheckAPI.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe src="conformance/quickCheckAPIBadArgs.html" width="110" height="42"></iframe>
       <h2><a href="conformance/quickCheckAPIBadArgs.html">conformance/quickCheckAPIBadArgs.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe src="conformance/webGLArrays.html" width="110" height="42"></iframe>
       <h2><a href="conformance/webGLArrays.html">conformance/webGLArrays.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe src="functions/bindBuffer.html" width="110" height="42"></iframe>
       <h2><a href="functions/bindBuffer.html">functions/bindBuffer.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe src="functions/bindBufferBadArgs.html" width="110" height="42"></iframe>
       <h2><a href="functions/bindBufferBadArgs.html">functions/bindBufferBadArgs.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe src="functions/bindFramebufferLeaveNonZero.html" width="110" height="42"></iframe>
       <h2><a href="functions/bindFramebufferLeaveNonZero.html">functions/bindFramebufferLeaveNonZero.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe src="functions/bufferData.html" width="110" height="42"></iframe>
       <h2><a href="functions/bufferData.html">functions/bufferData.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe src="functions/bufferDataBadArgs.html" width="110" height="42"></iframe>
       <h2><a href="functions/bufferDataBadArgs.html">functions/bufferDataBadArgs.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe src="functions/bufferSubData.html" width="110" height="42"></iframe>
       <h2><a href="functions/bufferSubData.html">functions/bufferSubData.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe src="functions/bufferSubDataBadArgs.html" width="110" height="42"></iframe>
       <h2><a href="functions/bufferSubDataBadArgs.html">functions/bufferSubDataBadArgs.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe src="functions/copyTexImage2D.html" width="110" height="42"></iframe>
       <h2><a href="functions/copyTexImage2D.html">functions/copyTexImage2D.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe src="functions/copyTexImage2DBadArgs.html" width="110" height="42"></iframe>
       <h2><a href="functions/copyTexImage2DBadArgs.html">functions/copyTexImage2DBadArgs.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe src="functions/copyTexSubImage2D.html" width="110" height="42"></iframe>
       <h2><a href="functions/copyTexSubImage2D.html">functions/copyTexSubImage2D.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe src="functions/copyTexSubImage2DBadArgs.html" width="110" height="42"></iframe>
       <h2><a href="functions/copyTexSubImage2DBadArgs.html">functions/copyTexSubImage2DBadArgs.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe src="functions/deleteBufferBadArgs.html" width="110" height="42"></iframe>
       <h2><a href="functions/deleteBufferBadArgs.html">functions/deleteBufferBadArgs.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe src="functions/drawArrays.html" width="110" height="42"></iframe>
       <h2><a href="functions/drawArrays.html">functions/drawArrays.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe src="functions/drawArraysOutOfBounds.html" width="110" height="42"></iframe>
       <h2><a href="functions/drawArraysOutOfBounds.html">functions/drawArraysOutOfBounds.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe src="functions/drawElements.html" width="110" height="42"></iframe>
       <h2><a href="functions/drawElements.html">functions/drawElements.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe src="functions/drawElementsBadArgs.html" width="110" height="42"></iframe>
       <h2><a href="functions/drawElementsBadArgs.html">functions/drawElementsBadArgs.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe src="functions/getImageData.html" width="110" height="42"></iframe>
       <h2><a href="functions/getImageData.html">functions/getImageData.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe src="functions/getImageDataBadArgs.html" width="110" height="42"></iframe>
       <h2><a href="functions/getImageDataBadArgs.html">functions/getImageDataBadArgs.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe src="functions/isTests.html" width="110" height="42"></iframe>
       <h2><a href="functions/isTests.html">functions/isTests.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe src="functions/linkProgramBadArgs.html" width="110" height="42"></iframe>
       <h2><a href="functions/linkProgramBadArgs.html">functions/linkProgramBadArgs.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe src="functions/readPixels.html" width="110" height="42"></iframe>
       <h2><a href="functions/readPixels.html">functions/readPixels.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe src="functions/readPixelsBadArgs.html" width="110" height="42"></iframe>
       <h2><a href="functions/readPixelsBadArgs.html">functions/readPixelsBadArgs.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe src="functions/texImage2D.html" width="110" height="42"></iframe>
       <h2><a href="functions/texImage2D.html">functions/texImage2D.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe src="functions/texImage2DBadArgs.html" width="110" height="42"></iframe>
       <h2><a href="functions/texImage2DBadArgs.html">functions/texImage2DBadArgs.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe src="functions/texImage2DHTML.html" width="110" height="42"></iframe>
       <h2><a href="functions/texImage2DHTML.html">functions/texImage2DHTML.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe src="functions/texImage2DHTMLBadArgs.html" width="110" height="42"></iframe>
       <h2><a href="functions/texImage2DHTMLBadArgs.html">functions/texImage2DHTMLBadArgs.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe src="functions/texSubImage2D.html" width="110" height="42"></iframe>
       <h2><a href="functions/texSubImage2D.html">functions/texSubImage2D.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe src="functions/texSubImage2DBadArgs.html" width="110" height="42"></iframe>
       <h2><a href="functions/texSubImage2DBadArgs.html">functions/texSubImage2DBadArgs.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe src="functions/texSubImage2DHTML.html" width="110" height="42"></iframe>
       <h2><a href="functions/texSubImage2DHTML.html">functions/texSubImage2DHTML.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe src="functions/texSubImage2DHTMLBadArgs.html" width="110" height="42"></iframe>
       <h2><a href="functions/texSubImage2DHTMLBadArgs.html">functions/texSubImage2DHTMLBadArgs.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe src="functions/uniformMatrix.html" width="110" height="42"></iframe>
       <h2><a href="functions/uniformMatrix.html">functions/uniformMatrix.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe src="functions/uniformMatrixBadArgs.html" width="110" height="42"></iframe>
       <h2><a href="functions/uniformMatrixBadArgs.html">functions/uniformMatrixBadArgs.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe src="functions/uniformf.html" width="110" height="42"></iframe>
       <h2><a href="functions/uniformf.html">functions/uniformf.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe src="functions/uniformfBadArgs.html" width="110" height="42"></iframe>
       <h2><a href="functions/uniformfBadArgs.html">functions/uniformfBadArgs.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe src="functions/uniformi.html" width="110" height="42"></iframe>
       <h2><a href="functions/uniformi.html">functions/uniformi.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe src="functions/uniformiBadArgs.html" width="110" height="42"></iframe>
       <h2><a href="functions/uniformiBadArgs.html">functions/uniformiBadArgs.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe src="functions/vertexAttrib.html" width="110" height="42"></iframe>
       <h2><a href="functions/vertexAttrib.html">functions/vertexAttrib.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe src="functions/vertexAttribBadArgs.html" width="110" height="42"></iframe>
       <h2><a href="functions/vertexAttribBadArgs.html">functions/vertexAttribBadArgs.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe src="functions/vertexAttribPointer.html" width="110" height="42"></iframe>
       <h2><a href="functions/vertexAttribPointer.html">functions/vertexAttribPointer.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe src="functions/vertexAttribPointerBadArgs.html" width="110" height="42"></iframe>
       <h2><a href="functions/vertexAttribPointerBadArgs.html">functions/vertexAttribPointerBadArgs.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe src="performance/CPUvsGPU.html" width="110" height="42"></iframe>
       <h2><a href="performance/CPUvsGPU.html">performance/CPUvsGPU.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe src="performance/bandwidth.html" width="110" height="42"></iframe>
       <h2><a href="performance/bandwidth.html">performance/bandwidth.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe src="performance/jsGCPause.html" width="110" height="42"></iframe>
       <h2><a href="performance/jsGCPause.html">performance/jsGCPause.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe src="performance/jsMatrixMult.html" width="110" height="42"></iframe>
       <h2><a href="performance/jsMatrixMult.html">performance/jsMatrixMult.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe src="performance/jsToGLOverhead.html" width="110" height="42"></iframe>
       <h2><a href="performance/jsToGLOverhead.html">performance/jsToGLOverhead.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe src="glsl/arrayOutOfBounds.html" width="110" height="42"></iframe>
       <h2><a href="glsl/arrayOutOfBounds.html">glsl/arrayOutOfBounds.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe src="glsl/longLoops.html" width="110" height="42"></iframe>
       <h2><a href="glsl/longLoops.html">glsl/longLoops.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe src="glsl/uniformOutOfBounds.html" width="110" height="42"></iframe>
       <h2><a href="glsl/uniformOutOfBounds.html">glsl/uniformOutOfBounds.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe src="glsl/unusedAttribsUniforms.html" width="110" height="42"></iframe>
       <h2><a href="glsl/unusedAttribsUniforms.html">glsl/unusedAttribsUniforms.html</a></h2>
     </div>
-    
+
 </body>
 </html>
--- a/dom/canvas/test/webgl-conf/checkout/conformance/more/all_tests_linkonly.html
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/more/all_tests_linkonly.html
@@ -53,347 +53,347 @@
   </script>
 </head>
 <body onload="seqLoader()">
 
     <div>
       <iframe id="0" width="110" height="42"></iframe>
       <h2><a onclick="loadTest(0, 'conformance/badArgsArityLessThanArgc.html');return false" href="conformance/badArgsArityLessThanArgc.html">conformance/badArgsArityLessThanArgc.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="1" width="110" height="42"></iframe>
       <h2><a onclick="loadTest(1, 'conformance/constants.html');return false" href="conformance/constants.html">conformance/constants.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="2" width="110" height="42"></iframe>
       <h2><a onclick="loadTest(2, 'conformance/fuzzTheAPI.html');return false" href="conformance/fuzzTheAPI.html">conformance/fuzzTheAPI.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="3" width="110" height="42"></iframe>
       <h2><a onclick="loadTest(3, 'conformance/getContext.html');return false" href="conformance/getContext.html">conformance/getContext.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="4" width="110" height="42"></iframe>
       <h2><a onclick="loadTest(4, 'conformance/methods.html');return false" href="conformance/methods.html">conformance/methods.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="5" width="110" height="42"></iframe>
       <h2><a onclick="loadTest(5, 'conformance/quickCheckAPI.html');return false" href="conformance/quickCheckAPI.html">conformance/quickCheckAPI.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="6" width="110" height="42"></iframe>
       <h2><a onclick="loadTest(6, 'conformance/quickCheckAPIBadArgs.html');return false" href="conformance/quickCheckAPIBadArgs.html">conformance/quickCheckAPIBadArgs.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="7" width="110" height="42"></iframe>
       <h2><a onclick="loadTest(7, 'conformance/webGLArrays.html');return false" href="conformance/webGLArrays.html">conformance/webGLArrays.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="8" width="110" height="42"></iframe>
       <h2><a onclick="loadTest(8, 'functions/bindBuffer.html');return false" href="functions/bindBuffer.html">functions/bindBuffer.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="9" width="110" height="42"></iframe>
       <h2><a onclick="loadTest(9, 'functions/bindBufferBadArgs.html');return false" href="functions/bindBufferBadArgs.html">functions/bindBufferBadArgs.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="10" width="110" height="42"></iframe>
       <h2><a onclick="loadTest(10, 'functions/bindFramebufferLeaveNonZero.html');return false" href="functions/bindFramebufferLeaveNonZero.html">functions/bindFramebufferLeaveNonZero.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="11" width="110" height="42"></iframe>
       <h2><a onclick="loadTest(11, 'functions/bufferData.html');return false" href="functions/bufferData.html">functions/bufferData.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="12" width="110" height="42"></iframe>
       <h2><a onclick="loadTest(12, 'functions/bufferDataBadArgs.html');return false" href="functions/bufferDataBadArgs.html">functions/bufferDataBadArgs.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="13" width="110" height="42"></iframe>
       <h2><a onclick="loadTest(13, 'functions/bufferSubData.html');return false" href="functions/bufferSubData.html">functions/bufferSubData.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="14" width="110" height="42"></iframe>
       <h2><a onclick="loadTest(14, 'functions/bufferSubDataBadArgs.html');return false" href="functions/bufferSubDataBadArgs.html">functions/bufferSubDataBadArgs.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="15" width="110" height="42"></iframe>
       <h2><a onclick="loadTest(15, 'functions/copyTexImage2D.html');return false" href="functions/copyTexImage2D.html">functions/copyTexImage2D.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="16" width="110" height="42"></iframe>
       <h2><a onclick="loadTest(16, 'functions/copyTexImage2DBadArgs.html');return false" href="functions/copyTexImage2DBadArgs.html">functions/copyTexImage2DBadArgs.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="17" width="110" height="42"></iframe>
       <h2><a onclick="loadTest(17, 'functions/copyTexSubImage2D.html');return false" href="functions/copyTexSubImage2D.html">functions/copyTexSubImage2D.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="18" width="110" height="42"></iframe>
       <h2><a onclick="loadTest(18, 'functions/copyTexSubImage2DBadArgs.html');return false" href="functions/copyTexSubImage2DBadArgs.html">functions/copyTexSubImage2DBadArgs.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="19" width="110" height="42"></iframe>
       <h2><a onclick="loadTest(19, 'functions/deleteBufferBadArgs.html');return false" href="functions/deleteBufferBadArgs.html">functions/deleteBufferBadArgs.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="20" width="110" height="42"></iframe>
       <h2><a onclick="loadTest(20, 'functions/drawArrays.html');return false" href="functions/drawArrays.html">functions/drawArrays.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="21" width="110" height="42"></iframe>
       <h2><a onclick="loadTest(21, 'functions/drawArraysOutOfBounds.html');return false" href="functions/drawArraysOutOfBounds.html">functions/drawArraysOutOfBounds.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="22" width="110" height="42"></iframe>
       <h2><a onclick="loadTest(22, 'functions/drawElements.html');return false" href="functions/drawElements.html">functions/drawElements.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="23" width="110" height="42"></iframe>
       <h2><a onclick="loadTest(23, 'functions/drawElementsBadArgs.html');return false" href="functions/drawElementsBadArgs.html">functions/drawElementsBadArgs.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="24" width="110" height="42"></iframe>
       <h2><a onclick="loadTest(24, 'functions/getImageData.html');return false" href="functions/getImageData.html">functions/getImageData.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="25" width="110" height="42"></iframe>
       <h2><a onclick="loadTest(25, 'functions/getImageDataBadArgs.html');return false" href="functions/getImageDataBadArgs.html">functions/getImageDataBadArgs.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="26" width="110" height="42"></iframe>
       <h2><a onclick="loadTest(26, 'functions/isTests.html');return false" href="functions/isTests.html">functions/isTests.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="27" width="110" height="42"></iframe>
       <h2><a onclick="loadTest(27, 'functions/linkProgramBadArgs.html');return false" href="functions/linkProgramBadArgs.html">functions/linkProgramBadArgs.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="28" width="110" height="42"></iframe>
       <h2><a onclick="loadTest(28, 'functions/readPixels.html');return false" href="functions/readPixels.html">functions/readPixels.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="29" width="110" height="42"></iframe>
       <h2><a onclick="loadTest(29, 'functions/readPixelsBadArgs.html');return false" href="functions/readPixelsBadArgs.html">functions/readPixelsBadArgs.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="30" width="110" height="42"></iframe>
       <h2><a onclick="loadTest(30, 'functions/texImage2D.html');return false" href="functions/texImage2D.html">functions/texImage2D.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="31" width="110" height="42"></iframe>
       <h2><a onclick="loadTest(31, 'functions/texImage2DBadArgs.html');return false" href="functions/texImage2DBadArgs.html">functions/texImage2DBadArgs.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="32" width="110" height="42"></iframe>
       <h2><a onclick="loadTest(32, 'functions/texImage2DHTML.html');return false" href="functions/texImage2DHTML.html">functions/texImage2DHTML.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="33" width="110" height="42"></iframe>
       <h2><a onclick="loadTest(33, 'functions/texImage2DHTMLBadArgs.html');return false" href="functions/texImage2DHTMLBadArgs.html">functions/texImage2DHTMLBadArgs.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="34" width="110" height="42"></iframe>
       <h2><a onclick="loadTest(34, 'functions/texSubImage2D.html');return false" href="functions/texSubImage2D.html">functions/texSubImage2D.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="35" width="110" height="42"></iframe>
       <h2><a onclick="loadTest(35, 'functions/texSubImage2DBadArgs.html');return false" href="functions/texSubImage2DBadArgs.html">functions/texSubImage2DBadArgs.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="36" width="110" height="42"></iframe>
       <h2><a onclick="loadTest(36, 'functions/texSubImage2DHTML.html');return false" href="functions/texSubImage2DHTML.html">functions/texSubImage2DHTML.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="37" width="110" height="42"></iframe>
       <h2><a onclick="loadTest(37, 'functions/texSubImage2DHTMLBadArgs.html');return false" href="functions/texSubImage2DHTMLBadArgs.html">functions/texSubImage2DHTMLBadArgs.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="38" width="110" height="42"></iframe>
       <h2><a onclick="loadTest(38, 'functions/uniformMatrix.html');return false" href="functions/uniformMatrix.html">functions/uniformMatrix.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="39" width="110" height="42"></iframe>
       <h2><a onclick="loadTest(39, 'functions/uniformMatrixBadArgs.html');return false" href="functions/uniformMatrixBadArgs.html">functions/uniformMatrixBadArgs.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="40" width="110" height="42"></iframe>
       <h2><a onclick="loadTest(40, 'functions/uniformf.html');return false" href="functions/uniformf.html">functions/uniformf.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="41" width="110" height="42"></iframe>
       <h2><a onclick="loadTest(41, 'functions/uniformfBadArgs.html');return false" href="functions/uniformfBadArgs.html">functions/uniformfBadArgs.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="42" width="110" height="42"></iframe>
       <h2><a onclick="loadTest(42, 'functions/uniformi.html');return false" href="functions/uniformi.html">functions/uniformi.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="43" width="110" height="42"></iframe>
       <h2><a onclick="loadTest(43, 'functions/uniformiBadArgs.html');return false" href="functions/uniformiBadArgs.html">functions/uniformiBadArgs.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="44" width="110" height="42"></iframe>
       <h2><a onclick="loadTest(44, 'functions/vertexAttrib.html');return false" href="functions/vertexAttrib.html">functions/vertexAttrib.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="45" width="110" height="42"></iframe>
       <h2><a onclick="loadTest(45, 'functions/vertexAttribBadArgs.html');return false" href="functions/vertexAttribBadArgs.html">functions/vertexAttribBadArgs.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="46" width="110" height="42"></iframe>
       <h2><a onclick="loadTest(46, 'functions/vertexAttribPointer.html');return false" href="functions/vertexAttribPointer.html">functions/vertexAttribPointer.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="47" width="110" height="42"></iframe>
       <h2><a onclick="loadTest(47, 'functions/vertexAttribPointerBadArgs.html');return false" href="functions/vertexAttribPointerBadArgs.html">functions/vertexAttribPointerBadArgs.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="48" width="110" height="42"></iframe>
       <h2><a onclick="loadTest(48, 'performance/CPUvsGPU.html');return false" href="performance/CPUvsGPU.html">performance/CPUvsGPU.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="49" width="110" height="42"></iframe>
       <h2><a onclick="loadTest(49, 'performance/bandwidth.html');return false" href="performance/bandwidth.html">performance/bandwidth.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="50" width="110" height="42"></iframe>
       <h2><a onclick="loadTest(50, 'performance/jsGCPause.html');return false" href="performance/jsGCPause.html">performance/jsGCPause.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="51" width="110" height="42"></iframe>
       <h2><a onclick="loadTest(51, 'performance/jsMatrixMult.html');return false" href="performance/jsMatrixMult.html">performance/jsMatrixMult.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="52" width="110" height="42"></iframe>
       <h2><a onclick="loadTest(52, 'performance/jsToGLOverhead.html');return false" href="performance/jsToGLOverhead.html">performance/jsToGLOverhead.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="53" width="110" height="42"></iframe>
       <h2><a onclick="loadTest(53, 'glsl/arrayOutOfBounds.html');return false" href="glsl/arrayOutOfBounds.html">glsl/arrayOutOfBounds.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="54" width="110" height="42"></iframe>
       <h2><a onclick="loadTest(54, 'glsl/longLoops.html');return false" href="glsl/longLoops.html">glsl/longLoops.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="55" width="110" height="42"></iframe>
       <h2><a onclick="loadTest(55, 'glsl/uniformOutOfBounds.html');return false" href="glsl/uniformOutOfBounds.html">glsl/uniformOutOfBounds.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="56" width="110" height="42"></iframe>
       <h2><a onclick="loadTest(56, 'glsl/unusedAttribsUniforms.html');return false" href="glsl/unusedAttribsUniforms.html">glsl/unusedAttribsUniforms.html</a></h2>
     </div>
-    
+
 </body>
 </html>
--- a/dom/canvas/test/webgl-conf/checkout/conformance/more/all_tests_sequential.html
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/more/all_tests_sequential.html
@@ -53,347 +53,347 @@
   </script>
 </head>
 <body onload="seqLoader()">
 
     <div>
       <iframe id="0" width="110" height="42"></iframe>
       <h2><a id="0_link" href="conformance/badArgsArityLessThanArgc.html">conformance/badArgsArityLessThanArgc.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="1" width="110" height="42"></iframe>
       <h2><a id="1_link" href="conformance/constants.html">conformance/constants.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="2" width="110" height="42"></iframe>
       <h2><a id="2_link" href="conformance/fuzzTheAPI.html">conformance/fuzzTheAPI.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="3" width="110" height="42"></iframe>
       <h2><a id="3_link" href="conformance/getContext.html">conformance/getContext.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="4" width="110" height="42"></iframe>
       <h2><a id="4_link" href="conformance/methods.html">conformance/methods.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="5" width="110" height="42"></iframe>
       <h2><a id="5_link" href="conformance/quickCheckAPI.html">conformance/quickCheckAPI.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="6" width="110" height="42"></iframe>
       <h2><a id="6_link" href="conformance/quickCheckAPIBadArgs.html">conformance/quickCheckAPIBadArgs.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="7" width="110" height="42"></iframe>
       <h2><a id="7_link" href="conformance/webGLArrays.html">conformance/webGLArrays.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="8" width="110" height="42"></iframe>
       <h2><a id="8_link" href="functions/bindBuffer.html">functions/bindBuffer.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="9" width="110" height="42"></iframe>
       <h2><a id="9_link" href="functions/bindBufferBadArgs.html">functions/bindBufferBadArgs.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="10" width="110" height="42"></iframe>
       <h2><a id="10_link" href="functions/bindFramebufferLeaveNonZero.html">functions/bindFramebufferLeaveNonZero.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="11" width="110" height="42"></iframe>
       <h2><a id="11_link" href="functions/bufferData.html">functions/bufferData.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="12" width="110" height="42"></iframe>
       <h2><a id="12_link" href="functions/bufferDataBadArgs.html">functions/bufferDataBadArgs.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="13" width="110" height="42"></iframe>
       <h2><a id="13_link" href="functions/bufferSubData.html">functions/bufferSubData.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="14" width="110" height="42"></iframe>
       <h2><a id="14_link" href="functions/bufferSubDataBadArgs.html">functions/bufferSubDataBadArgs.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="15" width="110" height="42"></iframe>
       <h2><a id="15_link" href="functions/copyTexImage2D.html">functions/copyTexImage2D.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="16" width="110" height="42"></iframe>
       <h2><a id="16_link" href="functions/copyTexImage2DBadArgs.html">functions/copyTexImage2DBadArgs.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="17" width="110" height="42"></iframe>
       <h2><a id="17_link" href="functions/copyTexSubImage2D.html">functions/copyTexSubImage2D.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="18" width="110" height="42"></iframe>
       <h2><a id="18_link" href="functions/copyTexSubImage2DBadArgs.html">functions/copyTexSubImage2DBadArgs.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="19" width="110" height="42"></iframe>
       <h2><a id="19_link" href="functions/deleteBufferBadArgs.html">functions/deleteBufferBadArgs.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="20" width="110" height="42"></iframe>
       <h2><a id="20_link" href="functions/drawArrays.html">functions/drawArrays.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="21" width="110" height="42"></iframe>
       <h2><a id="21_link" href="functions/drawArraysOutOfBounds.html">functions/drawArraysOutOfBounds.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="22" width="110" height="42"></iframe>
       <h2><a id="22_link" href="functions/drawElements.html">functions/drawElements.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="23" width="110" height="42"></iframe>
       <h2><a id="23_link" href="functions/drawElementsBadArgs.html">functions/drawElementsBadArgs.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="24" width="110" height="42"></iframe>
       <h2><a id="24_link" href="functions/getImageData.html">functions/getImageData.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="25" width="110" height="42"></iframe>
       <h2><a id="25_link" href="functions/getImageDataBadArgs.html">functions/getImageDataBadArgs.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="26" width="110" height="42"></iframe>
       <h2><a id="26_link" href="functions/isTests.html">functions/isTests.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="27" width="110" height="42"></iframe>
       <h2><a id="27_link" href="functions/linkProgramBadArgs.html">functions/linkProgramBadArgs.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="28" width="110" height="42"></iframe>
       <h2><a id="28_link" href="functions/readPixels.html">functions/readPixels.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="29" width="110" height="42"></iframe>
       <h2><a id="29_link" href="functions/readPixelsBadArgs.html">functions/readPixelsBadArgs.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="30" width="110" height="42"></iframe>
       <h2><a id="30_link" href="functions/texImage2D.html">functions/texImage2D.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="31" width="110" height="42"></iframe>
       <h2><a id="31_link" href="functions/texImage2DBadArgs.html">functions/texImage2DBadArgs.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="32" width="110" height="42"></iframe>
       <h2><a id="32_link" href="functions/texImage2DHTML.html">functions/texImage2DHTML.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="33" width="110" height="42"></iframe>
       <h2><a id="33_link" href="functions/texImage2DHTMLBadArgs.html">functions/texImage2DHTMLBadArgs.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="34" width="110" height="42"></iframe>
       <h2><a id="34_link" href="functions/texSubImage2D.html">functions/texSubImage2D.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="35" width="110" height="42"></iframe>
       <h2><a id="35_link" href="functions/texSubImage2DBadArgs.html">functions/texSubImage2DBadArgs.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="36" width="110" height="42"></iframe>
       <h2><a id="36_link" href="functions/texSubImage2DHTML.html">functions/texSubImage2DHTML.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="37" width="110" height="42"></iframe>
       <h2><a id="37_link" href="functions/texSubImage2DHTMLBadArgs.html">functions/texSubImage2DHTMLBadArgs.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="38" width="110" height="42"></iframe>
       <h2><a id="38_link" href="functions/uniformMatrix.html">functions/uniformMatrix.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="39" width="110" height="42"></iframe>
       <h2><a id="39_link" href="functions/uniformMatrixBadArgs.html">functions/uniformMatrixBadArgs.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="40" width="110" height="42"></iframe>
       <h2><a id="40_link" href="functions/uniformf.html">functions/uniformf.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="41" width="110" height="42"></iframe>
       <h2><a id="41_link" href="functions/uniformfBadArgs.html">functions/uniformfBadArgs.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="42" width="110" height="42"></iframe>
       <h2><a id="42_link" href="functions/uniformi.html">functions/uniformi.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="43" width="110" height="42"></iframe>
       <h2><a id="43_link" href="functions/uniformiBadArgs.html">functions/uniformiBadArgs.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="44" width="110" height="42"></iframe>
       <h2><a id="44_link" href="functions/vertexAttrib.html">functions/vertexAttrib.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="45" width="110" height="42"></iframe>
       <h2><a id="45_link" href="functions/vertexAttribBadArgs.html">functions/vertexAttribBadArgs.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="46" width="110" height="42"></iframe>
       <h2><a id="46_link" href="functions/vertexAttribPointer.html">functions/vertexAttribPointer.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="47" width="110" height="42"></iframe>
       <h2><a id="47_link" href="functions/vertexAttribPointerBadArgs.html">functions/vertexAttribPointerBadArgs.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="48" width="110" height="42"></iframe>
       <h2><a id="48_link" href="performance/CPUvsGPU.html">performance/CPUvsGPU.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="49" width="110" height="42"></iframe>
       <h2><a id="49_link" href="performance/bandwidth.html">performance/bandwidth.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="50" width="110" height="42"></iframe>
       <h2><a id="50_link" href="performance/jsGCPause.html">performance/jsGCPause.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="51" width="110" height="42"></iframe>
       <h2><a id="51_link" href="performance/jsMatrixMult.html">performance/jsMatrixMult.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="52" width="110" height="42"></iframe>
       <h2><a id="52_link" href="performance/jsToGLOverhead.html">performance/jsToGLOverhead.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="53" width="110" height="42"></iframe>
       <h2><a id="53_link" href="glsl/arrayOutOfBounds.html">glsl/arrayOutOfBounds.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="54" width="110" height="42"></iframe>
       <h2><a id="54_link" href="glsl/longLoops.html">glsl/longLoops.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="55" width="110" height="42"></iframe>
       <h2><a id="55_link" href="glsl/uniformOutOfBounds.html">glsl/uniformOutOfBounds.html</a></h2>
     </div>
-    
+
 
     <div>
       <iframe id="56" width="110" height="42"></iframe>
       <h2><a id="56_link" href="glsl/unusedAttribsUniforms.html">glsl/unusedAttribsUniforms.html</a></h2>
     </div>
-    
+
 </body>
 </html>
--- a/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/texImage2D.html
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/texImage2D.html
@@ -68,17 +68,17 @@ Tests.testTexImage2D = function(gl) {
     gl.TEXTURE_CUBE_MAP_NEGATIVE_Z
   ];
   valid_targets.forEach(function(t) {
     assertOk(function(){gl.texImage2D(t, 0, gl.RGBA, 1,1,0,gl.RGBA,gl.UNSIGNED_BYTE, new Uint8Array([0,0,0,0]));});
   });
 }
 
 Tests.testTexImage2DNull = function(gl) {
-  gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 1,1,0,gl.RGBA,gl.UNSIGNED_BYTE, null);
+  assertOk(function(){gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 1,1,0,gl.RGBA,gl.UNSIGNED_BYTE, null);});
 }
 
 Tests.endUnit = function(gl) {
 }
 
 </script>
 <style>canvas{ position:absolute; }</style>
 </head><body>
--- a/dom/canvas/test/webgl-conf/checkout/conformance/more/index.html
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/more/index.html
@@ -26,19 +26,19 @@
 ** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 ** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
 */
 
 -->
     <title>WebGL tests</title>
   </head>
   <body>
-    
+
     <h1>Tests for the WebGL canvas context</h1>
-    
+
     <h2>These tests are intended to serve the following purposes:</h2>
     <ul>
       <li>Assert spec conformance (so that WebGL pages work the same across browsers and hardware)</li>
       <li>Check the safety of the GL binding (bounds checking, same origin policy)</li>
       <li>Provide performance numbers for developers</li>
     </ul>
 
     <h2>Test runners</h2>
--- a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/abs/abs_001_to_006.html
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/abs/abs_001_to_006.html
@@ -41,89 +41,89 @@
 <div id="console"></div>
 </body>
 <script>
 "use strict";
 OpenGLESTestRunner.run({
   "tests": [
     {
       "referenceProgram": {
-        "vertexShader": "../default/default.vert", 
+        "vertexShader": "../default/default.vert",
         "fragmentShader": "abs_float_frag_xvary_ref.frag"
-      }, 
-      "model": null, 
+      },
+      "model": null,
       "testProgram": {
-        "vertexShader": "../default/default.vert", 
+        "vertexShader": "../default/default.vert",
         "fragmentShader": "abs_float_frag_xvary.frag"
-      }, 
-      "name": "abs_float_frag_xvary.test.html", 
+      },
+      "name": "abs_float_frag_xvary.test.html",
       "pattern": "compare"
-    }, 
+    },
     {
       "referenceProgram": {
-        "vertexShader": "../default/default.vert", 
+        "vertexShader": "../default/default.vert",
         "fragmentShader": "abs_vec2_frag_xvary_ref.frag"
-      }, 
-      "model": null, 
+      },
+      "model": null,
       "testProgram": {
-        "vertexShader": "../default/default.vert", 
+        "vertexShader": "../default/default.vert",
         "fragmentShader": "abs_vec2_frag_xvary.frag"
-      }, 
-      "name": "abs_vec2_frag_xvary.test.html", 
+      },
+      "name": "abs_vec2_frag_xvary.test.html",
       "pattern": "compare"
-    }, 
+    },
     {
       "referenceProgram": {
-        "vertexShader": "../default/default.vert", 
+        "vertexShader": "../default/default.vert",
         "fragmentShader": "abs_vec3_frag_xvary_ref.frag"
-      }, 
-      "model": null, 
+      },
+      "model": null,
       "testProgram": {
-        "vertexShader": "../default/default.vert", 
+        "vertexShader": "../default/default.vert",
         "fragmentShader": "abs_vec3_frag_xvary.frag"
-      }, 
-      "name": "abs_vec3_frag_xvary.test.html", 
+      },
+      "name": "abs_vec3_frag_xvary.test.html",
       "pattern": "compare"
-    }, 
+    },
     {
       "referenceProgram": {
-        "vertexShader": "abs_float_vert_xvary_ref.vert", 
+        "vertexShader": "abs_float_vert_xvary_ref.vert",
         "fragmentShader": "../default/default.frag"
-      }, 
-      "model": "grid", 
+      },
+      "model": "grid",
       "testProgram": {
-        "vertexShader": "abs_float_vert_xvary.vert", 
+        "vertexShader": "abs_float_vert_xvary.vert",
         "fragmentShader": "../default/default.frag"
-      }, 
-      "name": "abs_float_vert_xvary.test.html", 
+      },
+      "name": "abs_float_vert_xvary.test.html",
       "pattern": "compare"
-    }, 
+    },
     {
       "referenceProgram": {
-        "vertexShader": "abs_vec2_vert_xvary_ref.vert", 
+        "vertexShader": "abs_vec2_vert_xvary_ref.vert",
         "fragmentShader": "../default/default.frag"
-      }, 
-      "model": "grid", 
+      },
+      "model": "grid",
       "testProgram": {
-        "vertexShader": "abs_vec2_vert_xvary.vert", 
+        "vertexShader": "abs_vec2_vert_xvary.vert",
         "fragmentShader": "../default/default.frag"
-      }, 
-      "name": "abs_vec2_vert_xvary.test.html", 
+      },
+      "name": "abs_vec2_vert_xvary.test.html",
       "pattern": "compare"
-    }, 
+    },
     {
       "referenceProgram": {
-        "vertexShader": "abs_vec3_vert_xvary_ref.vert", 
+        "vertexShader": "abs_vec3_vert_xvary_ref.vert",
         "fragmentShader": "../default/default.frag"
-      }, 
-      "model": "grid", 
+      },
+      "model": "grid",
       "testProgram": {
-        "vertexShader": "abs_vec3_vert_xvary.vert", 
+        "vertexShader": "abs_vec3_vert_xvary.vert",
         "fragmentShader": "../default/default.frag"
-      }, 
-      "name": "abs_vec3_vert_xvary.test.html", 
+      },
+      "name": "abs_vec3_vert_xvary.test.html",
       "pattern": "compare"
     }
   ]
 });
 var successfullyParsed = true;
 </script>
 </html>
--- a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/acos/acos_001_to_006.html
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/acos/acos_001_to_006.html
@@ -41,89 +41,89 @@
 <div id="console"></div>
 </body>
 <script>
 "use strict";
 OpenGLESTestRunner.run({
   "tests": [
     {
       "referenceProgram": {
-        "vertexShader": "../default/default.vert", 
+        "vertexShader": "../default/default.vert",
         "fragmentShader": "acos_float_frag_xvary_ref.frag"
-      }, 
-      "model": null, 
+      },
+      "model": null,
       "testProgram": {
-        "vertexShader": "../default/default.vert", 
+        "vertexShader": "../default/default.vert",
         "fragmentShader": "acos_float_frag_xvary.frag"
-      }, 
-      "name": "acos_float_frag_xvary.test.html", 
+      },
+      "name": "acos_float_frag_xvary.test.html",
       "pattern": "compare"
-    }, 
+    },
     {
       "referenceProgram": {
-        "vertexShader": "../default/default.vert", 
+        "vertexShader": "../default/default.vert",
         "fragmentShader": "acos_vec2_frag_xvary_ref.frag"
-      }, 
-      "model": null, 
+      },
+      "model": null,
       "testProgram": {
-        "vertexShader": "../default/default.vert", 
+        "vertexShader": "../default/default.vert",
         "fragmentShader": "acos_vec2_frag_xvary.frag"
-      }, 
-      "name": "acos_vec2_frag_xvary.test.html", 
+      },
+      "name": "acos_vec2_frag_xvary.test.html",
       "pattern": "compare"
-    }, 
+    },
     {
       "referenceProgram": {
-        "vertexShader": "../default/default.vert", 
+        "vertexShader": "../default/default.vert",
         "fragmentShader": "acos_vec3_frag_xvary_ref.frag"
-      }, 
-      "model": null, 
+      },
+      "model": null,
       "testProgram": {
-        "vertexShader": "../default/default.vert", 
+        "vertexShader": "../default/default.vert",
         "fragmentShader": "acos_vec3_frag_xvary.frag"
-      }, 
-      "name": "acos_vec3_frag_xvary.test.html", 
+      },
+      "name": "acos_vec3_frag_xvary.test.html",
       "pattern": "compare"
-    }, 
+    },
     {
       "referenceProgram": {
-        "vertexShader": "acos_float_vert_xvary_ref.vert", 
+        "vertexShader": "acos_float_vert_xvary_ref.vert",
         "fragmentShader": "../default/default.frag"
-      }, 
-      "model": "grid", 
+      },
+      "model": "grid",
       "testProgram": {
-        "vertexShader": "acos_float_vert_xvary.vert", 
+        "vertexShader": "acos_float_vert_xvary.vert",
         "fragmentShader": "../default/default.frag"
-      }, 
-      "name": "acos_float_vert_xvary.test.html", 
+      },
+      "name": "acos_float_vert_xvary.test.html",
       "pattern": "compare"
-    }, 
+    },
     {
       "referenceProgram": {
-        "vertexShader": "acos_vec2_vert_xvary_ref.vert", 
+        "vertexShader": "acos_vec2_vert_xvary_ref.vert",
         "fragmentShader": "../default/default.frag"
-      }, 
-      "model": "grid", 
+      },
+      "model": "grid",
       "testProgram": {
-        "vertexShader": "acos_vec2_vert_xvary.vert", 
+        "vertexShader": "acos_vec2_vert_xvary.vert",
         "fragmentShader": "../default/default.frag"
-      }, 
-      "name": "acos_vec2_vert_xvary.test.html", 
+      },
+      "name": "acos_vec2_vert_xvary.test.html",
       "pattern": "compare"
-    }, 
+    },
     {
       "referenceProgram": {
-        "vertexShader": "acos_vec3_vert_xvary_ref.vert", 
+        "vertexShader": "acos_vec3_vert_xvary_ref.vert",
         "fragmentShader": "../default/default.frag"
-      }, 
-      "model": "grid", 
+      },
+      "model": "grid",
       "testProgram": {
-        "vertexShader": "acos_vec3_vert_xvary.vert", 
+        "vertexShader": "acos_vec3_vert_xvary.vert",
         "fragmentShader": "../default/default.frag"
-      }, 
-      "name": "acos_vec3_vert_xvary.test.html", 
+      },
+      "name": "acos_vec3_vert_xvary.test.html",
       "pattern": "compare"
     }
   ]
 });
 var successfullyParsed = true;
 </script>
 </html>
--- a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/acos/acos_float_frag_xvary_ref.frag
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/acos/acos_float_frag_xvary_ref.frag
@@ -57,25 +57,25 @@ void main (void)
 	asinValues[9] = 0.125328;
 	asinValues[10] = 0.25268;
 	asinValues[11] = 0.384397;
 	asinValues[12] = 0.523599;
 	asinValues[13] = 0.675132;
 	asinValues[14] = 0.848062;
 	asinValues[15] = 1.06544;
 	asinValues[16] = 1.5708;
-	
+
 	const float M_PI = 3.14159265358979323846;
 	float c = 2.0 * (color.r - 0.5);
-	
+
 	float arrVal = (c + 1.0) * 8.0;
 	int arr0 = int(floor(arrVal));
 	float weight = arrVal - floor(arrVal);
 	float asin_c = 0.0;
-	
+
 	if (arr0 == 0)
 		asin_c = lerp(asinValues[0], asinValues[1], weight);
 	else if (arr0 == 1)
 		asin_c = lerp(asinValues[1], asinValues[2], weight);
 	else if (arr0 == 2)
 		asin_c = lerp(asinValues[2], asinValues[3], weight);
 	else if (arr0 == 3)
 		asin_c = lerp(asinValues[3], asinValues[4], weight);
--- a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/acos/acos_vec2_frag_xvary_ref.frag
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/acos/acos_vec2_frag_xvary_ref.frag
@@ -57,20 +57,20 @@ void main (void)
 	asinValues[9] = 0.125328;
 	asinValues[10] = 0.25268;
 	asinValues[11] = 0.384397;
 	asinValues[12] = 0.523599;
 	asinValues[13] = 0.675132;
 	asinValues[14] = 0.848062;
 	asinValues[15] = 1.06544;
 	asinValues[16] = 1.5708;
-	
+
 	const float M_PI = 3.14159265358979323846;
 	vec2 c = 2.0 * (color.rg - 0.5);
-	
+
 	vec2 arrVal = (c + vec2(1.0, 1.0)) * 8.0;
 	int arr0x = int(floor(arrVal.x));
 	int arr0y = int(floor(arrVal.y));
 	vec2 weight = arrVal - floor(arrVal);
 	vec2 asin_c = vec2(0.0);
 
 	if (arr0x == 0)
 		asin_c.x = lerp(asinValues[0], asinValues[1], weight.x);
@@ -101,17 +101,17 @@ void main (void)
 	else if (arr0x == 13)
 		asin_c.x = lerp(asinValues[13], asinValues[14], weight.x);
 	else if (arr0x == 14)
 		asin_c.x = lerp(asinValues[14], asinValues[15], weight.x);
 	else if (arr0x == 15)
 		asin_c.x = lerp(asinValues[15], asinValues[16], weight.x);
         else if (arr0x == 16)
                 asin_c.x = asinValues[16];
-		
+
 	if (arr0y == 0)
 		asin_c.y = lerp(asinValues[0], asinValues[1], weight.y);
 	else if (arr0y == 1)
 		asin_c.y = lerp(asinValues[1], asinValues[2], weight.y);
 	else if (arr0y == 2)
 		asin_c.y = lerp(asinValues[2], asinValues[3], weight.y);
 	else if (arr0y == 3)
 		asin_c.y = lerp(asinValues[3], asinValues[4], weight.y);
--- a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/acos/acos_vec3_frag_xvary_ref.frag
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/acos/acos_vec3_frag_xvary_ref.frag
@@ -57,20 +57,20 @@ void main (void)
 	asinValues[9] = 0.125328;
 	asinValues[10] = 0.25268;
 	asinValues[11] = 0.384397;
 	asinValues[12] = 0.523599;
 	asinValues[13] = 0.675132;
 	asinValues[14] = 0.848062;
 	asinValues[15] = 1.06544;
 	asinValues[16] = 1.5708;
-	
+
 	const float M_PI = 3.14159265358979323846;
 	vec3 c = 2.0 * (color.rgb - 0.5);
-	
+
 	vec3 arrVal = (c + vec3(1.0, 1.0, 1.0)) * 8.0;
 	int arr0x = int(floor(arrVal.x));
 	int arr0y = int(floor(arrVal.y));
 	int arr0z = int(floor(arrVal.z));
 	vec3 weight = arrVal - floor(arrVal);
 	vec3 asin_c = vec3(0.0);
 
 	if (arr0x == 0)
@@ -102,17 +102,17 @@ void main (void)
 	else if (arr0x == 13)
 		asin_c.x = lerp(asinValues[13], asinValues[14], weight.x);
 	else if (arr0x == 14)
 		asin_c.x = lerp(asinValues[14], asinValues[15], weight.x);
 	else if (arr0x == 15)
 		asin_c.x = lerp(asinValues[15], asinValues[16], weight.x);
         else if (arr0x == 16)
                 asin_c.x = asinValues[16];
-		
+
 	if (arr0y == 0)
 		asin_c.y = lerp(asinValues[0], asinValues[1], weight.y);
 	else if (arr0y == 1)
 		asin_c.y = lerp(asinValues[1], asinValues[2], weight.y);
 	else if (arr0y == 2)
 		asin_c.y = lerp(asinValues[2], asinValues[3], weight.y);
 	else if (arr0y == 3)
 		asin_c.y = lerp(asinValues[3], asinValues[4], weight.y);
@@ -137,17 +137,17 @@ void main (void)
 	else if (arr0y == 13)
 		asin_c.y = lerp(asinValues[13], asinValues[14], weight.y);
 	else if (arr0y == 14)
 		asin_c.y = lerp(asinValues[14], asinValues[15], weight.y);
 	else if (arr0y == 15)
 		asin_c.y = lerp(asinValues[15], asinValues[16], weight.y);
         else if (arr0y == 16)
                 asin_c.y = asinValues[16];
-		
+
 	if (arr0z == 0)
 		asin_c.z = lerp(asinValues[0], asinValues[1], weight.z);
 	else if (arr0z == 1)
 		asin_c.z = lerp(asinValues[1], asinValues[2], weight.z);
 	else if (arr0z == 2)
 		asin_c.z = lerp(asinValues[2], asinValues[3], weight.z);
 	else if (arr0z == 3)
 		asin_c.z = lerp(asinValues[3], asinValues[4], weight.z);
--- a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/all/all_001_to_004.html
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/all/all_001_to_004.html
@@ -41,63 +41,63 @@
 <div id="console"></div>
 </body>
 <script>
 "use strict";
 OpenGLESTestRunner.run({
   "tests": [
     {
       "referenceProgram": {
-        "vertexShader": "../default/default.vert", 
+        "vertexShader": "../default/default.vert",
         "fragmentShader": "all_bvec2_frag_ref.frag"
-      }, 
-      "model": null, 
+      },
+      "model": null,
       "testProgram": {
-        "vertexShader": "../default/default.vert", 
+        "vertexShader": "../default/default.vert",
         "fragmentShader": "all_bvec2_frag.frag"
-      }, 
-      "name": "all_bvec2_frag.test.html", 
+      },
+      "name": "all_bvec2_frag.test.html",
       "pattern": "compare"
-    }, 
+    },
     {
       "referenceProgram": {
-        "vertexShader": "all_bvec2_vert_ref.vert", 
+        "vertexShader": "all_bvec2_vert_ref.vert",
         "fragmentShader": "../default/default.frag"
-      }, 
-      "model": "grid", 
+      },
+      "model": "grid",
       "testProgram": {
-        "vertexShader": "all_bvec2_vert.vert", 
+        "vertexShader": "all_bvec2_vert.vert",
         "fragmentShader": "../default/default.frag"
-      }, 
-      "name": "all_bvec2_vert.test.html", 
+      },
+      "name": "all_bvec2_vert.test.html",
       "pattern": "compare"
-    }, 
+    },
     {
       "referenceProgram": {
-        "vertexShader": "../default/default.vert", 
+        "vertexShader": "../default/default.vert",
         "fragmentShader": "all_bvec3_frag_ref.frag"
-      }, 
-      "model": null, 
+      },
+      "model": null,
       "testProgram": {
-        "vertexShader": "../default/default.vert", 
+        "vertexShader": "../default/default.vert",
         "fragmentShader": "all_bvec3_frag.frag"
-      }, 
-      "name": "all_bvec3_frag.test.html", 
+      },
+      "name": "all_bvec3_frag.test.html",
       "pattern": "compare"
-    }, 
+    },
     {
       "referenceProgram": {
-        "vertexShader": "all_bvec3_vert_ref.vert", 
+        "vertexShader": "all_bvec3_vert_ref.vert",
         "fragmentShader": "../default/default.frag"
-      }, 
-      "model": "grid", 
+      },
+      "model": "grid",
       "testProgram": {
-        "vertexShader": "all_bvec3_vert.vert", 
+        "vertexShader": "all_bvec3_vert.vert",
         "fragmentShader": "../default/default.frag"
-      }, 
-      "name": "all_bvec3_vert.test.html", 
+      },
+      "name": "all_bvec3_vert.test.html",
       "pattern": "compare"
     }
   ]
 });
 var successfullyParsed = true;
 </script>
 </html>
--- a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/all/all_bvec2_frag_ref.frag
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/all/all_bvec2_frag_ref.frag
@@ -26,20 +26,20 @@
 #ifdef GL_ES
 precision mediump float;
 #endif
 varying vec4 color;
 
 bool _all(in bvec2 a)
 {
 	bool temp = true;
-	
+
 	if(!a[0]) temp = false;
 	if(!a[1]) temp = false;
-	
+
 	return temp;
 }
 
 void main (void)
 {
 	vec2 c = floor(4.0 * color.rg);   // 3/4 true, 1/4 false
 	gl_FragColor = vec4(vec3(_all(bvec2(c))), 1.0);
 }
--- a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/all/all_bvec2_vert_ref.vert
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/all/all_bvec2_vert_ref.vert
@@ -26,20 +26,20 @@
 attribute vec4 gtf_Vertex;
 attribute vec4 gtf_Color;
 uniform mat4 gtf_ModelViewProjectionMatrix;
 varying vec4 color;
 
 bool _all(in bvec2 a)
 {
 	bool temp = true;
-	
+
 	if(!a[0]) temp = false;
 	if(!a[1]) temp = false;
-	
+
 	return temp;
 }
 
 void main (void)
 {
 	vec2 c = floor(4.0 * gtf_Color.rg);   // 3/4 true, 1/4 false
 	color = vec4(vec3(_all(bvec2(c))), 1.0);
 	gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
--- a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/all/all_bvec3_frag_ref.frag
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/all/all_bvec3_frag_ref.frag
@@ -26,21 +26,21 @@
 #ifdef GL_ES
 precision mediump float;
 #endif
 varying vec4 color;
 
 bool _all(in bvec3 a)
 {
 	bool temp = true;
-	
+
 	if(!a[0]) temp = false;
 	if(!a[1]) temp = false;
 	if(!a[2]) temp = false;
-	
+
 	return temp;
 }
 
 void main (void)
 {
 	vec3 c = floor(4.0 * color.rgb);   // 3/4 true, 1/4 false
 	gl_FragColor = vec4(vec3(_all(bvec3(c))), 1.0);
 }
--- a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/all/all_bvec3_vert_ref.vert
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/all/all_bvec3_vert_ref.vert
@@ -26,17 +26,17 @@
 attribute vec4 gtf_Vertex;
 attribute vec4 gtf_Color;
 uniform mat4 gtf_ModelViewProjectionMatrix;
 varying vec4 color;
 
 bool _all(in bvec3 a)
 {
 	bool temp = true;
-	
+
 	if(!a[0]) temp = false;
 	if(!a[1]) temp = false;
 	if(!a[2]) temp = false;
 
 	return temp;
 }
 
 void main (void)
--- a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/any/any_001_to_004.html
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/any/any_001_to_004.html
@@ -41,63 +41,63 @@
 <div id="console"></div>
 </body>
 <script>
 "use strict";
 OpenGLESTestRunner.run({
   "tests": [
     {
       "referenceProgram": {
-        "vertexShader": "../default/default.vert", 
+        "vertexShader": "../default/default.vert",
         "fragmentShader": "any_bvec2_frag_ref.frag"
-      }, 
-      "model": null, 
+      },
+      "model": null,
       "testProgram": {
-        "vertexShader": "../default/default.vert", 
+        "vertexShader": "../default/default.vert",
         "fragmentShader": "any_bvec2_frag.frag"
-      }, 
-      "name": "any_bvec2_frag.test.html", 
+      },
+      "name": "any_bvec2_frag.test.html",
       "pattern": "compare"
-    }, 
+    },
     {
       "referenceProgram": {
-        "vertexShader": "any_bvec2_vert_ref.vert", 
+        "vertexShader": "any_bvec2_vert_ref.vert",
         "fragmentShader": "../default/default.frag"
-      }, 
-      "model": "grid", 
+      },
+      "model": "grid",
       "testProgram": {
-        "vertexShader": "any_bvec2_vert.vert", 
+        "vertexShader": "any_bvec2_vert.vert",
         "fragmentShader": "../default/default.frag"
-      }, 
-      "name": "any_bvec2_vert.test.html", 
+      },
+      "name": "any_bvec2_vert.test.html",
       "pattern": "compare"
-    }, 
+    },
     {
       "referenceProgram": {
-        "vertexShader": "../default/default.vert", 
+        "vertexShader": "../default/default.vert",
         "fragmentShader": "any_bvec3_frag_ref.frag"
-      }, 
-      "model": null, 
+      },
+      "model": null,
       "testProgram": {
-        "vertexShader": "../default/default.vert", 
+        "vertexShader": "../default/default.vert",
         "fragmentShader": "any_bvec3_frag.frag"
-      }, 
-      "name": "any_bvec3_frag.test.html", 
+      },
+      "name": "any_bvec3_frag.test.html",
       "pattern": "compare"
-    }, 
+    },
     {
       "referenceProgram": {
-        "vertexShader": "any_bvec3_vert_ref.vert", 
+        "vertexShader": "any_bvec3_vert_ref.vert",
         "fragmentShader": "../default/default.frag"
-      }, 
-      "model": "grid", 
+      },
+      "model": "grid",
       "testProgram": {
-        "vertexShader": "any_bvec3_vert.vert", 
+        "vertexShader": "any_bvec3_vert.vert",
         "fragmentShader": "../default/default.frag"
-      }, 
-      "name": "any_bvec3_vert.test.html", 
+      },
+      "name": "any_bvec3_vert.test.html",
       "pattern": "compare"
     }
   ]
 });
 var successfullyParsed = true;
 </script>
 </html>
--- a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/any/any_bvec2_frag_ref.frag
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/any/any_bvec2_frag_ref.frag
@@ -26,17 +26,17 @@
 #ifdef GL_ES
 precision mediump float;
 #endif
 varying vec4 color;
 
 bool _any(in bvec2 a)
 {
 	bool temp = false;
-	
+
 	if(a[0]) temp = true;
 	if(a[1]) temp = true;
 
 	return temp;
 }
 
 void main (void)
 {
--- a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/any/any_bvec2_vert_ref.vert
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/any/any_bvec2_vert_ref.vert
@@ -26,17 +26,17 @@
 attribute vec4 gtf_Vertex;
 attribute vec4 gtf_Color;
 uniform mat4 gtf_ModelViewProjectionMatrix;
 varying vec4 color;
 
 bool _any(in bvec2 a)
 {
 	bool temp = false;
-	
+
 	if(a[0]) temp = true;
 	if(a[1]) temp = true;
 
 	return temp;
 }
 
 void main (void)
 {
--- a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/any/any_bvec3_frag_ref.frag
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/any/any_bvec3_frag_ref.frag
@@ -26,17 +26,17 @@
 #ifdef GL_ES
 precision mediump float;
 #endif
 varying vec4 color;
 
 bool _any(in bvec3 a)
 {
 	bool temp = false;
-	
+
 	if(a[0]) temp = true;
 	if(a[1]) temp = true;
 	if(a[2]) temp = true;
 
 	return temp;
 }
 
 void main (void)
--- a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/any/any_bvec3_vert_ref.vert
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/any/any_bvec3_vert_ref.vert
@@ -26,17 +26,17 @@
 attribute vec4 gtf_Vertex;
 attribute vec4 gtf_Color;
 uniform mat4 gtf_ModelViewProjectionMatrix;
 varying vec4 color;
 
 bool _any(in bvec3 a)
 {
 	bool temp = false;
-	
+
 	if(a[0]) temp = true;
 	if(a[1]) temp = true;
 	if(a[2]) temp = true;
 
 	return temp;
 }
 
 void main (void)
--- a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/array/array_001_to_006.html
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/array/array_001_to_006.html
@@ -41,181 +41,181 @@
 <div id="console"></div>
 </body>
 <script>
 "use strict";
 OpenGLESTestRunner.run({
   "tests": [
     {
       "referenceProgram": {
-        "vertexShader": "../default/default.vert", 
+        "vertexShader": "../default/default.vert",
         "uniforms": {
           "result": {
-            "count": 1, 
-            "type": "uniform4fv", 
+            "count": 1,
+            "type": "uniform4fv",
             "value": [
-              1.0, 
-              1.0, 
-              1.0, 
+              1.0,
+              1.0,
+              1.0,
               1.0
             ]
           }
-        }, 
+        },
         "fragmentShader": "../default/expected.frag"
-      }, 
-      "model": null, 
+      },
+      "model": null,
       "testProgram": {
-        "vertexShader": "../default/default.vert", 
+        "vertexShader": "../default/default.vert",
         "uniforms": {
           "new_mad2": {
-            "count": 2, 
-            "type": "uniform1fv", 
+            "count": 2,
+            "type": "uniform1fv",
             "value": [
-              45.0, 
+              45.0,
               14.0
             ]
           }
-        }, 
+        },
         "fragmentShader": "empty_uniform_array_float_frag.frag"
-      }, 
-      "name": "empty_uniform_array_float_frag.test.html", 
+      },
+      "name": "empty_uniform_array_float_frag.test.html",
       "pattern": "compare"
-    }, 
+    },
     {
       "referenceProgram": {
-        "vertexShader": "../default/default.vert", 
+        "vertexShader": "../default/default.vert",
         "uniforms": {
           "result": {
-            "count": 1, 
-            "type": "uniform4fv", 
+            "count": 1,
+            "type": "uniform4fv",
             "value": [
-              1.0, 
-              1.0, 
-              1.0, 
+              1.0,
+              1.0,
+              1.0,
               1.0
             ]
           }
-        }, 
+        },
         "fragmentShader": "../default/expected.frag"
-      }, 
-      "model": null, 
+      },
+      "model": null,
       "testProgram": {
-        "vertexShader": "empty_uniform_array_float_vert.vert", 
+        "vertexShader": "empty_uniform_array_float_vert.vert",
         "uniforms": {
           "new_mad2": {
-            "count": 2, 
-            "type": "uniform1fv", 
+            "count": 2,
+            "type": "uniform1fv",
             "value": [
-              45.0, 
+              45.0,
               14.0
             ]
           }
-        }, 
+        },
         "fragmentShader": "../default/default.frag"
-      }, 
-      "name": "empty_uniform_array_float_vert.test.html", 
+      },
+      "name": "empty_uniform_array_float_vert.test.html",
       "pattern": "compare"
-    }, 
+    },
     {
       "referenceProgram": {
-        "vertexShader": "../default/default.vert", 
+        "vertexShader": "../default/default.vert",
         "uniforms": {
           "result": {
-            "count": 1, 
-            "type": "uniform4fv", 
+            "count": 1,
+            "type": "uniform4fv",
             "value": [
-              1.0, 
-              1.0, 
-              1.0, 
+              1.0,
+              1.0,
+              1.0,
               1.0
             ]
           }
-        }, 
+        },
         "fragmentShader": "../default/expected.frag"
-      }, 
-      "model": null, 
+      },
+      "model": null,
       "testProgram": {
-        "vertexShader": "../default/default.vert", 
+        "vertexShader": "../default/default.vert",
         "fragmentShader": "empty_empty_array_float_frag.frag"
-      }, 
-      "name": "empty_empty_array_float_frag.test.html", 
+      },
+      "name": "empty_empty_array_float_frag.test.html",
       "pattern": "compare"
-    }, 
+    },
     {
       "referenceProgram": {
-        "vertexShader": "../default/default.vert", 
+        "vertexShader": "../default/default.vert",
         "uniforms": {
           "result": {
-            "count": 1, 
-            "type": "uniform4fv", 
+            "count": 1,
+            "type": "uniform4fv",
             "value": [
-              1.0, 
-              1.0, 
-              1.0, 
+              1.0,
+              1.0,
+              1.0,
               1.0
             ]
           }
-        }, 
+        },
         "fragmentShader": "../default/expected.frag"
-      }, 
-      "model": null, 
+      },
+      "model": null,
       "testProgram": {
-        "vertexShader": "empty_empty_array_float_vert.vert", 
+        "vertexShader": "empty_empty_array_float_vert.vert",
         "fragmentShader": "../default/default.frag"
-      }, 
-      "name": "empty_empty_array_float_vert.test.html", 
+      },
+      "name": "empty_empty_array_float_vert.test.html",
       "pattern": "compare"
-    }, 
+    },
     {
       "referenceProgram": {
-        "vertexShader": "../default/default.vert", 
+        "vertexShader": "../default/default.vert",
         "uniforms": {
           "result": {
-            "count": 1, 
-            "type": "uniform4fv", 
+            "count": 1,
+            "type": "uniform4fv",
             "value": [
-              1.0, 
-              1.0, 
-              1.0, 
+              1.0,
+              1.0,
+              1.0,
               1.0
             ]
           }
-        }, 
+        },
         "fragmentShader": "../default/expected.frag"
-      }, 
-      "model": null, 
+      },
+      "model": null,
       "testProgram": {
-        "vertexShader": "../default/default.vert", 
+        "vertexShader": "../default/default.vert",
         "fragmentShader": "initfunc_empty_array_float_frag.frag"
-      }, 
-      "name": "initfunc_empty_array_float_frag.test.html", 
+      },
+      "name": "initfunc_empty_array_float_frag.test.html",
       "pattern": "compare"
-    }, 
+    },
     {
       "referenceProgram": {
-        "vertexShader": "../default/default.vert", 
+        "vertexShader": "../default/default.vert",
         "uniforms": {
           "result": {
-            "count": 1, 
-            "type": "uniform4fv", 
+            "count": 1,
+            "type": "uniform4fv",
             "value": [
-              1.0, 
-              1.0, 
-              1.0, 
+              1.0,
+              1.0,
+              1.0,
               1.0
             ]
           }
-        }, 
+        },
         "fragmentShader": "../default/expected.frag"
-      }, 
-      "model": null, 
+      },
+      "model": null,
       "testProgram": {
-        "vertexShader": "initfunc_empty_array_float_vert.vert", 
+        "vertexShader": "initfunc_empty_array_float_vert.vert",
         "fragmentShader": "../default/default.frag"
-      }, 
-      "name": "initfunc_empty_array_float_vert.test.html", 
+      },
+      "name": "initfunc_empty_array_float_vert.test.html",
       "pattern": "compare"
     }
   ]
 });
 var successfullyParsed = true;
 </script>
 </html>
--- a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/array/empty_empty_array_float_frag.frag
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/array/empty_empty_array_float_frag.frag
@@ -24,22 +24,22 @@
 
 
 #ifdef GL_ES
 precision mediump float;
 #endif
 varying vec4 color;
 
 void main (void)
-{	
+{
 	int i=0;
 	float new_mad[2];
 	float gray = 0.0;
-	
+
 	new_mad[0]=float(1);
 	new_mad[1]=float(2);
-	  
+
 	if( (new_mad[0] == 1.0) && (new_mad[1] == 2.0) )
 	  gray=1.0;
 	else gray=0.0;
 	gl_FragColor = vec4(gray,gray , gray, 1.0);
 
 }
--- a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/array/empty_empty_array_float_vert.vert
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/array/empty_empty_array_float_vert.vert
@@ -30,15 +30,15 @@ varying vec4 color;
 void main (void)
 {
 	int i=0;
 	float new_mad[2];
 	float gray = 0.0;
 
 	new_mad[0]=float(1);
 	new_mad[1]=float(2);
-	
+
 	if( (new_mad[0] == 1.0) && (new_mad[1] == 2.0) )
 	  gray=1.0;
 	else gray=0.0;
 	color = vec4(gray, gray, gray, 1.0);
 	gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
 }
--- a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/array/empty_uniform_array_float_frag.frag
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/array/empty_uniform_array_float_frag.frag
@@ -29,17 +29,17 @@ precision mediump float;
 varying vec4 color;
 uniform float new_mad2[2];
 
 void main (void)
 {
 	int i=0;
 	float new_mad[2];
 	float gray = 0.0;
-	
+
 	new_mad[0]=new_mad2[0];
 	new_mad[1]=new_mad2[1];
-	  
+
 	if( (new_mad[0] == 45.0) && (new_mad[1] == 14.0) )
 	  gray=1.0;
 	else gray=0.0;
-	gl_FragColor = vec4(gray, gray, gray, 1.0);	
+	gl_FragColor = vec4(gray, gray, gray, 1.0);
 }
--- a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/array/initfunc_empty_array_float_frag.frag
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/array/initfunc_empty_array_float_frag.frag
@@ -34,17 +34,17 @@ void main (void)
 {
 	int i=0;
 	float new_mad[2];
 	float gray = 0.0;
 	initialise_array(new_mad,25.0);
 	if( (new_mad[0] == 25.0) && (new_mad[1] == 25.0) )
 	  gray=1.0;
 	else gray=0.0;
-	gl_FragColor = vec4(gray, gray, gray, 1.0);	
+	gl_FragColor = vec4(gray, gray, gray, 1.0);
 }
 
 void initialise_array(out float array[2], float init_val)
 {
 	int i=0;
-	array[0] = init_val;	
-	array[1] = init_val;	
+	array[0] = init_val;
+	array[1] = init_val;
 }
--- a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/asin/asin_001_to_006.html
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/asin/asin_001_to_006.html
@@ -41,89 +41,89 @@
 <div id="console"></div>
 </body>
 <script>
 "use strict";
 OpenGLESTestRunner.run({
   "tests": [
     {
       "referenceProgram": {
-        "vertexShader": "../default/default.vert", 
+        "vertexShader": "../default/default.vert",
         "fragmentShader": "asin_float_frag_xvary_ref.frag"
-      }, 
-      "model": null, 
+      },
+      "model": null,
       "testProgram": {
-        "vertexShader": "../default/default.vert", 
+        "vertexShader": "../default/default.vert",
         "fragmentShader": "asin_float_frag_xvary.frag"
-      }, 
-      "name": "asin_float_frag_xvary.test.html", 
+      },
+      "name": "asin_float_frag_xvary.test.html",
       "pattern": "compare"
-    }, 
+    },
     {
       "referenceProgram": {
-        "vertexShader": "../default/default.vert", 
+        "vertexShader": "../default/default.vert",
         "fragmentShader": "asin_vec2_frag_xvary_ref.frag"
-      }, 
-      "model": null, 
+      },
+      "model": null,
       "testProgram": {
-        "vertexShader": "../default/default.vert", 
+        "vertexShader": "../default/default.vert",
         "fragmentShader": "asin_vec2_frag_xvary.frag"
-      }, 
-      "name": "asin_vec2_frag_xvary.test.html", 
+      },
+      "name": "asin_vec2_frag_xvary.test.html",
       "pattern": "compare"
-    }, 
+    },
     {
       "referenceProgram": {
-        "vertexShader": "../default/default.vert", 
+        "vertexShader": "../default/default.vert",
         "fragmentShader": "asin_vec3_frag_xvary_ref.frag"
-      }, 
-      "model": null, 
+      },
+      "model": null,
       "testProgram": {
-        "vertexShader": "../default/default.vert", 
+        "vertexShader": "../default/default.vert",
         "fragmentShader": "asin_vec3_frag_xvary.frag"
-      }, 
-      "name": "asin_vec3_frag_xvary.test.html", 
+      },
+      "name": "asin_vec3_frag_xvary.test.html",
       "pattern": "compare"
-    }, 
+    },
     {
       "referenceProgram": {
-        "vertexShader": "asin_float_vert_xvary_ref.vert", 
+        "vertexShader": "asin_float_vert_xvary_ref.vert",
         "fragmentShader": "../default/default.frag"
-      }, 
-      "model": "grid", 
+      },
+      "model": "grid",
       "testProgram": {
-        "vertexShader": "asin_float_vert_xvary.vert", 
+        "vertexShader": "asin_float_vert_xvary.vert",
         "fragmentShader": "../default/default.frag"
-      }, 
-      "name": "asin_float_vert_xvary.test.html", 
+      },
+      "name": "asin_float_vert_xvary.test.html",
       "pattern": "compare"
-    }, 
+    },
     {
       "referenceProgram": {
-        "vertexShader": "asin_vec2_vert_xvary_ref.vert", 
+        "vertexShader": "asin_vec2_vert_xvary_ref.vert",
         "fragmentShader": "../default/default.frag"
-      }, 
-      "model": "grid", 
+      },
+      "model": "grid",
       "testProgram": {
-        "vertexShader": "asin_vec2_vert_xvary.vert", 
+        "vertexShader": "asin_vec2_vert_xvary.vert",
         "fragmentShader": "../default/default.frag"
-      }, 
-      "name": "asin_vec2_vert_xvary.test.html", 
+      },
+      "name": "asin_vec2_vert_xvary.test.html",
       "pattern": "compare"
-    }, 
+    },
     {
       "referenceProgram": {
-        "vertexShader": "asin_vec3_vert_xvary_ref.vert", 
+        "vertexShader": "asin_vec3_vert_xvary_ref.vert",
         "fragmentShader": "../default/default.frag"
-      }, 
-      "model": "grid", 
+      },
+      "model": "grid",
       "testProgram": {
-        "vertexShader": "asin_vec3_vert_xvary.vert", 
+        "vertexShader": "asin_vec3_vert_xvary.vert",
         "fragmentShader": "../default/default.frag"
-      }, 
-      "name": "asin_vec3_vert_xvary.test.html", 
+      },
+      "name": "asin_vec3_vert_xvary.test.html",
       "pattern": "compare"
     }
   ]
 });
 var successfullyParsed = true;
 </script>
 </html>
--- a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/asin/asin_float_frag_xvary_ref.frag
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/asin/asin_float_frag_xvary_ref.frag
@@ -57,25 +57,25 @@ void main (void)
 	asinValues[9] = 0.125328;
 	asinValues[10] = 0.25268;
 	asinValues[11] = 0.384397;
 	asinValues[12] = 0.523599;
 	asinValues[13] = 0.675132;
 	asinValues[14] = 0.848062;
 	asinValues[15] = 1.06544;
 	asinValues[16] = 1.5708;
-	
+
 	const float M_PI = 3.14159265358979323846;
 	float c = 2.0 * (color.r - 0.5);
-	
+
 	float arrVal = (c + 1.0) * 8.0;
 	int arr0 = int(floor(arrVal));
 	float weight = arrVal - floor(arrVal);
 	float asin_c = 0.0;
-	
+
 	if (arr0 == 0)
 		asin_c = lerp(asinValues[0], asinValues[1], weight);
 	else if (arr0 == 1)
 		asin_c = lerp(asinValues[1], asinValues[2], weight);
 	else if (arr0 == 2)
 		asin_c = lerp(asinValues[2], asinValues[3], weight);
 	else if (arr0 == 3)
 		asin_c = lerp(asinValues[3], asinValues[4], weight);
--- a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/asin/asin_vec2_frag_xvary_ref.frag
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/asin/asin_vec2_frag_xvary_ref.frag
@@ -57,20 +57,20 @@ void main (void)
 	asinValues[9] = 0.125328;
 	asinValues[10] = 0.25268;
 	asinValues[11] = 0.384397;
 	asinValues[12] = 0.523599;
 	asinValues[13] = 0.675132;
 	asinValues[14] = 0.848062;
 	asinValues[15] = 1.06544;
 	asinValues[16] = 1.5708;
-	
+
 	const float M_PI = 3.14159265358979323846;
 	vec2 c = 2.0 * (color.rg - 0.5);
-	
+
 	vec2 arrVal = (c + vec2(1.0, 1.0)) * 8.0;
 	int arr0x = int(floor(arrVal.x));
 	int arr0y = int(floor(arrVal.y));
 	vec2 weight = arrVal - floor(arrVal);
 	vec2 asin_c = vec2(0.0);
 
 	if (arr0x == 0)
 		asin_c.x = lerp(asinValues[0], asinValues[1], weight.x);
@@ -101,17 +101,17 @@ void main (void)
 	else if (arr0x == 13)
 		asin_c.x = lerp(asinValues[13], asinValues[14], weight.x);
 	else if (arr0x == 14)
 		asin_c.x = lerp(asinValues[14], asinValues[15], weight.x);
 	else if (arr0x == 15)
 		asin_c.x = lerp(asinValues[15], asinValues[16], weight.x);
         else if (arr0x == 16)
                 asin_c.x = asinValues[16];
-		
+
 	if (arr0y == 0)
 		asin_c.y = lerp(asinValues[0], asinValues[1], weight.y);
 	else if (arr0y == 1)
 		asin_c.y = lerp(asinValues[1], asinValues[2], weight.y);
 	else if (arr0y == 2)
 		asin_c.y = lerp(asinValues[2], asinValues[3], weight.y);
 	else if (arr0y == 3)
 		asin_c.y = lerp(asinValues[3], asinValues[4], weight.y);
--- a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/asin/asin_vec3_frag_xvary_ref.frag
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/asin/asin_vec3_frag_xvary_ref.frag
@@ -57,20 +57,20 @@ void main (void)
 	asinValues[9] = 0.125328;
 	asinValues[10] = 0.25268;
 	asinValues[11] = 0.384397;
 	asinValues[12] = 0.523599;
 	asinValues[13] = 0.675132;
 	asinValues[14] = 0.848062;
 	asinValues[15] = 1.06544;
 	asinValues[16] = 1.5708;
-	
+
 	const float M_PI = 3.14159265358979323846;
 	vec3 c = 2.0 * (color.rgb - 0.5);
-	
+
 	vec3 arrVal = (c + vec3(1.0, 1.0, 1.0)) * 8.0;
 	int arr0x = int(floor(arrVal.x));
 	int arr0y = int(floor(arrVal.y));
 	int arr0z = int(floor(arrVal.z));
 	vec3 weight = arrVal - floor(arrVal);
 	vec3 asin_c = vec3(0.0);
 
 	if (arr0x == 0)
@@ -102,17 +102,17 @@ void main (void)
 	else if (arr0x == 13)
 		asin_c.x = lerp(asinValues[13], asinValues[14], weight.x);
 	else if (arr0x == 14)
 		asin_c.x = lerp(asinValues[14], asinValues[15], weight.x);
 	else if (arr0x == 15)
 		asin_c.x = lerp(asinValues[15], asinValues[16], weight.x);
         else if (arr0x == 16)
                 asin_c.x = asinValues[16];
-		
+
 	if (arr0y == 0)
 		asin_c.y = lerp(asinValues[0], asinValues[1], weight.y);
 	else if (arr0y == 1)
 		asin_c.y = lerp(asinValues[1], asinValues[2], weight.y);
 	else if (arr0y == 2)
 		asin_c.y = lerp(asinValues[2], asinValues[3], weight.y);
 	else if (arr0y == 3)
 		asin_c.y = lerp(asinValues[3], asinValues[4], weight.y);
@@ -137,17 +137,17 @@ void main (void)
 	else if (arr0y == 13)
 		asin_c.y = lerp(asinValues[13], asinValues[14], weight.y);
 	else if (arr0y == 14)
 		asin_c.y = lerp(asinValues[14], asinValues[15], weight.y);
 	else if (arr0y == 15)
 		asin_c.y = lerp(asinValues[15], asinValues[16], weight.y);
         else if (arr0y == 16)
                 asin_c.y = asinValues[16];
-		
+
 	if (arr0z == 0)
 		asin_c.z = lerp(asinValues[0], asinValues[1], weight.z);
 	else if (arr0z == 1)
 		asin_c.z = lerp(asinValues[1], asinValues[2], weight.z);
 	else if (arr0z == 2)
 		asin_c.z = lerp(asinValues[2], asinValues[3], weight.z);
 	else if (arr0z == 3)
 		asin_c.z = lerp(asinValues[3], asinValues[4], weight.z);
--- a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/atan/atan_001_to_008.html
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/atan/atan_001_to_008.html
@@ -41,115 +41,115 @@
 <div id="console"></div>
 </body>
 <script>
 "use strict";
 OpenGLESTestRunner.run({
   "tests": [
     {
       "referenceProgram": {
-        "vertexShader": "../default/default.vert", 
+        "vertexShader": "../default/default.vert",
         "fragmentShader": "atan_float_frag_xvary_ref.frag"
-      }, 
-      "model": null, 
+      },
+      "model": null,
       "testProgram": {
-        "vertexShader": "../default/default.vert", 
+        "vertexShader": "../default/default.vert",
         "fragmentShader": "atan_float_frag_xvary.frag"
-      }, 
-      "name": "atan_float_frag_xvary.test.html", 
+      },
+      "name": "atan_float_frag_xvary.test.html",
       "pattern": "compare"
-    }, 
+    },
     {
       "referenceProgram": {
-        "vertexShader": "../default/default.vert", 
+        "vertexShader": "../default/default.vert",
         "fragmentShader": "atan_vec2_frag_xvary_ref.frag"
-      }, 
-      "model": null, 
+      },
+      "model": null,
       "testProgram": {
-        "vertexShader": "../default/default.vert", 
+        "vertexShader": "../default/default.vert",
         "fragmentShader": "atan_vec2_frag_xvary.frag"
-      }, 
-      "name": "atan_vec2_frag_xvary.test.html", 
+      },
+      "name": "atan_vec2_frag_xvary.test.html",
       "pattern": "compare"
-    }, 
+    },
     {
       "referenceProgram": {
-        "vertexShader": "../default/default.vert", 
+        "vertexShader": "../default/default.vert",
         "fragmentShader": "atan_vec3_frag_xvary_ref.frag"
-      }, 
-      "model": null, 
+      },
+      "model": null,
       "testProgram": {
-        "vertexShader": "../default/default.vert", 
+        "vertexShader": "../default/default.vert",
         "fragmentShader": "atan_vec3_frag_xvary.frag"
-      }, 
-      "name": "atan_vec3_frag_xvary.test.html", 
+      },
+      "name": "atan_vec3_frag_xvary.test.html",
       "pattern": "compare"
-    }, 
+    },
     {
       "referenceProgram": {
-        "vertexShader": "../default/default.vert", 
+        "vertexShader": "../default/default.vert",
         "fragmentShader": "atan_float_frag_xvaryyvary_ref.frag"
-      }, 
-      "model": null, 
+      },
+      "model": null,
       "testProgram": {
-        "vertexShader": "../default/default.vert", 
+        "vertexShader": "../default/default.vert",
         "fragmentShader": "atan_float_frag_xvaryyvary.frag"
-      }, 
-      "name": "atan_float_frag_xvaryyvary.test.html", 
+      },
+      "name": "atan_float_frag_xvaryyvary.test.html",
       "pattern": "compare"
-    }, 
+    },
     {
       "referenceProgram": {
-        "vertexShader": "../default/default.vert", 
+        "vertexShader": "../default/default.vert",
         "fragmentShader": "atan_vec2_frag_xvaryyvary_ref.frag"
-      }, 
-      "model": null, 
+      },
+      "model": null,
       "testProgram": {
-        "vertexShader": "../default/default.vert", 
+        "vertexShader": "../default/default.vert",
         "fragmentShader": "atan_vec2_frag_xvaryyvary.frag"
-      }, 
-      "name": "atan_vec2_frag_xvaryyvary.test.html", 
+      },
+      "name": "atan_vec2_frag_xvaryyvary.test.html",
       "pattern": "compare"
-    }, 
+    },
     {
       "referenceProgram": {
-        "vertexShader": "../default/default.vert", 
+        "vertexShader": "../default/default.vert",
         "fragmentShader": "atan_vec3_frag_xvaryyvary_ref.frag"
-      }, 
-      "model": null, 
+      },
+      "model": null,
       "testProgram": {
-        "vertexShader": "../default/default.vert", 
+        "vertexShader": "../default/default.vert",
         "fragmentShader": "atan_vec3_frag_xvaryyvary.frag"
-      }, 
-      "name": "atan_vec3_frag_xvaryyvary.test.html", 
+      },
+      "name": "atan_vec3_frag_xvaryyvary.test.html",
       "pattern": "compare"
-    }, 
+    },
     {
       "referenceProgram": {
-        "vertexShader": "atan_float_vert_xvary_ref.vert", 
+        "vertexShader": "atan_float_vert_xvary_ref.vert",
         "fragmentShader": "../default/default.frag"
-      }, 
-      "model": "grid", 
+      },
+      "model": "grid",
       "testProgram": {
-        "vertexShader": "atan_float_vert_xvary.vert", 
+        "vertexShader": "atan_float_vert_xvary.vert",
         "fragmentShader": "../default/default.frag"
-      }, 
-      "name": "atan_float_vert_xvary.test.html", 
+      },
+      "name": "atan_float_vert_xvary.test.html",
       "pattern": "compare"
-    }, 
+    },
     {
       "referenceProgram": {
-        "vertexShader": "atan_vec2_vert_xvary_ref.vert", 
+        "vertexShader": "atan_vec2_vert_xvary_ref.vert",
         "fragmentShader": "../default/default.frag"
-      }, 
-      "model": "grid", 
+      },
+      "model": "grid",
       "testProgram": {
-        "vertexShader": "atan_vec2_vert_xvary.vert", 
+        "vertexShader": "atan_vec2_vert_xvary.vert",
         "fragmentShader": "../default/default.frag"
-      }, 
-      "name": "atan_vec2_vert_xvary.test.html", 
+      },
+      "name": "atan_vec2_vert_xvary.test.html",
       "pattern": "compare"
     }
   ]
 });
 var successfullyParsed = true;
 </script>
 </html>
--- a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/atan/atan_009_to_012.html
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/atan/atan_009_to_012.html
@@ -41,63 +41,63 @@
 <div id="console"></div>
 </body>
 <script>
 "use strict";
 OpenGLESTestRunner.run({
   "tests": [
     {
       "referenceProgram": {
-        "vertexShader": "atan_vec3_vert_xvary_ref.vert", 
+        "vertexShader": "atan_vec3_vert_xvary_ref.vert",
         "fragmentShader": "../default/default.frag"
-      }, 
-      "model": "grid", 
+      },
+      "model": "grid",
       "testProgram": {
-        "vertexShader": "atan_vec3_vert_xvary.vert", 
+        "vertexShader": "atan_vec3_vert_xvary.vert",
         "fragmentShader": "../default/default.frag"
-      }, 
-      "name": "atan_vec3_vert_xvary.test.html", 
+      },
+      "name": "atan_vec3_vert_xvary.test.html",
       "pattern": "compare"
-    }, 
+    },
     {
       "referenceProgram": {
-        "vertexShader": "atan_float_vert_xvaryyvary_ref.vert", 
+        "vertexShader": "atan_float_vert_xvaryyvary_ref.vert",
         "fragmentShader": "../default/default.frag"
-      }, 
-      "model": "grid", 
+      },
+      "model": "grid",
       "testProgram": {
-        "vertexShader": "atan_float_vert_xvaryyvary.vert", 
+        "vertexShader": "atan_float_vert_xvaryyvary.vert",
         "fragmentShader": "../default/default.frag"
-      }, 
-      "name": "atan_float_vert_xvaryyvary.test.html", 
+      },
+      "name": "atan_float_vert_xvaryyvary.test.html",
       "pattern": "compare"
-    }, 
+    },
     {
       "referenceProgram": {
-        "vertexShader": "atan_vec2_vert_xvaryyvary_ref.vert", 
+        "vertexShader": "atan_vec2_vert_xvaryyvary_ref.vert",
         "fragmentShader": "../default/default.frag"
-      }, 
-      "model": "grid", 
+      },
+      "model": "grid",
       "testProgram": {
-        "vertexShader": "atan_vec2_vert_xvaryyvary.vert", 
+        "vertexShader": "atan_vec2_vert_xvaryyvary.vert",
         "fragmentShader": "../default/default.frag"
-      }, 
-      "name": "atan_vec2_vert_xvaryyvary.test.html", 
+      },
+      "name": "atan_vec2_vert_xvaryyvary.test.html",
       "pattern": "compare"
-    }, 
+    },
     {
       "referenceProgram": {
-        "vertexShader": "atan_vec3_vert_xvaryyvary_ref.vert", 
+        "vertexShader": "atan_vec3_vert_xvaryyvary_ref.vert",
         "fragmentShader": "../default/default.frag"
-      }, 
-      "model": "grid", 
+      },
+      "model": "grid",
       "testProgram": {
-        "vertexShader": "atan_vec3_vert_xvaryyvary.vert", 
+        "vertexShader": "atan_vec3_vert_xvaryyvary.vert",
         "fragmentShader": "../default/default.frag"
-      }, 
-      "name": "atan_vec3_vert_xvaryyvary.test.html", 
+      },
+      "name": "atan_vec3_vert_xvaryyvary.test.html",
       "pattern": "compare"
     }
   ]
 });
 var successfullyParsed = true;
 </script>
 </html>
--- a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/atan/atan_float_frag_xvaryyvary.frag
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/atan/atan_float_frag_xvaryyvary.frag
@@ -34,15 +34,15 @@ varying vec4 color;
 
 void main (void)
 {
 	const float M_PI = 3.14159265358979323846;
 	float x = 2.0 * (color.g - 0.5);
 	float y = 2.0 * (color.b - 0.5);
 	const float epsilon = 1.0e-4;
 	gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);
-	
+
 	// Avoid evaluating atan(0, x) for x < epsilon because it's implementation-dependent
 	if(x > epsilon || abs(y) > epsilon)
 	{
 		gl_FragColor = vec4(atan(y, x) / (2.0 * M_PI) + 0.5, 0.0, 0.0, 1.0);
 	}
 }
--- a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/atan/atan_float_frag_xvaryyvary_ref.frag
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/atan/atan_float_frag_xvaryyvary_ref.frag
@@ -37,17 +37,17 @@ void main (void)
 	const float M_PI = 3.14159265358979323846;
 	float x = 2.0 * (color.g - 0.5);
 	float y = 2.0 * (color.b - 0.5);
 	float atan_c = 0.0;
 	float scale = 1.0;
 	float sign = 1.0;
 	vec4 result = vec4(0.0, 0.0, 0.0, 1.0);
 	const float epsilon = 1.0e-4;
-	
+
 	// Avoid evaluating atan(0, x) for x < epsilon because it's implementation-dependent
 	if(x > epsilon || abs(y) > epsilon)
 	{
 		if(x < 0.0 ^^ y < 0.0)
 		{
 			sign = -1.0;
 		}
 
@@ -77,12 +77,12 @@ void main (void)
 
 			result = vec4(sign * (M_PI / 2.0 - atan_c) / (2.0 * M_PI) + 0.5, 0.0, 0.0, 1.0);
 		}
 
 		if(x < 0.0)
 			if(y < 0.0) result.r -= 0.5;
 			else if(y > 0.0) result.r += 0.5;
 	}
-	
+
 	gl_FragColor = result;
 }
 
--- a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/atan/atan_float_vert_xvaryyvary.vert
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/atan/atan_float_vert_xvaryyvary.vert
@@ -30,17 +30,17 @@ varying vec4 color;
 
 void main (void)
 {
 	const float M_PI = 3.14159265358979323846;
 	float x = 2.0 * (gtf_Color.g - 0.5);
 	float y = 2.0 * (gtf_Color.b - 0.5);
 	const float epsilon = 1.0e-4;
 	color = vec4(0.0, 0.0, 0.0, 1.0);
-	
+
 	// Avoid evaluating atan(0, x) for x < epsilon because it's implementation-dependent
 	if(x > epsilon || abs(y) > epsilon)
 	{
 		color = vec4(atan(y, x) / (2.0 * M_PI) + 0.5, 0.0, 0.0, 1.0);
 	}
-	
+
 	gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
 }
--- a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/atan/atan_float_vert_xvaryyvary_ref.vert
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/atan/atan_float_vert_xvaryyvary_ref.vert
@@ -73,13 +73,13 @@ void main (void)
 
 			result = vec4(sign * (M_PI / 2.0 - atan_c) / (2.0 * M_PI) + 0.5, 0.0, 0.0, 1.0);
 		}
 
 		if(x < 0.0)
 			if(y < 0.0) result.r -= 0.5;
 			else if(y > 0.0) result.r += 0.5;
 	}
-	
+
 	color = result;
 	gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
 }
 
--- a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/atan/atan_vec2_frag_xvary_ref.frag
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/atan/atan_vec2_frag_xvary_ref.frag
@@ -31,17 +31,17 @@ varying vec4 color;
 void main (void)
 {
 	const float M_PI = 3.14159265358979323846;
 	vec2 c = 4.0 * 2.0 * (color.rg - 0.5);
 	vec2 atan_c = vec2(0.0);
 	vec2 scale = vec2(1.0);
 	vec2 sign = vec2(1.0);
 	vec4 result = vec4(0.0, 0.0, 0.0, 1.0);
-	
+
 	if(c[0] < 0.0)
 	{
 		sign[0] = -1.0;
 		c[0] *= -1.0;
 	}
 
 	if(c[0] <= 1.0)
 	{
@@ -76,18 +76,18 @@ void main (void)
 		scale[0] *= -1.0;
 		atan_c[0] += scale[0] * pow(c[0], float(9)) / float(9);
 		scale[0] *= -1.0;
 		atan_c[0] += scale[0] * pow(c[0], float(11)) / float(11);
 		scale[0] *= -1.0;
 
 		result[0] = sign[0] * (M_PI / 2.0 - atan_c[0]) / M_PI + 0.5;
 	}
-	
-	
+
+
 	if(c[1] < 0.0)
 	{
 		sign[1] = -1.0;
 		c[1] *= -1.0;
 	}
 
 	if(c[1] <= 1.0)
 	{
--- a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/atan/atan_vec2_frag_xvaryyvary.frag
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/atan/atan_vec2_frag_xvaryyvary.frag
@@ -30,17 +30,17 @@ varying vec4 color;
 
 void main (void)
 {
 	const float M_PI = 3.14159265358979323846;
 	vec2 x = 2.0 * (color.gg - 0.5);
 	vec2 y = 2.0 * (color.bb - 0.5);
 	const float epsilon = 1.0e-4;
 	gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);
-	
+
 	// Avoid evaluating atan(0, x) for x < epsilon because it's implementation-dependent
 	if(x[0] > epsilon || abs(y[0]) > epsilon)
 	{
 		gl_FragColor[0] = atan(y[0], x[0]) / (2.0 * M_PI) + 0.5;
 	}
 
 	if(x[1] > epsilon || abs(y[1]) > epsilon)
 	{
--- a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/atan/atan_vec2_frag_xvaryyvary_ref.frag
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/atan/atan_vec2_frag_xvaryyvary_ref.frag
@@ -87,20 +87,20 @@ void main (void)
 
 			result[0] = sign[0] * (M_PI / 2.0 - atan_c[0]) / (2.0 * M_PI) + 0.5;
 		}
 
 		if(x[0] < 0.0)
 			if(y[0] < 0.0) result[0] -= 0.5;
 			else if(y[0] > 0.0) result[0] += 0.5;
 	}
-		
+
 	if(x[1] > epsilon || abs(y[1]) > epsilon)
 	{
-	
+
 		if(x[1] < 0.0 ^^ y[1] < 0.0)
 		{
 			sign[1] = -1.0;
 		}
 
 		if(abs(y[1]) <= abs(x[1]))
 		{
 			c[1] = abs(y[1] / x[1]);
--- a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/atan/atan_vec2_vert_xvary_ref.vert
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/atan/atan_vec2_vert_xvary_ref.vert
@@ -76,17 +76,17 @@ void main (void)
 		scale[0] *= -1.0;
 		atan_c[0] += scale[0] * pow(c[0], float(9)) / float(9);
 		scale[0] *= -1.0;
 		atan_c[0] += scale[0] * pow(c[0], float(11)) / float(11);
 		scale[0] *= -1.0;
 
 		result[0] = sign[0] * (M_PI / 2.0 - atan_c[0]) / M_PI + 0.5;
 	}
-	
+
 
 	if(c[1] < 0.0)
 	{
 		sign[1] = -1.0;
 		c[1] *= -1.0;
 	}
 
 	if(c[1] <= 1.0)
--- a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/atan/atan_vec2_vert_xvaryyvary.vert
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/atan/atan_vec2_vert_xvaryyvary.vert
@@ -30,22 +30,22 @@ varying vec4 color;
 
 void main (void)
 {
 	const float M_PI = 3.14159265358979323846;
 	vec2 x = 2.0 * (gtf_Color.gg - 0.5);
 	vec2 y = 2.0 * (gtf_Color.bb - 0.5);
 	const float epsilon = 1.0e-4;
 	color = vec4(0.0, 0.0, 0.0, 1.0);
-	
+
 	// Avoid evaluating atan(0, x) for x < epsilon because it's implementation-dependent
 	if(x[0] > epsilon || abs(y[0]) > epsilon)
 	{
 		color[0] = atan(y[0], x[0]) / (2.0 * M_PI) + 0.5;
 	}
 
 	if(x[1] > epsilon || abs(y[1]) > epsilon)
 	{
 		color[1] = atan(y[1], x[1]) / (2.0 * M_PI) + 0.5;
 	}
-	
+
 	gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
 }
--- a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/atan/atan_vec2_vert_xvaryyvary_ref.vert
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/atan/atan_vec2_vert_xvaryyvary_ref.vert
@@ -87,17 +87,17 @@ void main (void)
 
 			result[0] = sign[0] * (M_PI / 2.0 - atan_c[0]) / (2.0 * M_PI) + 0.5;
 		}
 
 		if(x[0] < 0.0)
 			if(y[0] < 0.0) result[0] -= 0.5;
 			else if(y[0] > 0.0) result[0] += 0.5;
 	}
-			
+
 	if(x[1] > epsilon || abs(y[1]) > epsilon)
 	{
 		if(x[1] < 0.0 ^^ y[1] < 0.0)
 		{
 			sign[1] = -1.0;
 		}
 
 		if(abs(y[1]) <= abs(x[1]))
@@ -139,12 +139,12 @@ void main (void)
 
 			result[1] = sign[1] * (M_PI / 2.0 - atan_c[1]) / (2.0 * M_PI) + 0.5;
 		}
 
 		if(x[1] < 0.0)
 			if(y[1] < 0.0) result[1] -= 0.5;
 			else if(y[1] > 0.0) result[1] += 0.5;
 	}
-	
+
 	color = result;
 	gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
 }
--- a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/atan/atan_vec3_frag_xvary_ref.frag
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/atan/atan_vec3_frag_xvary_ref.frag
@@ -32,17 +32,17 @@ void main (void)
 {
 	const float M_PI = 3.14159265358979323846;
 	vec3 c = 4.0 * 2.0 * (color.rgb - 0.5);
 	vec3 atan_c = vec3(0.0);
 	vec3 scale = vec3(1.0);
 	vec3 sign = vec3(1.0);
 	vec4 result = vec4(0.0, 0.0, 0.0, 1.0);
 
-		
+
 	if(c[0] < 0.0)
 	{
 		sign[0] = -1.0;
 		c[0] *= -1.0;
 	}
 
 	if(c[0] <= 1.0)
 	{
@@ -77,17 +77,17 @@ void main (void)
 		scale[0] *= -1.0;
 		atan_c[0] += scale[0] * pow(c[0], float(9)) / float(9);
 		scale[0] *= -1.0;
 		atan_c[0] += scale[0] * pow(c[0], float(11)) / float(11);
 		scale[0] *= -1.0;
 
 		result[0] = sign[0] * (M_PI / 2.0 - atan_c[0]) / M_PI + 0.5;
 	}
-		
+
 	if(c[1] < 0.0)
 	{
 		sign[1] = -1.0;
 		c[1] *= -1.0;
 	}
 
 	if(c[1] <= 1.0)
 	{
@@ -122,18 +122,18 @@ void main (void)
 		scale[1] *= -1.0;
 		atan_c[1] += scale[1] * pow(c[1], float(9)) / float(9);
 		scale[1] *= -1.0;
 		atan_c[1] += scale[1] * pow(c[1], float(11)) / float(11);
 		scale[1] *= -1.0;
 
 		result[1] = sign[1] * (M_PI / 2.0 - atan_c[1]) / M_PI + 0.5;
 	}
-	
-	
+
+
 	if(c[2] < 0.0)
 	{
 		sign[2] = -1.0;
 		c[2] *= -1.0;
 	}
 
 	if(c[2] <= 1.0)
 	{
--- a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/atan/atan_vec3_frag_xvaryyvary.frag
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/atan/atan_vec3_frag_xvaryyvary.frag
@@ -30,17 +30,17 @@ varying vec4 color;
 
 void main (void)
 {
 	const float M_PI = 3.14159265358979323846;
 	vec3 x = 2.0 * (color.ggg - 0.5);
 	vec3 y = 2.0 * (color.bbb - 0.5);
 	const float epsilon = 1.0e-4;
 	gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);
-	
+
 	// Avoid evaluating atan(0, x) for x < epsilon because it's implementation-dependent
 	if(x[0] > epsilon || abs(y[0]) > epsilon)
 	{
 		gl_FragColor[0] = atan(y[0], x[0]) / (2.0 * M_PI) + 0.5;
 	}
 
 	if(x[1] > epsilon || abs(y[1]) > epsilon)
 	{
--- a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/atan/atan_vec3_frag_xvaryyvary_ref.frag
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/atan/atan_vec3_frag_xvaryyvary_ref.frag
@@ -34,17 +34,17 @@ void main (void)
 	vec3 x = 2.0 * (color.ggg - 0.5);
 	vec3 y = 2.0 * (color.bbb - 0.5);
 	vec3 c;
 	vec3 atan_c = vec3(0.0);
 	vec3 scale = vec3(1.0);
 	vec3 sign = vec3(1.0);
 	vec4 result = vec4(0.0, 0.0, 0.0, 1.0);
 	const float epsilon = 1.0e-4;
-	
+
 	// Avoid evaluating atan(0, x) for x < epsilon because it's implementation-dependent
 	if(x[0] > epsilon || abs(y[0]) > epsilon)
 	{
 		if(x[0] < 0.0 ^^ y[0] < 0.0)
 		{
 			sign[0] = -1.0;
 		}
 
@@ -87,20 +87,20 @@ void main (void)
 
 			result[0] = sign[0] * (M_PI / 2.0 - atan_c[0]) / (2.0 * M_PI) + 0.5;
 		}
 
 		if(x[0] < 0.0)
 			if(y[0] < 0.0) result[0] -= 0.5;
 			else if(y[0] > 0.0) result[0] += 0.5;
 	}
-	
+
 	if(x[1] > epsilon || abs(y[1]) > epsilon)
 	{
-	
+
 		if(x[1] < 0.0 ^^ y[1] < 0.0)
 		{
 			sign[1] = -1.0;
 		}
 
 		if(abs(y[1]) <= abs(x[1]))
 		{
 			c[1] = abs(y[1] / x[1]);
@@ -118,17 +118,17 @@ void main (void)
 			atan_c[1] += scale[1] * pow(c[1], float(11)) / float(11);
 			scale[1] *= -1.0;
 
 			result[1] = sign[1] * atan_c[1] / (2.0 * M_PI) + 0.5;
 		}
 		else
 		{
 			c[1] = abs(x[1] / y[1]);
-	
+
 			// Taylors series expansion for atan
 			atan_c[1] += scale[1] * pow(c[1], float(1)) / float(1);
 			scale[1] *= -1.0;
 			atan_c[1] += scale[1] * pow(c[1], float(3)) / float(3);
 			scale[1] *= -1.0;
 			atan_c[1] += scale[1] * pow(c[1], float(5)) / float(5);
 			scale[1] *= -1.0;
 			atan_c[1] += scale[1] * pow(c[1], float(7)) / float(7);
@@ -140,20 +140,20 @@ void main (void)
 
 			result[1] = sign[1] * (M_PI / 2.0 - atan_c[1]) / (2.0 * M_PI) + 0.5;
 		}
 
 		if(x[1] < 0.0)
 			if(y[1] < 0.0) result[1] -= 0.5;
 			else if(y[1] > 0.0) result[1] += 0.5;
 	}
-	
+
 	if(x[2] > epsilon || abs(y[2]) > epsilon)
 	{
-	
+
 		if(x[2] < 0.0 ^^ y[2] < 0.0)
 		{
 			sign[2] = -1.0;
 		}
 
 		if(abs(y[2]) <= abs(x[2]))
 		{
 			c[2] = abs(y[2] / x[2]);
--- a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/atan/atan_vec3_vert_xvary_ref.vert
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/atan/atan_vec3_vert_xvary_ref.vert
@@ -76,17 +76,17 @@ void main (void)
 		scale[0] *= -1.0;
 		atan_c[0] += scale[0] * pow(c[0], float(9)) / float(9);
 		scale[0] *= -1.0;
 		atan_c[0] += scale[0] * pow(c[0], float(11)) / float(11);
 		scale[0] *= -1.0;
 
 		result[0] = sign[0] * (M_PI / 2.0 - atan_c[0]) / M_PI + 0.5;
 	}
-	
+
 
 	if(c[1] < 0.0)
 	{
 		sign[1] = -1.0;
 		c[1] *= -1.0;
 	}
 
 	if(c[1] <= 1.0)
@@ -122,17 +122,17 @@ void main (void)
 		scale[1] *= -1.0;
 		atan_c[1] += scale[1] * pow(c[1], float(9)) / float(9);
 		scale[1] *= -1.0;
 		atan_c[1] += scale[1] * pow(c[1], float(11)) / float(11);
 		scale[1] *= -1.0;
 
 		result[1] = sign[1] * (M_PI / 2.0 - atan_c[1]) / M_PI + 0.5;
 	}
-	
+
 	if(c[2] < 0.0)
 	{
 		sign[2] = -1.0;
 		c[2] *= -1.0;
 	}
 
 	if(c[2] <= 1.0)
 	{
--- a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/atan/atan_vec3_vert_xvaryyvary.vert
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/atan/atan_vec3_vert_xvaryyvary.vert
@@ -30,27 +30,27 @@ varying vec4 color;
 
 void main (void)
 {
 	const float M_PI = 3.14159265358979323846;
 	vec3 x = 2.0 * (gtf_Color.ggg - 0.5);
 	vec3 y = 2.0 * (gtf_Color.bbb - 0.5);
 	const float epsilon = 1.0e-4;
 	color = vec4(0.0, 0.0, 0.0, 1.0);
-	
+
 	// Avoid evaluating atan(0, x) for x < epsilon because it's implementation-dependent
 	if(x[0] > epsilon || abs(y[0]) > epsilon)
 	{
 		color[0] = atan(y[0], x[0]) / (2.0 * M_PI) + 0.5;
 	}
 
 	if(x[1] > epsilon || abs(y[1]) > epsilon)
 	{
 		color[1] = atan(y[1], x[1]) / (2.0 * M_PI) + 0.5;
 	}
 
 	if(x[2] > epsilon || abs(y[2]) > epsilon)
 	{
 		color[2] = atan(y[2], x[2]) / (2.0 * M_PI) + 0.5;
 	}
-	
+
 	gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
 }
--- a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/atan/atan_vec3_vert_xvaryyvary_ref.vert
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/atan/atan_vec3_vert_xvaryyvary_ref.vert
@@ -87,17 +87,17 @@ void main (void)
 
 			result[0] = sign[0] * (M_PI / 2.0 - atan_c[0]) / (2.0 * M_PI) + 0.5;
 		}
 
 		if(x[0] < 0.0)
 			if(y[0] < 0.0) result[0] -= 0.5;
 			else if(y[0] > 0.0) result[0] += 0.5;
 	}
-			
+
 	if(x[1] > epsilon || abs(y[1]) > epsilon)
 	{
 		if(x[1] < 0.0 ^^ y[1] < 0.0)
 		{
 			sign[1] = -1.0;
 		}
 
 		if(abs(y[1]) <= abs(x[1]))
--- a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/biConstants/biConstants_001_to_008.html
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/biConstants/biConstants_001_to_008.html
@@ -41,211 +41,211 @@
 <div id="console"></div>
 </body>
 <script>
 "use strict";
 OpenGLESTestRunner.run({
   "tests": [
     {
       "referenceProgram": {
-        "vertexShader": "../default/default.vert", 
+        "vertexShader": "../default/default.vert",
         "uniforms": {
           "result": {
-            "count": 1, 
-            "type": "uniform4fv", 
+            "count": 1,
+            "type": "uniform4fv",
             "value": [
-              1.0, 
-              1.0, 
-              1.0, 
+              1.0,
+              1.0,
+              1.0,
               1.0
             ]
           }
-        }, 
+        },
         "fragmentShader": "../default/expected.frag"
-      }, 
-      "model": null, 
+      },
+      "model": null,
       "testProgram": {
-        "vertexShader": "../default/default.vert", 
+        "vertexShader": "../default/default.vert",
         "fragmentShader": "gl_MaxCombinedTextureImageUnits_frag.frag"
-      }, 
-      "name": "gl_MaxCombinedTextureImageUnits_frag.test.html", 
+      },
+      "name": "gl_MaxCombinedTextureImageUnits_frag.test.html",
       "pattern": "compare"
-    }, 
+    },
     {
       "referenceProgram": {
-        "vertexShader": "../default/default.vert", 
+        "vertexShader": "../default/default.vert",
         "uniforms": {
           "result": {
-            "count": 1, 
-            "type": "uniform4fv", 
+            "count": 1,
+            "type": "uniform4fv",
             "value": [
-              1.0, 
-              1.0, 
-              1.0, 
+              1.0,
+              1.0,
+              1.0,
               1.0
             ]
           }
-        }, 
+        },
         "fragmentShader": "../default/expected.frag"
-      }, 
-      "model": "grid", 
+      },
+      "model": "grid",
       "testProgram": {
-        "vertexShader": "gl_MaxCombinedTextureImageUnits_vert.vert", 
+        "vertexShader": "gl_MaxCombinedTextureImageUnits_vert.vert",
         "fragmentShader": "../default/default.frag"
-      }, 
-      "name": "gl_MaxCombinedTextureImageUnits_vert.test.html", 
+      },
+      "name": "gl_MaxCombinedTextureImageUnits_vert.test.html",
       "pattern": "compare"
-    }, 
+    },
     {
       "referenceProgram": {
-        "vertexShader": "../default/default.vert", 
+        "vertexShader": "../default/default.vert",
         "uniforms": {
           "result": {
-            "count": 1, 
-            "type": "uniform4fv", 
+            "count": 1,
+            "type": "uniform4fv",
             "value": [
-              1.0, 
-              1.0, 
-              1.0, 
+              1.0,
+              1.0,
+              1.0,
               1.0
             ]
           }
-        }, 
+        },
         "fragmentShader": "../default/expected.frag"
-      }, 
-      "model": null, 
+      },
+      "model": null,
       "testProgram": {
-        "vertexShader": "../default/default.vert", 
+        "vertexShader": "../default/default.vert",
         "fragmentShader": "gl_MaxDrawBuffers_frag.frag"
-      }, 
-      "name": "gl_MaxDrawBuffers_frag.test.html", 
+      },
+      "name": "gl_MaxDrawBuffers_frag.test.html",
       "pattern": "compare"
-    }, 
+    },
     {
       "referenceProgram": {
-        "vertexShader": "../default/default.vert", 
+        "vertexShader": "../default/default.vert",
         "uniforms": {
           "result": {
-            "count": 1, 
-            "type": "uniform4fv", 
+            "count": 1,
+            "type": "uniform4fv",
             "value": [
-              1.0, 
-              1.0, 
-              1.0, 
+              1.0,
+              1.0,
+              1.0,
               1.0
             ]
           }
-        }, 
+        },
         "fragmentShader": "../default/expected.frag"
-      }, 
-      "model": "grid", 
+      },
+      "model": "grid",
       "testProgram": {
-        "vertexShader": "gl_MaxDrawBuffers_vert.vert", 
+        "vertexShader": "gl_MaxDrawBuffers_vert.vert",
         "fragmentShader": "../default/default.frag"
-      }, 
-      "name": "gl_MaxDrawBuffers_vert.test.html", 
+      },
+      "name": "gl_MaxDrawBuffers_vert.test.html",
       "pattern": "compare"
-    }, 
+    },
     {
       "referenceProgram": {
-        "vertexShader": "../default/default.vert", 
+        "vertexShader": "../default/default.vert",
         "uniforms": {
           "result": {
-            "count": 1, 
-            "type": "uniform4fv", 
+            "count": 1,
+            "type": "uniform4fv",
             "value": [
-              1.0, 
-              1.0, 
-              1.0, 
+              1.0,
+              1.0,
+              1.0,
               1.0
             ]
           }
-        }, 
+        },
         "fragmentShader": "../default/expected.frag"
-      }, 
-      "model": null, 
+      },
+      "model": null,
       "testProgram": {
-        "vertexShader": "../default/default.vert", 
+        "vertexShader": "../default/default.vert",
         "fragmentShader": "gl_MaxFragmentUniformVectors_frag.frag"
-      }, 
-      "name": "gl_MaxFragmentUniformVectors_frag.test.html", 
+      },
+      "name": "gl_MaxFragmentUniformVectors_frag.test.html",
       "pattern": "compare"
-    }, 
+    },
     {
       "referenceProgram": {
-        "vertexShader": "../default/default.vert", 
+        "vertexShader": "../default/default.vert",
         "uniforms": {
           "result": {
-            "count": 1, 
-            "type": "uniform4fv", 
+            "count": 1,
+            "type": "uniform4fv",
             "value": [
-              1.0, 
-              1.0, 
-              1.0, 
+              1.0,
+              1.0,
+              1.0,
               1.0
             ]
           }
-        }, 
+        },
         "fragmentShader": "../default/expected.frag"
-      }, 
-      "model": "grid", 
+      },
+      "model": "grid",
       "testProgram": {
-        "vertexShader": "gl_MaxFragmentUniformVectors_vert.vert", 
+        "vertexShader": "gl_MaxFragmentUniformVectors_vert.vert",
         "fragmentShader": "../default/default.frag"
-      }, 
-      "name": "gl_MaxFragmentUniformVectors_vert.test.html", 
+      },
+      "name": "gl_MaxFragmentUniformVectors_vert.test.html",
       "pattern": "compare"
-    }, 
+    },
     {
       "referenceProgram": {
-        "vertexShader": "../default/default.vert", 
+        "vertexShader": "../default/default.vert",
         "uniforms": {
           "result": {
-            "count": 1, 
-            "type": "uniform4fv", 
+            "count": 1,
+            "type": "uniform4fv",
             "value": [
-              1.0, 
-              1.0, 
-              1.0, 
+              1.0,
+              1.0,
+              1.0,
               1.0
             ]
           }
-        }, 
+        },
         "fragmentShader": "../default/expected.frag"
-      }, 
-      "model": null, 
+      },
+      "model": null,
       "testProgram": {
-        "vertexShader": "../default/default.vert", 
+        "vertexShader": "../default/default.vert",
         "fragmentShader": "gl_MaxTextureImageUnits_frag.frag"
-      }, 
-      "name": "gl_MaxTextureImageUnits_frag.test.html", 
+      },
+      "name": "gl_MaxTextureImageUnits_frag.test.html",
       "pattern": "compare"
-    }, 
+    },
     {
       "referenceProgram": {
-        "vertexShader": "../default/default.vert", 
+        "vertexShader": "../default/default.vert",
         "uniforms": {
           "result": {
-            "count": 1, 
-            "type": "uniform4fv", 
+            "count": 1,
+            "type": "uniform4fv",
             "value": [
-              1.0, 
-              1.0, 
-              1.0, 
+              1.0,
+              1.0,
+              1.0,
               1.0
             ]
           }
-        }, 
+        },
         "fragmentShader": "../default/expected.frag"
-      }, 
-      "model": "grid", 
+      },
+      "model": "grid",
       "testProgram": {
-        "vertexShader": "gl_MaxTextureImageUnits_vert.vert", 
+        "vertexShader": "gl_MaxTextureImageUnits_vert.vert",
         "fragmentShader": "../default/default.frag"
-      }, 
-      "name": "gl_MaxTextureImageUnits_vert.test.html", 
+      },
+      "name": "gl_MaxTextureImageUnits_vert.test.html",
       "pattern": "compare"
     }
   ]
 });
 var successfullyParsed = true;
 </script>
 </html>
--- a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/biConstants/biConstants_009_to_016.html
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/biConstants/biConstants_009_to_016.html
@@ -41,211 +41,211 @@
 <div id="console"></div>
 </body>
 <script>
 "use strict";
 OpenGLESTestRunner.run({
   "tests": [
     {
       "referenceProgram": {
-        "vertexShader": "../default/default.vert", 
+        "vertexShader": "../default/default.vert",
         "uniforms": {
           "result": {
-            "count": 1, 
-            "type": "uniform4fv", 
+            "count": 1,
+            "type": "uniform4fv",
             "value": [
-              1.0, 
-              1.0, 
-              1.0, 
+              1.0,
+              1.0,
+              1.0,
               1.0
             ]
           }
-        }, 
+        },
         "fragmentShader": "../default/expected.frag"
-      }, 
-      "model": null, 
+      },
+      "model": null,
       "testProgram": {
-        "vertexShader": "../default/default.vert", 
+        "vertexShader": "../default/default.vert",
         "fragmentShader": "gl_MaxVaryingVectors_frag.frag"
-      }, 
-      "name": "gl_MaxVaryingVectors_frag.test.html", 
+      },
+      "name": "gl_MaxVaryingVectors_frag.test.html",
       "pattern": "compare"
-    }, 
+    },
     {
       "referenceProgram": {
-        "vertexShader": "../default/default.vert", 
+        "vertexShader": "../default/default.vert",
         "uniforms": {
           "result": {
-            "count": 1, 
-            "type": "uniform4fv", 
+            "count": 1,
+            "type": "uniform4fv",
             "value": [
-              1.0, 
-              1.0, 
-              1.0, 
+              1.0,
+              1.0,
+              1.0,
               1.0
             ]
           }
-        }, 
+        },
         "fragmentShader": "../default/expected.frag"
-      }, 
-      "model": "grid", 
+      },
+      "model": "grid",
       "testProgram": {
-        "vertexShader": "gl_MaxVaryingVectors_vert.vert", 
+        "vertexShader": "gl_MaxVaryingVectors_vert.vert",
         "fragmentShader": "../default/default.frag"
-      }, 
-      "name": "gl_MaxVaryingVectors_vert.test.html", 
+      },
+      "name": "gl_MaxVaryingVectors_vert.test.html",
       "pattern": "compare"
-    }, 
+    },
     {
       "referenceProgram": {
-        "vertexShader": "../default/default.vert", 
+        "vertexShader": "../default/default.vert",
         "uniforms": {
           "result": {
-            "count": 1, 
-            "type": "uniform4fv", 
+            "count": 1,
+            "type": "uniform4fv",
             "value": [
-              1.0, 
-              1.0, 
-              1.0, 
+              1.0,
+              1.0,
+              1.0,
               1.0
             ]
           }
-        }, 
+        },
         "fragmentShader": "../default/expected.frag"
-      }, 
-      "model": null, 
+      },
+      "model": null,
       "testProgram": {
-        "vertexShader": "../default/default.vert", 
+        "vertexShader": "../default/default.vert",
         "fragmentShader": "gl_MaxVertexAttribs_frag.frag"
-      }, 
-      "name": "gl_MaxVertexAttribs_frag.test.html", 
+      },
+      "name": "gl_MaxVertexAttribs_frag.test.html",
       "pattern": "compare"
-    }, 
+    },
     {
       "referenceProgram": {
-        "vertexShader": "../default/default.vert", 
+        "vertexShader": "../default/default.vert",
         "uniforms": {
           "result": {
-            "count": 1, 
-            "type": "uniform4fv", 
+            "count": 1,
+            "type": "uniform4fv",
             "value": [
-              1.0, 
-              1.0, 
-              1.0, 
+              1.0,
+              1.0,
+              1.0,
               1.0
             ]
           }
-        }, 
+        },
         "fragmentShader": "../default/expected.frag"
-      }, 
-      "model": "grid", 
+      },
+      "model": "grid",
       "testProgram": {
-        "vertexShader": "gl_MaxVertexAttribs_vert.vert", 
+        "vertexShader": "gl_MaxVertexAttribs_vert.vert",
         "fragmentShader": "../default/default.frag"
-      }, 
-      "name": "gl_MaxVertexAttribs_vert.test.html", 
+      },
+      "name": "gl_MaxVertexAttribs_vert.test.html",
       "pattern": "compare"
-    }, 
+    },
     {
       "referenceProgram": {
-        "vertexShader": "../default/default.vert", 
+        "vertexShader": "../default/default.vert",
         "uniforms": {
           "result": {
-            "count": 1, 
-            "type": "uniform4fv", 
+            "count": 1,
+            "type": "uniform4fv",
             "value": [
-              1.0, 
-              1.0, 
-              1.0, 
+              1.0,
+              1.0,
+              1.0,
               1.0
             ]
           }
-        }, 
+        },
         "fragmentShader": "../default/expected.frag"
-      }, 
-      "model": null, 
+      },
+      "model": null,
       "testProgram": {
-        "vertexShader": "../default/default.vert", 
+        "vertexShader": "../default/default.vert",
         "fragmentShader": "gl_MaxVertexTextureImageUnits_frag.frag"
-      }, 
-      "name": "gl_MaxVertexTextureImageUnits_frag.test.html", 
+      },
+      "name": "gl_MaxVertexTextureImageUnits_frag.test.html",
       "pattern": "compare"
-    }, 
+    },
     {
       "referenceProgram": {
-        "vertexShader": "../default/default.vert", 
+        "vertexShader": "../default/default.vert",
         "uniforms": {
           "result": {
-            "count": 1, 
-            "type": "uniform4fv", 
+            "count": 1,
+            "type": "uniform4fv",
             "value": [
-              1.0, 
-              1.0, 
-              1.0, 
+              1.0,
+              1.0,
+              1.0,
               1.0
             ]
           }
-        }, 
+        },
         "fragmentShader": "../default/expected.frag"
-      }, 
-      "model": "grid", 
+      },
+      "model": "grid",
       "testProgram": {
-        "vertexShader": "gl_MaxVertexTextureImageUnits_vert.vert", 
+        "vertexShader": "gl_MaxVertexTextureImageUnits_vert.vert",
         "fragmentShader": "../default/default.frag"
-      }, 
-      "name": "gl_MaxVertexTextureImageUnits_vert.test.html", 
+      },
+      "name": "gl_MaxVertexTextureImageUnits_vert.test.html",
       "pattern": "compare"
-    }, 
+    },
     {
       "referenceProgram": {
-        "vertexShader": "../default/default.vert", 
+        "vertexShader": "../default/default.vert",
         "uniforms": {
           "result": {
-            "count": 1, 
-            "type": "uniform4fv", 
+            "count": 1,
+            "type": "uniform4fv",
             "value": [
-              1.0, 
-              1.0, 
-              1.0, 
+              1.0,
+              1.0,
+              1.0,
               1.0
             ]
           }
-        }, 
+        },
         "fragmentShader": "../default/expected.frag"
-      }, 
-      "model": null, 
+      },
+      "model": null,
       "testProgram": {
-        "vertexShader": "../default/default.vert", 
+        "vertexShader": "../default/default.vert",
         "fragmentShader": "gl_MaxVertexUniformVectors_frag.frag"
-      }, 
-      "name": "gl_MaxVertexUniformVectors_frag.test.html", 
+      },
+      "name": "gl_MaxVertexUniformVectors_frag.test.html",
       "pattern": "compare"
-    }, 
+    },
     {
       "referenceProgram": {
-        "vertexShader": "../default/default.vert", 
+        "vertexShader": "../default/default.vert",
         "uniforms": {
           "result": {
-            "count": 1, 
-            "type": "uniform4fv", 
+            "count": 1,
+            "type": "uniform4fv",
             "value": [
-              1.0, 
-              1.0, 
-              1.0, 
+              1.0,
+              1.0,
+              1.0,
               1.0
             ]
           }
-        }, 
+        },
         "fragmentShader": "../default/expected.frag"
-      }, 
-      "model": "grid", 
+      },
+      "model": "grid",
       "testProgram": {
-        "vertexShader": "gl_MaxVertexUniformVectors_vert.vert", 
+        "vertexShader": "gl_MaxVertexUniformVectors_vert.vert",
         "fragmentShader": "../default/default.frag"
-      }, 
-      "name": "gl_MaxVertexUniformVectors_vert.test.html", 
+      },
+      "name": "gl_MaxVertexUniformVectors_vert.test.html",
       "pattern": "compare"
     }
   ]
 });
 var successfullyParsed = true;
 </script>
 </html>
--- a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/build/CorrectBuiltInOveride_frag.frag
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/build/CorrectBuiltInOveride_frag.frag
@@ -24,16 +24,16 @@
 
 
 #ifdef GL_ES
 precision mediump int;
 #endif
 
 int radians(int f)
 {
-    return f; 
+    return f;
 }
 
 void main()
 {
     int f = 45;
     f = radians(f);
 }
--- a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/build/CorrectConstFolding1_vert.vert
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/build/CorrectConstFolding1_vert.vert
@@ -21,19 +21,19 @@
 ** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 ** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
 */
 
 
 void main()
 {
 
-   const struct s2 { 
+   const struct s2 {
        int i;
-       vec3 v3; 
+       vec3 v3;
        bvec4 bv4;
    } s22  = s2(8, vec3(9, 10, 11), bvec4(true, false, true, false));
 
    struct s4 {
        int ii;
        vec4 v4;
       };
 
@@ -43,11 +43,11 @@ void main()
       float f;
       mat4 m;
  	s4 s44;
    } s11 = s1(s22, 2, 4.0, mat4(5), s4(6, vec4(7, 8, 9, 10))) ;
 
   const int field3 = s11.i * s11.ss.i;  // constant folding (int * int)
   const vec4 field4 = s11.s44.v4 * s11.s44.v4; // constant folding (vec4 * vec4)
  // 49, 64, 81, 100
-  const vec4 v4 = vec4(s11.ss.v3.y, s11.m[3][3], field3, field4[2]);  // 10.0, 5.0, 16.0, 81.0 
+  const vec4 v4 = vec4(s11.ss.v3.y, s11.m[3][3], field3, field4[2]);  // 10.0, 5.0, 16.0, 81.0
   gl_Position = v4;
 }
--- a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/build/CorrectConstFolding2_vert.vert
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/build/CorrectConstFolding2_vert.vert
@@ -30,98 +30,98 @@ void main()
     };
     const struct s {
         int i;
     	float j;
       s5 s55;
     } ss = s(4,1.0, s5(1.0));
 
 
-   const struct s2 { 
+   const struct s2 {
        int i;
-       vec3 v3; 
+       vec3 v3;
        bvec4 bv4;
    } s22  = s2(8, vec3(9, 10, 11), bvec4(true, false, true, false));
 
   struct s4 {
           int ii;
           vec4 v4;
-      };  
+      };
 
    const struct s1 {
       s2 ss;
       int i;
       float f;
       mat4 m;
       s4 s44;
      } s11 = s1(s22, 2, 4.0, mat4(5), s4(6, vec4(7, 8, 9, 10))) ;
 
 
    const struct s7 {
        int i;
        mat3 m3;
    } s77 = s7(12, mat3(15));
 
-  vec2       v21 = vec2(1);  // Not a constant 
+  vec2       v21 = vec2(1);  // Not a constant
   const vec2 v22 = vec2(11); // 11.0, 11.0
   const vec4 v41 = vec4(2);  // 2.0, 2.0, 2.0, 2.0
   const vec4 v43 = vec4(4,4,4,4); // 4.0, 4.0, 4.0, 4.0
   const vec4 v44 = vec4(5.0, 5.0, 5.0, 5.0); // 5.0, 5.0, 5.0, 5.0
   const vec4 v45 = vec4(v22, v22);  // 11.0, 11.0, 11.0, 11.0
   const vec4 v46 = vec4(vec2(20, 21), vec2(22, 23));  // 20.0, 21.0, 22.0, 23.0
 
   const vec3 v31 = vec3(s22.v3);  // 9.0, 10.0, 11.0
-  const vec3 v32 = vec3(s77.m3);  // 15.0, 0, 0 
+  const vec3 v32 = vec3(s77.m3);  // 15.0, 0, 0
   const vec3 v33 = vec3(s77.m3[2]); // 0, 0, 15.0
   const vec3 v34 = vec3(s77.m3[2][0]);  // 0,0,0
 
-  
+
   const mat4 m41 = mat4(1);  // 1,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1
   const mat4 m42 = mat4(v44, v44, v44, v44);  // all 5s
   const mat4 m43 = mat4( v43.x);  // 4,0,0,0,0,4,0,0,0,0,0,4,0,0,0,0,0,4
 
   const vec4 v47 = vec4(m41[0][0]);  // 1.0,1.0,1.0,1.0
 
-  const mat4 m45 = mat4(s22.v3, v44, v45, v32, 50, 52);  //9,10,11,5,5,5,5,11,11,11,11,15.0, 0,0, 50.0, 52.0 
+  const mat4 m45 = mat4(s22.v3, v44, v45, v32, 50, 52);  //9,10,11,5,5,5,5,11,11,11,11,15.0, 0,0, 50.0, 52.0
   //const mat3 m31 = mat3(1, mat2(1), 2.0, vec3(1));  // 1.0, 1,0,0,1,2,1,1,1
   const vec4 v48 = vec4(v31[0], v22[1], v41[0], v43[3]);  //9, 11, 2, 4
   const vec4 v49 = vec4(s22.v3.xy, s22.v3.zx); // 9,10,11,9
   const vec4 v410 = vec4(v44.xy, v43.zx);  //5,5,4,4
 
   const vec4 v411 = vec4(m42[3]);  // 5,5,5,5
   const vec4 v412 = vec4(m43[2]);  // 0,0,4,0
 
   const vec2 v23 = vec2(m41);  // 1,0
-  
+
   const vec2 v24 = vec2(33, s11.i);  // 33, 2
 
-  const vec4 v413 = vec4(vec2(1.0,2.0),ivec2(3.0,4.0));  // 1,2,3,4 
+  const vec4 v413 = vec4(vec2(1.0,2.0),ivec2(3.0,4.0));  // 1,2,3,4
   const ivec4 i41 = ivec4(1.0, 2.0, 3.0, 4.0);  // 1,2,3,4
-  
+
   const ivec4 i42 = ivec4(6);  // 6,6,6,6
   const ivec4 i43 = ivec4(v45);  //11,11,11,11
 
   const ivec4 i44 = ivec4(v44[0]);  // 5,5,5,5
   const ivec4 i45 = ivec4(vec2(20, 21), vec2(22, 23));  // 20, 21, 22, 23
-  const vec4 v414 = vec4(ivec2(29, 30), ivec2(31, 32)); // 29.0, 30.0, 31.0, 32.0 
+  const vec4 v414 = vec4(ivec2(29, 30), ivec2(31, 32)); // 29.0, 30.0, 31.0, 32.0
   const ivec4 i46 = ivec4(ivec2(2.0,3.0), ivec3(4.0,5.0,6.0));
   const ivec4 i47 = ivec4(i46);  // 2,3,4,5
   const ivec4 i48 = ivec4(v414.x);  // 29,29,29,29
 
   const ivec4 i49 = ivec4(vec4(1)); // 1,1,1,1
   const ivec4 i414 = ivec4(mat4(14)); // 14, 0,0,0,
   const ivec4 i410 = ivec4(m43);  // 4,0,0,0
   const ivec4 i411 = ivec4(m43[1]);  // 0, 4, 0, 0
   const ivec4 i412 = ivec4(s77.i); // 12, 12, 12, 12
   const ivec4 i416 = ivec4(s22.v3.zyx, 12);  // 11, 10, 9, 12
 
-  const vec4 v415 = vec4(ivec2(35), ivec2(36)); // 35.0, 35.0 ,36.0 , 36.0 
+  const vec4 v415 = vec4(ivec2(35), ivec2(36)); // 35.0, 35.0 ,36.0 , 36.0
 
   const bvec4 b41 = bvec4(1.0, 2.0, 3.0, 4.0);  // true,true,true,true
-  
+
   const bvec4 b42 = bvec4(6);  // true,true,true,true
   const bvec4 b43 = bvec4(v45);  //true,true,true,true
 
   const bvec4 b44 = bvec4(v44[0]);  // true,true,true,true
   const bvec4 b45 = bvec4(vec2(0, 21), vec2(0, 1));  // false, true, false, true
   const bvec4 b46 = bvec4(ivec2(0.0,3.0), ivec3(0,5.0,6.0)); // false, true, false, true
   const bvec4 b47 = bvec4(i46);  // true,true,true,true
   const bvec4 b48 = bvec4(v414.x);  // true,true,true,true
@@ -136,17 +136,17 @@ void main()
 
 
   struct s10 {
      int k;
   };
   struct s9 {
        float f;
       s10 s101;
-   }; 
+   };
   const struct s8 {
       int i;
       s9 s99;
   } s88 = s8(1, s9(2.0, s10(5)));
 
    struct st4 {
        int m;
        vec3 v3;
@@ -154,17 +154,17 @@ void main()
    struct st3 {
       int k;
       int l;
       st4 st44;
      };
    struct st2 {
        float f;
        st3 st33;
-  }; 
+  };
   const struct st1 {
       int i;
       st2 st22;
   } st11 = st1(1, st2(2.0, st3(5, 6, st4(7, v35))));
 
   const vec4 v416 = vec4(s88.s99.s101.k); // all 5s
   const vec4 v417 = vec4(st11.st22.st33.st44.v3, s88.s99.s101.k);  // 7.0, 8.0, 9.0, 5.0
   const vec3 v36 = vec3(s11.ss.v3);  // 9, 10, 11
@@ -179,169 +179,169 @@ void main()
       int k;
   } struct22 = struct2(4);
 
   const struct struct1 {
        struct2 sst2;
   } struct11 = struct1(struct2(2));
 
   const vec4 v420 = v417;  // 7.0, 8.0, 9.0 , 5.0
-  
+
   vec4 v421 = vec4(s11.m);  // 5, 0, 0, 0
   vec4 v422 = v420;  // 7.0, 8.0, 9.0 , 5.0
 
   vec4 v423 = s11.s44.v4;   // 7, 8, 9, 10
-  
+
   int int1 = ss.i * ss.i;  // 16
   int int2 = ss.i * 2;  // 8
 
   const vec4 v425 = v420 * v420;  // 49, 64, 81, 25
   const vec4 v426 = s11.m * s11.s44.v4; // 35, 40, 45, 50
   const vec4 v427 = s11.s44.v4 * s11.m; // 35, 40, 45, 50
-  
-  float ff = 2.0; 
+
+  float ff = 2.0;
   const float ffConst = 2.0;
-  
+
   vec4 v428 = ff + v425;  // ordinary assignment with binary node
   vec3 v39 = vec3(5);
 
   vec3 v310 = s22.v3 + v39;  //14, 15, 16
 
   const vec4 v429 = v420 + v420; // 14, 16, 18, 10
-  const vec4 v430 = v420 + ffConst;  // 9, 10, 11,7 
+  const vec4 v430 = v420 + ffConst;  // 9, 10, 11,7
   const vec4 v432 =  v429 + s11.f;  // 18, 20, 22, 14
 
   const vec4 v433 = vec4(s11.f + s11.f);  // all 8s
   const vec4 v434 = v432 + vec4(3);  // 21, 23, 25, 17
   const mat4 m48 = s11.m + ffConst;  // diagonal 7s and others 2s
   const mat4 m49 = mat4(ffConst + s11.f);  // diagonal 6s
   const mat4 m410 = m48 + s11.f;  // diagonal 11, others - 6s
 
   const mat4 m413 = m48 + m48 ; // diagonal 14, others 4
-  const mat4 m414 = m413 + ffConst ; // diagonal 16, others 6 
+  const mat4 m414 = m413 + ffConst ; // diagonal 16, others 6
 
-  const vec4 v435 = ffConst + v420;  // 9, 10, 11,7 
+  const vec4 v435 = ffConst + v420;  // 9, 10, 11,7
   const vec4 v436 =  s11.f + v429;  // 18, 20, 22, 14
   const mat4 m415 = ffConst + s11.m;  // diagonal 7s and others 2s
   const mat4 m416 = s11.f + m48 ;  // diagonal 11, others - 6s
-  const mat4 m417 = ffConst + m413 ; // diagonal 16, others 6 
+  const mat4 m417 = ffConst + m413 ; // diagonal 16, others 6
 
   const vec4 v437 = v420 - v420; // 0, 0, 0, 0
-  const vec4 v438 = v420 - ffConst;  // 5, 6, 7,3 
+  const vec4 v438 = v420 - ffConst;  // 5, 6, 7,3
   const vec4 v440 =  v429 - s11.f;  // 10, 12, 14, 6
 
   const vec4 v441 = vec4(s11.f - s11.f);  // all 0s
   const vec4 v442 = v432 - vec4(3);  // 15, 17, 19, 11
   const mat4 m418 = s11.m - ffConst;  // diagonal 3s and others -2s
   const mat4 m419 = mat4(ffConst - s11.f);  // diagonal -> -2s
   const mat4 m420 = m48 - s11.f;  // diagonal 3, others -> -2
 
   const mat4 m423 = m48 - m48 ; // All 0s
-  const mat4 m424 = m413 - ffConst ; // diagonal 12, others 2 
+  const mat4 m424 = m413 - ffConst ; // diagonal 12, others 2
 
-  const vec4 v443 = ffConst - v420;  // -5, -6, -7,-3 
+  const vec4 v443 = ffConst - v420;  // -5, -6, -7,-3
   const vec4 v444 =  s11.f - v429;  // -10, -12, -14, -6
   const mat4 m425 = ffConst - s11.m;  // diagonal -3s and others 2s
   const mat4 m426 = s11.f - m48 ;  // diagonal -3, others  2s
-  const mat4 m427 = ffConst - m413 ; // diagonal -12, others -2 
+  const mat4 m427 = ffConst - m413 ; // diagonal -12, others -2
 
   const vec4 v445 = v420 * v420; // 49, 64, 81, 25
-  const vec4 v446 = v420 * ffConst;  // 14, 16, 18,10 
+  const vec4 v446 = v420 * ffConst;  // 14, 16, 18,10
   const vec4 v448 =  v429 * s11.f;  // 56, 46, 72, 40
 
   const vec4 v449 = vec4(s11.f * s11.f);  // all 16
   const vec4 v450 = v432 * vec4(3);  // 54, 60, 66, 42
   const mat4 m428 = s11.m * ffConst;  // diagonal 10 and others 0s
   const mat4 m429 = mat4(ffConst * s11.f);  // diagonal 8
   const mat4 m430 = m48 * s11.f;  // diagonal 28, others 8
 
   const mat4 m433 = m48 * m48 ; // diagonal 61, others 36
-  const mat4 m434 = m413 * ffConst ; // diagonal 28, others 8 
+  const mat4 m434 = m413 * ffConst ; // diagonal 28, others 8
 
-  const vec4 v451 = ffConst * v420;  // 14, 16, 18,10 
+  const vec4 v451 = ffConst * v420;  // 14, 16, 18,10
   const vec4 v452 =  s11.f * v429;  // 56, 64, 72, 40
   const mat4 m435 = ffConst * s11.m;  //  diagonal 10 and others 0s
   const mat4 m436 = s11.f * m48 ;  // diagonal 28, others - 8s
   const mat4 m437 = ffConst * m413 ; // diagonal 28, others 8
 
   const vec4 v453 = v420 / v420; // 1, 1, 1, 1
-  const vec4 v454 = v420 / ffConst;  // 3.5, 4, 4.5,2.5 
+  const vec4 v454 = v420 / ffConst;  // 3.5, 4, 4.5,2.5
 
   const vec4 v457 = vec4(s11.f / s11.f);  // all 1s
   const vec4 v458 = v432 / vec4(3);  // 6, 6.6666, 7.333, 4.6666
   const mat4 m438 = s11.m / ffConst;  // diagonal 2.5 and others 0s
   const mat4 m439 = mat4(ffConst / s11.f);  // diagonal 0.5s
-  const mat4 m440 = m48 / s11.f;  // diagonal 1.75, others 0.5s 
+  const mat4 m440 = m48 / s11.f;  // diagonal 1.75, others 0.5s
 
   const mat4 m443 = m48 / m48 ; // All 1s
-  const mat4 m444 = m413 / ffConst ; // diagonal 7, others 2 
+  const mat4 m444 = m413 / ffConst ; // diagonal 7, others 2
 
   const vec4 v459 = ffConst / v420;  // .2857 , .25, .22, .4
   const vec4 v460 =  s11.f / v429;  // .2857, .25, .22, .4
   //const mat4 m445 = ffConst / s11.m;  // divide by zero error
   const mat4 m446 = s11.f / m48 ;  // diagonal .571,  others 2
   const mat4 m447 = ffConst / m413 ; // diagonal .1428, others 0.5
 
   const vec4 v461 = v453 * m428; // 10, 10, 10, 10
   const vec4 v462 = v453 * m437; // 52, 52, 52, 52
   const vec4 v463 = m428 * v451; // 140, 160, 180, 100
   const vec4 v464 = m437 * v451; // 744, 784, 824, 664
 
-  int ii = 2; 
+  int ii = 2;
   const int iiConst = 2;
 
   const ivec4 i420 = ivec4( 7,8,9,5);  // 7, 8, 9, 5
 
   const ivec4 i429 = i420 + i420; // 14, 16, 18, 10
-  const ivec4 i430 = i420 + iiConst;  // 9, 10, 11,7 
+  const ivec4 i430 = i420 + iiConst;  // 9, 10, 11,7
   const ivec4 i432 =  i429 + ss.i;  // 18, 20, 22, 14
 
   const ivec4 i433 = ivec4(ss.i + ss.i);  // all 8s
 
-  const ivec4 i435 = iiConst + i420;  // 9, 10, 11,7 
+  const ivec4 i435 = iiConst + i420;  // 9, 10, 11,7
   const ivec4 i436 =  ss.i + i429;  // 18, 20, 22, 14
 
   const ivec4 i437 = i420 - i420; // 0, 0, 0, 0
-  const ivec4 i438 = i420 - iiConst;  // 5, 6, 7,3 
+  const ivec4 i438 = i420 - iiConst;  // 5, 6, 7,3
   const ivec4 i440 =  i429 - ss.i;  // 10, 12, 14, 6
 
   const ivec4 i441 = ivec4(ss.i - ss.i);  // all 0s
 
-  const ivec4 i443 = iiConst - i420;  // -5, -6, -7,-3 
+  const ivec4 i443 = iiConst - i420;  // -5, -6, -7,-3
   const ivec4 i444 =  ss.i - i429;  // -10, -12, -14, -6
 
   const ivec4 i445 = i420 * i420; // 49, 64, 81, 25
-  const ivec4 i446 = i420 * iiConst;  // 14, 16, 18,10 
+  const ivec4 i446 = i420 * iiConst;  // 14, 16, 18,10
   const ivec4 i448 =  i429 * ss.i;  // 56, 64, 72, 40
 
   const ivec4 i449 = ivec4(ss.i * ss.i);  // all 16
 
-  const ivec4 i451 = iiConst * i420;  // 14, 16, 18,10 
+  const ivec4 i451 = iiConst * i420;  // 14, 16, 18,10
   const ivec4 i452 =  ss.i * i429;  // 56, 64, 72, 40
 
   const ivec4 i453 = i420 / i420; // 1, 1, 1, 1
-  const ivec4 i454 = i420 / iiConst;  // 3, 4, 4,2 
+  const ivec4 i454 = i420 / iiConst;  // 3, 4, 4,2
   const ivec4 i456 =  i429 / ss.i;  // 3, 4, 4, 2
 
   const ivec4 i457 = ivec4(ss.i / ss.i);  // all 1s
 
-  const ivec4 i459 = iiConst / i420;  // 0 , 0, 0,0 
-  const ivec4 i460 =  ss.i / i429;  // 0, 0, 0,0 
+  const ivec4 i459 = iiConst / i420;  // 0 , 0, 0,0
+  const ivec4 i460 =  ss.i / i429;  // 0, 0, 0,0
 
   const bvec4 b424 = bvec4(s22.bv4);
 
   const bool b1 = s22.bv4 == b424;  // true
   const bool b2 = i420 == i420;  // true
   const bool b3 = i420 == i445;  // false
   const bool b4 = v420 == v420;  // true
   const bool b5 = m430 == m434; // true
 
   const vec4 v465 = -v420; // -7, -8, -9, -5
   const mat4 m448 = -m447 ; // diagonal -.1428, others -0.5
-  const ivec4 i465 = -i456 ;  // -3, -4, -4,-2 
+  const ivec4 i465 = -i456 ;  // -3, -4, -4,-2
 
   const bool b7 = s22 == s22;
 
   const vec4 v466 = v432 + vec4(3,4,5,6);  // 21, 24, 27, 20
   const vec4 v467 = v432 + vec4(vec2(3,4),5,6);  // 21, 24, 27, 20
   const vec4 v468 = v432 + vec4(3, vec2(4, 5),vec2(6,7));  // 21, 24, 27, 20
   const vec4 v469 = vec4(v468) + vec4(3) + v468 + vec4(s77.m3[2][0]); // 45, 51, 57, 43
 
@@ -382,46 +382,46 @@ void main()
 
   const int int10 = i420.xy.y;  // 8
 
   //float f = v470.x;
 
 
 
   const int int13 = -ss.i;
-  
+
   const vec4 v474 = -vec4(0.5);
 
   int int14 = ii++;
   int array[3];
   array[2];
 
   const vec4 v478 = v466 * 2.0; // 42, 48, 54, 40
 
   const vec4 v479 = iiConst > 1 ? v466 : v478; // 21, 24, 27, 20
 
-  const struct st7 { 
-       int i; 
+  const struct st7 {
+       int i;
        bool b;
   } st77 = st7(ss.i, true);
 
   const vec4 v481 = vec4(st77.i);
 
   const struct st8 {
       int i;
   } ;
 
 
   const struct st9 {
       s2 ss;
   } st99 = st9(s22);
 
   const vec3 v312 = st99.ss.v3;   // 9, 10, 11
   const vec4 v482 = mat4(1)[0];  // 1, 0, 0 , 0
-  
+
   const mat4 m450 = mat4(ss.i);  // mat4(4)
   const mat4 m451 = mat4(b20);   // mat4(1)
   const mat4 m452 = mat4(st77.b); // mat4(1)
 
   const vec4 v483 = vec4(vec4(3).x);  // 3,3,3,3
   const mat4 m453 = mat4(vec4(5).x);  // mat5(5)
 
   const vec4 v484 = vec4(mat4(6)[1]);  // 0,6,0,0
--- a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/build/CorrectConstruct_vert.vert
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/build/CorrectConstruct_vert.vert
@@ -43,12 +43,12 @@ void main()
     vec4 v4 = vec4(v2);
     bvec4 v5 = bvec4(v2);
     vec3 v6 = vec3(v5);
     vec3 v = vec3(2, 2.0, 1);
     vec3 v1 = vec3(1.2, v);
 
     mat3 m1 = mat3(v,v,v);
     mat2 m2 = mat2(v, v6.x);
-    
+
     gl_Position = vec4(1.0);
 }
 
--- a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/build/CorrectExtension10_V100_frag.frag
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/build/CorrectExtension10_V100_frag.frag
@@ -19,25 +19,25 @@
 ** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
 ** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
 ** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 ** MATERIALS OR THE USE OR