Merge last green PGO from inbound to central
authorMarco Bonardo <mbonardo@mozilla.com>
Tue, 27 Mar 2012 13:56:40 +0200
changeset 93695 0ff816e5e9929e73b627418cd19555d568615419
parent 93622 7731e8b41a708c18f737c6cff13ac15e99f9691d (current diff)
parent 93694 7166aa205758ad9ac83f8767e4193f11273166f2 (diff)
child 93696 aa0f1e5fcf0074004dc0c3e0608e7bc702872de1
child 93725 edc2dc97b9ca66a5d048d13d935934f341f1824b
push id886
push userlsblakk@mozilla.com
push dateMon, 04 Jun 2012 19:57:52 +0000
treeherdermozilla-beta@bbd8d5efd6d1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone14.0a1
first release with
nightly linux32
0ff816e5e992 / 14.0a1 / 20120327100541 / files
nightly linux64
0ff816e5e992 / 14.0a1 / 20120327100541 / files
nightly mac
0ff816e5e992 / 14.0a1 / 20120327100541 / files
nightly win32
0ff816e5e992 / 14.0a1 / 20120327100541 / files
nightly win64
0ff816e5e992 / 14.0a1 / 20120327100541 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Merge last green PGO from inbound to central
b2g/app/b2g.js
b2g/installer/package-manifest.in
browser/modules/KeywordURLResetPrompter.jsm
browser/modules/test/browser_keywordURLReset.js
content/canvas/test/webgl/conformance/extensions/compressed-textures/4x4.rgb.dxt1.js
content/canvas/test/webgl/conformance/extensions/compressed-textures/4x4.rgba.dxt1.js
content/canvas/test/webgl/conformance/extensions/compressed-textures/4x4.rgba.dxt3.js
content/canvas/test/webgl/conformance/extensions/compressed-textures/4x4.rgba.dxt5.js
content/canvas/test/webgl/conformance/extensions/compressed-textures/4x4.rgba.raw.js
content/canvas/test/webgl/conformance/extensions/compressed-textures/8x8.rgb.dxt1.js
content/canvas/test/webgl/conformance/extensions/compressed-textures/8x8.rgba.dxt1.js
content/canvas/test/webgl/conformance/extensions/compressed-textures/8x8.rgba.dxt3.js
content/canvas/test/webgl/conformance/extensions/compressed-textures/8x8.rgba.dxt5.js
content/canvas/test/webgl/conformance/extensions/compressed-textures/8x8.rgba.pvrtc4bpp.js
content/canvas/test/webgl/conformance/extensions/compressed-textures/8x8.rgba.raw.js
content/canvas/test/webgl/conformance/extensions/webgl-experimental-compressed-textures.html
content/canvas/test/webgl/conformance/more/conformance/quickCheckAPI.html
content/canvas/test/webgl/conformance/shaders/00_shaders.txt
content/canvas/test/webgl/conformance/shaders/00_test_list.txt
content/canvas/test/webgl/conformance/shaders/glsl-features/00_test_list.txt
content/canvas/test/webgl/conformance/shaders/glsl-features/abs-ref.frag
content/canvas/test/webgl/conformance/shaders/glsl-features/abs-ref.vert
content/canvas/test/webgl/conformance/shaders/glsl-features/abs-vec2-ref.frag
content/canvas/test/webgl/conformance/shaders/glsl-features/abs-vec2-ref.vert
content/canvas/test/webgl/conformance/shaders/glsl-features/abs-vec2.frag
content/canvas/test/webgl/conformance/shaders/glsl-features/abs-vec2.vert
content/canvas/test/webgl/conformance/shaders/glsl-features/abs-vec3-ref.frag
content/canvas/test/webgl/conformance/shaders/glsl-features/abs-vec3-ref.vert
content/canvas/test/webgl/conformance/shaders/glsl-features/abs-vec3.frag
content/canvas/test/webgl/conformance/shaders/glsl-features/abs-vec3.vert
content/canvas/test/webgl/conformance/shaders/glsl-features/abs-vec4-ref.frag
content/canvas/test/webgl/conformance/shaders/glsl-features/abs-vec4-ref.vert
content/canvas/test/webgl/conformance/shaders/glsl-features/abs-vec4.frag
content/canvas/test/webgl/conformance/shaders/glsl-features/abs-vec4.vert
content/canvas/test/webgl/conformance/shaders/glsl-features/abs.frag
content/canvas/test/webgl/conformance/shaders/glsl-features/abs.vert
content/canvas/test/webgl/conformance/shaders/glsl-features/base.frag
content/canvas/test/webgl/conformance/shaders/glsl-features/base.vert
content/canvas/test/webgl/conformance/shaders/glsl-features/ceil-ref.frag
content/canvas/test/webgl/conformance/shaders/glsl-features/ceil-ref.vert
content/canvas/test/webgl/conformance/shaders/glsl-features/ceil-vec2-ref.frag
content/canvas/test/webgl/conformance/shaders/glsl-features/ceil-vec2-ref.vert
content/canvas/test/webgl/conformance/shaders/glsl-features/ceil-vec2.frag
content/canvas/test/webgl/conformance/shaders/glsl-features/ceil-vec2.vert
content/canvas/test/webgl/conformance/shaders/glsl-features/ceil-vec3-ref.frag
content/canvas/test/webgl/conformance/shaders/glsl-features/ceil-vec3-ref.vert
content/canvas/test/webgl/conformance/shaders/glsl-features/ceil-vec3.frag
content/canvas/test/webgl/conformance/shaders/glsl-features/ceil-vec3.vert
content/canvas/test/webgl/conformance/shaders/glsl-features/ceil-vec4-ref.frag
content/canvas/test/webgl/conformance/shaders/glsl-features/ceil-vec4-ref.vert
content/canvas/test/webgl/conformance/shaders/glsl-features/ceil-vec4.frag
content/canvas/test/webgl/conformance/shaders/glsl-features/ceil-vec4.vert
content/canvas/test/webgl/conformance/shaders/glsl-features/ceil.frag
content/canvas/test/webgl/conformance/shaders/glsl-features/ceil.vert
content/canvas/test/webgl/conformance/shaders/glsl-features/floor-ref.frag
content/canvas/test/webgl/conformance/shaders/glsl-features/floor-ref.vert
content/canvas/test/webgl/conformance/shaders/glsl-features/floor-vec2-ref.frag
content/canvas/test/webgl/conformance/shaders/glsl-features/floor-vec2-ref.vert
content/canvas/test/webgl/conformance/shaders/glsl-features/floor-vec2.frag
content/canvas/test/webgl/conformance/shaders/glsl-features/floor-vec2.vert
content/canvas/test/webgl/conformance/shaders/glsl-features/floor-vec3-ref.frag
content/canvas/test/webgl/conformance/shaders/glsl-features/floor-vec3-ref.vert
content/canvas/test/webgl/conformance/shaders/glsl-features/floor-vec3.frag
content/canvas/test/webgl/conformance/shaders/glsl-features/floor-vec3.vert
content/canvas/test/webgl/conformance/shaders/glsl-features/floor-vec4-ref.frag
content/canvas/test/webgl/conformance/shaders/glsl-features/floor-vec4-ref.vert
content/canvas/test/webgl/conformance/shaders/glsl-features/floor-vec4.frag
content/canvas/test/webgl/conformance/shaders/glsl-features/floor-vec4.vert
content/canvas/test/webgl/conformance/shaders/glsl-features/floor.frag
content/canvas/test/webgl/conformance/shaders/glsl-features/floor.vert
content/canvas/test/webgl/conformance/shaders/glsl-features/fract-ref.frag
content/canvas/test/webgl/conformance/shaders/glsl-features/fract-ref.vert
content/canvas/test/webgl/conformance/shaders/glsl-features/fract-vec2-ref.frag
content/canvas/test/webgl/conformance/shaders/glsl-features/fract-vec2-ref.vert
content/canvas/test/webgl/conformance/shaders/glsl-features/fract-vec2.frag
content/canvas/test/webgl/conformance/shaders/glsl-features/fract-vec2.vert
content/canvas/test/webgl/conformance/shaders/glsl-features/fract-vec3-ref.frag
content/canvas/test/webgl/conformance/shaders/glsl-features/fract-vec3-ref.vert
content/canvas/test/webgl/conformance/shaders/glsl-features/fract-vec3.frag
content/canvas/test/webgl/conformance/shaders/glsl-features/fract-vec3.vert
content/canvas/test/webgl/conformance/shaders/glsl-features/fract-vec4-ref.frag
content/canvas/test/webgl/conformance/shaders/glsl-features/fract-vec4-ref.vert
content/canvas/test/webgl/conformance/shaders/glsl-features/fract-vec4.frag
content/canvas/test/webgl/conformance/shaders/glsl-features/fract-vec4.vert
content/canvas/test/webgl/conformance/shaders/glsl-features/fract.frag
content/canvas/test/webgl/conformance/shaders/glsl-features/fract.vert
content/canvas/test/webgl/conformance/shaders/glsl-features/sign-ref.frag
content/canvas/test/webgl/conformance/shaders/glsl-features/sign-ref.vert
content/canvas/test/webgl/conformance/shaders/glsl-features/sign-vec2-ref.frag
content/canvas/test/webgl/conformance/shaders/glsl-features/sign-vec2-ref.vert
content/canvas/test/webgl/conformance/shaders/glsl-features/sign-vec2.frag
content/canvas/test/webgl/conformance/shaders/glsl-features/sign-vec2.vert
content/canvas/test/webgl/conformance/shaders/glsl-features/sign-vec3-ref.frag
content/canvas/test/webgl/conformance/shaders/glsl-features/sign-vec3-ref.vert
content/canvas/test/webgl/conformance/shaders/glsl-features/sign-vec3.frag
content/canvas/test/webgl/conformance/shaders/glsl-features/sign-vec3.vert
content/canvas/test/webgl/conformance/shaders/glsl-features/sign-vec4-ref.frag
content/canvas/test/webgl/conformance/shaders/glsl-features/sign-vec4-ref.vert
content/canvas/test/webgl/conformance/shaders/glsl-features/sign-vec4.frag
content/canvas/test/webgl/conformance/shaders/glsl-features/sign-vec4.vert
content/canvas/test/webgl/conformance/shaders/glsl-features/sign.frag
content/canvas/test/webgl/conformance/shaders/glsl-features/sign.vert
content/canvas/test/webgl/conformance/shaders/implicit/00_shaders.txt
content/canvas/test/webgl/conformance/shaders/implicit/add_int_float.vert
content/canvas/test/webgl/conformance/shaders/implicit/add_int_mat2.vert
content/canvas/test/webgl/conformance/shaders/implicit/add_int_mat3.vert
content/canvas/test/webgl/conformance/shaders/implicit/add_int_mat4.vert
content/canvas/test/webgl/conformance/shaders/implicit/add_int_vec2.vert
content/canvas/test/webgl/conformance/shaders/implicit/add_int_vec3.vert
content/canvas/test/webgl/conformance/shaders/implicit/add_int_vec4.vert
content/canvas/test/webgl/conformance/shaders/implicit/add_ivec2_vec2.vert
content/canvas/test/webgl/conformance/shaders/implicit/add_ivec3_vec3.vert
content/canvas/test/webgl/conformance/shaders/implicit/add_ivec4_vec4.vert
content/canvas/test/webgl/conformance/shaders/implicit/assign_int_to_float.vert
content/canvas/test/webgl/conformance/shaders/implicit/assign_ivec2_to_vec2.vert
content/canvas/test/webgl/conformance/shaders/implicit/assign_ivec3_to_vec3.vert
content/canvas/test/webgl/conformance/shaders/implicit/assign_ivec4_to_vec4.vert
content/canvas/test/webgl/conformance/shaders/implicit/construct_struct.vert
content/canvas/test/webgl/conformance/shaders/implicit/divide_int_float.vert
content/canvas/test/webgl/conformance/shaders/implicit/divide_int_mat2.vert
content/canvas/test/webgl/conformance/shaders/implicit/divide_int_mat3.vert
content/canvas/test/webgl/conformance/shaders/implicit/divide_int_mat4.vert
content/canvas/test/webgl/conformance/shaders/implicit/divide_int_vec2.vert
content/canvas/test/webgl/conformance/shaders/implicit/divide_int_vec3.vert
content/canvas/test/webgl/conformance/shaders/implicit/divide_int_vec4.vert
content/canvas/test/webgl/conformance/shaders/implicit/divide_ivec2_vec2.vert
content/canvas/test/webgl/conformance/shaders/implicit/divide_ivec3_vec3.vert
content/canvas/test/webgl/conformance/shaders/implicit/divide_ivec4_vec4.vert
content/canvas/test/webgl/conformance/shaders/implicit/equal_int_float.vert
content/canvas/test/webgl/conformance/shaders/implicit/equal_ivec2_vec2.vert
content/canvas/test/webgl/conformance/shaders/implicit/equal_ivec3_vec3.vert
content/canvas/test/webgl/conformance/shaders/implicit/equal_ivec4_vec4.vert
content/canvas/test/webgl/conformance/shaders/implicit/function_int_float.vert
content/canvas/test/webgl/conformance/shaders/implicit/function_ivec2_vec2.vert
content/canvas/test/webgl/conformance/shaders/implicit/function_ivec3_vec3.vert
content/canvas/test/webgl/conformance/shaders/implicit/function_ivec4_vec4.vert
content/canvas/test/webgl/conformance/shaders/implicit/greater_than.vert
content/canvas/test/webgl/conformance/shaders/implicit/greater_than_equal.vert
content/canvas/test/webgl/conformance/shaders/implicit/less_than.vert
content/canvas/test/webgl/conformance/shaders/implicit/less_than_equal.vert
content/canvas/test/webgl/conformance/shaders/implicit/multiply_int_float.vert
content/canvas/test/webgl/conformance/shaders/implicit/multiply_int_mat2.vert
content/canvas/test/webgl/conformance/shaders/implicit/multiply_int_mat3.vert
content/canvas/test/webgl/conformance/shaders/implicit/multiply_int_mat4.vert
content/canvas/test/webgl/conformance/shaders/implicit/multiply_int_vec2.vert
content/canvas/test/webgl/conformance/shaders/implicit/multiply_int_vec3.vert
content/canvas/test/webgl/conformance/shaders/implicit/multiply_int_vec4.vert
content/canvas/test/webgl/conformance/shaders/implicit/multiply_ivec2_vec2.vert
content/canvas/test/webgl/conformance/shaders/implicit/multiply_ivec3_vec3.vert
content/canvas/test/webgl/conformance/shaders/implicit/multiply_ivec4_vec4.vert
content/canvas/test/webgl/conformance/shaders/implicit/not_equal_int_float.vert
content/canvas/test/webgl/conformance/shaders/implicit/not_equal_ivec2_vec2.vert
content/canvas/test/webgl/conformance/shaders/implicit/not_equal_ivec3_vec3.vert
content/canvas/test/webgl/conformance/shaders/implicit/not_equal_ivec4_vec4.vert
content/canvas/test/webgl/conformance/shaders/implicit/subtract_int_float.vert
content/canvas/test/webgl/conformance/shaders/implicit/subtract_int_mat2.vert
content/canvas/test/webgl/conformance/shaders/implicit/subtract_int_mat3.vert
content/canvas/test/webgl/conformance/shaders/implicit/subtract_int_mat4.vert
content/canvas/test/webgl/conformance/shaders/implicit/subtract_int_vec2.vert
content/canvas/test/webgl/conformance/shaders/implicit/subtract_int_vec3.vert
content/canvas/test/webgl/conformance/shaders/implicit/subtract_int_vec4.vert
content/canvas/test/webgl/conformance/shaders/implicit/subtract_ivec2_vec2.vert
content/canvas/test/webgl/conformance/shaders/implicit/subtract_ivec3_vec3.vert
content/canvas/test/webgl/conformance/shaders/implicit/subtract_ivec4_vec4.vert
content/canvas/test/webgl/conformance/shaders/implicit/ternary_int_float.vert
content/canvas/test/webgl/conformance/shaders/implicit/ternary_ivec2_vec2.vert
content/canvas/test/webgl/conformance/shaders/implicit/ternary_ivec3_vec3.vert
content/canvas/test/webgl/conformance/shaders/implicit/ternary_ivec4_vec4.vert
content/canvas/test/webgl/conformance/shaders/misc/00_shaders.txt
content/canvas/test/webgl/conformance/shaders/misc/non-ascii-comments.vert
content/canvas/test/webgl/conformance/shaders/misc/non-ascii.vert
content/canvas/test/webgl/conformance/shaders/misc/shared-a.frag
content/canvas/test/webgl/conformance/shaders/misc/shared-b.frag
content/canvas/test/webgl/conformance/shaders/misc/shared.vert
content/canvas/test/webgl/conformance/shaders/reserved/00_shaders.txt
content/canvas/test/webgl/conformance/shaders/reserved/_webgl_field.vert
content/canvas/test/webgl/conformance/shaders/reserved/_webgl_function.vert
content/canvas/test/webgl/conformance/shaders/reserved/_webgl_struct.vert
content/canvas/test/webgl/conformance/shaders/reserved/_webgl_variable.vert
content/canvas/test/webgl/conformance/shaders/reserved/webgl_field.vert
content/canvas/test/webgl/conformance/shaders/reserved/webgl_function.vert
content/canvas/test/webgl/conformance/shaders/reserved/webgl_struct.vert
content/canvas/test/webgl/conformance/shaders/reserved/webgl_variable.vert
content/canvas/test/webgl/remove-uniqueObjectTest.patch
mobile/android/base/resources/layout/awesomebar_folder_header_row.xml
--- a/accessible/src/base/nsARIAMap.cpp
+++ b/accessible/src/base/nsARIAMap.cpp
@@ -168,16 +168,25 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] 
     kUseMapRole,
     eNoValue,
     eNoAction,
     eNoLiveAttr,
     kNoReqStates,
     eReadonlyUntilEditable
   },
   {
+    "form",
+    roles::FORM,
+    kUseMapRole,
+    eNoValue,
+    eNoAction,
+    eNoLiveAttr,
+    kNoReqStates
+  },
+  {
     "grid",
     roles::TABLE,
     kUseMapRole,
     eNoValue,
     eNoAction,
     eNoLiveAttr,
     states::FOCUSABLE,
     eARIAMultiSelectable,
--- a/accessible/src/html/nsHyperTextAccessible.cpp
+++ b/accessible/src/html/nsHyperTextAccessible.cpp
@@ -775,33 +775,32 @@ nsHyperTextAccessible::GetRelativeOffset
   const bool kIsVisualBidi = false;          // use visual order for bidi text
 
   EWordMovementType wordMovementType = aNeedsStart ? eStartWord : eEndWord;
   if (aAmount == eSelectLine) {
     aAmount = (aDirection == eDirNext) ? eSelectEndLine : eSelectBeginLine;
   }
 
   // Ask layout for the new node and offset, after moving the appropriate amount
-  nsPeekOffsetStruct pos;
 
   nsresult rv;
   PRInt32 contentOffset = aFromOffset;
   if (nsAccUtils::IsText(aFromAccessible)) {
     nsIFrame *frame = aFromAccessible->GetFrame();
     NS_ENSURE_TRUE(frame, -1);
 
     if (frame->GetType() == nsGkAtoms::textFrame) {
       rv = RenderedToContentOffset(frame, aFromOffset, &contentOffset);
       NS_ENSURE_SUCCESS(rv, -1);
     }
   }
 
-  pos.SetData(aAmount, aDirection, contentOffset,
-              0, kIsJumpLinesOk, kIsScrollViewAStop, kIsKeyboardSelect, kIsVisualBidi,
-              wordMovementType);
+  nsPeekOffsetStruct pos(aAmount, aDirection, contentOffset,
+                         0, kIsJumpLinesOk, kIsScrollViewAStop, kIsKeyboardSelect, kIsVisualBidi,
+                         wordMovementType);
   rv = aFromFrame->PeekOffset(&pos);
   if (NS_FAILED(rv)) {
     if (aDirection == eDirPrevious) {
       // Use passed-in frame as starting point in failure case for now,
       // this is a hack to deal with starting on a list bullet frame,
       // which fails in PeekOffset() because the line iterator doesn't see it.
       // XXX Need to look at our overall handling of list bullets, which are an odd case
       pos.mResultContent = aFromFrame->GetContent();
--- a/accessible/tests/mochitest/elm/test_landmarks.html
+++ b/accessible/tests/mochitest/elm/test_landmarks.html
@@ -21,62 +21,71 @@
     {
       testRole("nav", ROLE_SECTION);
       testRole("header", ROLE_HEADER);
       testRole("footer", ROLE_FOOTER);
       testRole("article", ROLE_DOCUMENT);
       testRole("aside", ROLE_NOTE);
 
       testRole("main", ROLE_DOCUMENT);
+      testRole("form", ROLE_FORM);
 
       // Some AT may look for this
       testAttrs("nav", {"xml-roles" : "navigation"}, true);
       testAttrs("footer", {"xml-roles" : "contentinfo"}, true);
       testAttrs("aside", {"xml-roles" : "complementary"}, true);
-      testAttrs("main", {"xml-roles" : "main"}, true); // ARIA override
+      testAttrs("main", {"xml-roles" : "main"}, true); // // ARIA override
+      testAttrs("form", {"xml-roles" : "form"}, true);
 
       // And some AT may look for this
       testAttrs("nav", {"tag" : "nav"}, true);
       testAttrs("header", {"tag" : "header"}, true);
       testAttrs("footer", {"tag" : "footer"}, true);
       testAttrs("article", {"tag" : "article"}, true);
       testAttrs("aside", {"tag" : "aside"}, true);
-      testAttrs("main", {"tag" : "article"}, true); // no override expected
+      testAttrs("main", {"tag" : "article"}, true);
+      testAttrs("form", {"tag" : "article"}, true);
 
       SimpleTest.finish();
     }
 
     SimpleTest.waitForExplicitFinish();
     addA11yLoadEvent(doTest);
   </script>
 </head>
 <body>
 
   <a target="_blank"
-    title="Provide mappings for html5 <nav> <header> <footer> <article>"
-    href="https://bugzilla.mozilla.org/show_bug.cgi?id=593368">
-     Mozilla Bug 593368
+     title="Provide mappings for html5 <nav> <header> <footer> <article>"
+     href="https://bugzilla.mozilla.org/show_bug.cgi?id=593368">
+    Bug 593368
   </a><br/>
   <a target="_blank"
-    href="https://bugzilla.mozilla.org/show_bug.cgi?id=613502"
-    title="Map <article> like we do aria role article">
-     Mozilla Bug 613502
+     href="https://bugzilla.mozilla.org/show_bug.cgi?id=613502"
+     title="Map <article> like we do aria role article">
+    Bug 613502
   </a>
   <a target="_blank"
-    href="https://bugzilla.mozilla.org/show_bug.cgi?id=610650"
-    title="Change implementation of HTML5 landmark elements to conform">
-     Mozilla Bug 610650
+     href="https://bugzilla.mozilla.org/show_bug.cgi?id=610650"
+     title="Change implementation of HTML5 landmark elements to conform">
+    Bug 610650
+  </a>
+  <a target="_blank"
+     href="https://bugzilla.mozilla.org/show_bug.cgi?id=734982"
+     title="Map ARIA role FORM">
+    Bug 734982
   </a>
   <p id="display"></p>
   <div id="content" style="display: none"></div>
   <pre id="test">
   </pre>
 
   <nav id="nav">a nav</nav>
   <header id="header">a header</header>
   <footer id="footer">a footer</footer>
   <aside id="aside">by the way I am an aside</aside>
 
   <article id="article">an article</article>
   <article id="main" role="main">a main area</article>
+  <article id="form" role="form">a form area</article>
 
 </body>
 </html>
--- a/accessible/tests/mochitest/test_aria_roles.html
+++ b/accessible/tests/mochitest/test_aria_roles.html
@@ -30,16 +30,17 @@ https://bugzilla.mozilla.org/show_bug.cg
       testRole("log_table", ROLE_TABLE);
       testRole("timer_div", ROLE_SECTION);
 
       // other roles that are forms of "live regions"
       testRole("marquee_h1", ROLE_ANIMATION);
 
       // strong landmark
       testRole("application", ROLE_APPLICATION);
+      testRole("form", ROLE_FORM);
 
       // weak landmarks
       var weak_landmarks = ["banner", "complementary", "contentinfo",
           "main", "navigation", "search"];
       for (l in weak_landmarks)
         testRole(weak_landmarks[l], ROLE_SECTION);
 
       for (l in weak_landmarks) {
@@ -88,31 +89,38 @@ https://bugzilla.mozilla.org/show_bug.cg
 </head>
 <body>
 
   <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=481114">Mozilla Bug 481114</a>
   <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=469688">Mozilla Bug 469688</a>
   <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=469688">Mozilla Bug 520188</a>
   <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=529289">Mozilla Bug 529289</a>
   <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=529289">Mozilla Bug 607219</a>
+  <a target="_blank"
+     title="Map ARIA role FORM"
+     href="https://bugzilla.mozilla.org/show_bug.cgi?id=735645">
+    Bug 735645
   </a>
   <p id="display"></p>
   <div id="content" style="display: none"></div>
   <pre id="test">
   </pre>
   
   <!-- "live" roles -->
   <table role="log" id="log_table">
     <tr><td>Table based log</td></tr>
   </table>
   <h1 role="marquee" id="marquee_h1">marquee</h1>
   <div role="timer" id="timer_div">timer</div>
 
   <!-- landmarks -->
   <div role="application" id="application">application</div>
+  <div role="form" id="form">form</div>
+
+  <!-- weak landmarks -->
   <div role="banner" id="banner">banner</div>
   <div role="complementary" id="complementary">complementary</div>
   <div role="contentinfo" id="contentinfo">contentinfo</div>
   <div role="main" id="main">main</div>
   <div role="navigation" id="navigation">navigation</div>
   <div role="search" id="search">search</div>
 
   <!-- landmarks are tables -->
--- a/b2g/app/b2g.js
+++ b/b2g/app/b2g.js
@@ -433,16 +433,19 @@ pref("dom.mozBrowserFramesWhitelist", "h
 // Temporary permission hack for WebSMS
 pref("dom.sms.enabled", true);
 pref("dom.sms.whitelist", "file://,http://homescreen.gaiamobile.org,http://sms.gaiamobile.org");
 
 // Temporary permission hack for WebContacts
 pref("dom.mozContacts.enabled", true);
 pref("dom.mozContacts.whitelist", "http://dialer.gaiamobile.org,http://sms.gaiamobile.org");
 
+// WebSettings
+pref("dom.mozSettings.enabled", true);
+
 // Ignore X-Frame-Options headers.
 pref("b2g.ignoreXFrameOptions", true);
 
 // controls if we want camera support
 pref("device.camera.enabled", true);
 pref("media.realtime_decoder.enabled", true);
 
 // "Preview" landing of bug 710563, which is bogged down in analysis
--- a/b2g/chrome/content/shell.js
+++ b/b2g/chrome/content/shell.js
@@ -41,16 +41,17 @@ XPCOMUtils.defineLazyServiceGetter(Servi
 
 // FIXME Bug 707625
 // until we have a proper security model, add some rights to
 // the pre-installed web applications
 // XXX never grant 'content-camera' to non-gaia apps
 function addPermissions(urls) {
   let permissions = [
     'indexedDB', 'indexedDB-unlimited', 'webapps-manage', 'offline-app',
+    'websettings-read', 'websettings-readwrite',
     'content-camera', 'webcontacts-manage', 'wifi-manage', 'desktop-notification',
     'geolocation'
   ];
   urls.forEach(function(url) {
     url = url.trim();
     dump("XxXxX adding permissions for " + url);
     let uri = Services.io.newURI(url, null, null);
     let allow = Ci.nsIPermissionManager.ALLOW_ACTION;
--- a/b2g/installer/package-manifest.in
+++ b/b2g/installer/package-manifest.in
@@ -164,16 +164,17 @@
 @BINPATH@/components/dom_network.xpt
 @BINPATH@/components/dom_notification.xpt
 @BINPATH@/components/dom_html.xpt
 @BINPATH@/components/dom_indexeddb.xpt
 @BINPATH@/components/dom_offline.xpt
 @BINPATH@/components/dom_json.xpt
 @BINPATH@/components/dom_power.xpt
 @BINPATH@/components/dom_range.xpt
+@BINPATH@/components/dom_settings.xpt
 @BINPATH@/components/dom_sidebar.xpt
 @BINPATH@/components/dom_sms.xpt
 @BINPATH@/components/dom_storage.xpt
 @BINPATH@/components/dom_stylesheets.xpt
 @BINPATH@/components/dom_threads.xpt
 @BINPATH@/components/dom_traversal.xpt
 @BINPATH@/components/dom_views.xpt
 @BINPATH@/components/dom_xbl.xpt
--- a/browser/app/nsBrowserApp.cpp
+++ b/browser/app/nsBrowserApp.cpp
@@ -200,17 +200,17 @@ int main(int argc, char* argv[])
 
   nsresult rv = mozilla::BinaryPath::Get(argv[0], exePath);
   if (NS_FAILED(rv)) {
     Output("Couldn't calculate the application directory.\n");
     return 255;
   }
 
   char *lastSlash = strrchr(exePath, XPCOM_FILE_PATH_SEPARATOR[0]);
-  if (!lastSlash || (lastSlash - exePath > MAXPATHLEN - sizeof(XPCOM_DLL) - 1))
+  if (!lastSlash || (size_t(lastSlash - exePath) > MAXPATHLEN - sizeof(XPCOM_DLL) - 1))
     return 255;
 
   strcpy(++lastSlash, XPCOM_DLL);
 
   int gotCounters;
 #if defined(XP_UNIX)
   struct rusage initialRUsage;
   gotCounters = !getrusage(RUSAGE_SELF, &initialRUsage);
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -4079,17 +4079,17 @@ var FullScreen = {
       if (fullScrToggler) {
         fullScrToggler.removeEventListener("mouseover", this._expandCallback, false);
         fullScrToggler.removeEventListener("dragenter", this._expandCallback, false);
       }
       this.cancelWarning();
       gBrowser.tabContainer.removeEventListener("TabOpen", this.exitDomFullScreen);
       gBrowser.tabContainer.removeEventListener("TabClose", this.exitDomFullScreen);
       gBrowser.tabContainer.removeEventListener("TabSelect", this.exitDomFullScreen);
-      if (this.useLionFullScreen) {
+      if (!this.useLionFullScreen) {
         window.removeEventListener("deactivate", this);
       }
     }
   },
 
   observe: function(aSubject, aTopic, aData)
   {
     if (aData == "browser.fullscreen.autohide") {
--- a/browser/components/nsBrowserGlue.js
+++ b/browser/components/nsBrowserGlue.js
@@ -60,19 +60,16 @@ XPCOMUtils.defineLazyModuleGetter(this, 
                                   "resource://gre/modules/NetUtil.jsm");
 
 XPCOMUtils.defineLazyModuleGetter(this, "PlacesUtils",
                                   "resource://gre/modules/PlacesUtils.jsm");
 
 XPCOMUtils.defineLazyModuleGetter(this, "BookmarkHTMLUtils",
                                   "resource://gre/modules/BookmarkHTMLUtils.jsm");
 
-XPCOMUtils.defineLazyModuleGetter(this, "KeywordURLResetPrompter",
-                                  "resource:///modules/KeywordURLResetPrompter.jsm");
-
 XPCOMUtils.defineLazyModuleGetter(this, "webappsUI", 
                                   "resource:///modules/webappsUI.jsm");
 
 const PREF_PLUGINS_NOTIFYUSER = "plugins.update.notifyUser";
 const PREF_PLUGINS_UPDATEURL  = "plugins.update.url";
 
 // We try to backup bookmarks at idle times, to avoid doing that at shutdown.
 // Number of idle seconds before trying to backup bookmarks.  15 minutes.
@@ -268,23 +265,16 @@ BrowserGlue.prototype = {
           this._distributionCustomizer.applyPrefDefaults();
           this._distributionCustomizer.applyCustomizations();
           // To apply distribution bookmarks use "places-init-complete".
         }
         else if (data == "force-places-init") {
           this._initPlaces();
         }
         break;
-      case "defaultURIFixup-using-keyword-pref":
-        if (KeywordURLResetPrompter.shouldPrompt) {
-          let keywordURI = subject.QueryInterface(Ci.nsIURI);
-          KeywordURLResetPrompter.prompt(this.getMostRecentBrowserWindow(),
-                                         keywordURI);
-        }
-        break;
       case "initial-migration":
         this._initialMigrationPerformed = true;
         break;
     }
   }, 
 
   // initialization (called on application startup) 
   _init: function BG__init() {
@@ -307,17 +297,16 @@ BrowserGlue.prototype = {
     os.addObserver(this, "session-save", false);
     os.addObserver(this, "places-init-complete", false);
     this._isPlacesInitObserver = true;
     os.addObserver(this, "places-database-locked", false);
     this._isPlacesLockedObserver = true;
     os.addObserver(this, "distribution-customization-complete", false);
     os.addObserver(this, "places-shutdown", false);
     this._isPlacesShutdownObserver = true;
-    os.addObserver(this, "defaultURIFixup-using-keyword-pref", false);
   },
 
   // cleanup (called on application shutdown)
   _dispose: function BG__dispose() {
     let os = Services.obs;
     os.removeObserver(this, "xpcom-shutdown");
     os.removeObserver(this, "prefservice:after-app-defaults");
     os.removeObserver(this, "final-ui-startup");
@@ -336,17 +325,16 @@ BrowserGlue.prototype = {
     if (this._isIdleObserver)
       this._idleService.removeIdleObserver(this, BOOKMARKS_BACKUP_IDLE_TIME);
     if (this._isPlacesInitObserver)
       os.removeObserver(this, "places-init-complete");
     if (this._isPlacesLockedObserver)
       os.removeObserver(this, "places-database-locked");
     if (this._isPlacesShutdownObserver)
       os.removeObserver(this, "places-shutdown");
-    os.removeObserver(this, "defaultURIFixup-using-keyword-pref");
     webappsUI.uninit();
   },
 
   _onAppDefaults: function BG__onAppDefaults() {
     // apply distribution customizations (prefs)
     // other customizations are applied in _onProfileStartup()
     this._distributionCustomizer.applyPrefDefaults();
   },
--- a/browser/config/mozconfigs/linux32/nightly
+++ b/browser/config/mozconfigs/linux32/nightly
@@ -6,27 +6,27 @@ ac_add_options --enable-signmar
 # Nightlies only since this has a cost in performance
 ac_add_options --enable-js-diagnostics
 
 . $topsrcdir/build/unix/mozconfig.linux
 
 # Avoid dependency on libstdc++ 4.5
 ac_add_options --enable-stdcxx-compat
 
+# PGO
+mk_add_options PROFILE_GEN_SCRIPT='$(PYTHON) @MOZ_OBJDIR@/_profile/pgo/profileserver.py 10'
+
 # Needed to enable breakpad in application.ini
 export MOZILLA_OFFICIAL=1
 
 export MOZ_TELEMETRY_REPORTING=1
 
-# PGO
-mk_add_options PROFILE_GEN_SCRIPT='$(PYTHON) @MOZ_OBJDIR@/_profile/pgo/profileserver.py 10'
+# Treat warnings as errors in directories with FAIL_ON_WARNINGS.
+ac_add_options --enable-warnings-as-errors
 
 # Enable parallel compiling
 mk_add_options MOZ_MAKE_FLAGS="-j4"
 
-#Use ccache
+# Use ccache
 ac_add_options --with-ccache=/usr/bin/ccache
 
-# Treat warnings as errors in directories with FAIL_ON_WARNINGS.
-ac_add_options --enable-warnings-as-errors
-
 # Package js shell.
 export MOZ_PACKAGE_JSSHELL=1
--- a/browser/config/mozconfigs/linux64/nightly
+++ b/browser/config/mozconfigs/linux64/nightly
@@ -6,27 +6,27 @@ ac_add_options --enable-signmar
 # Nightlies only since this has a cost in performance
 ac_add_options --enable-js-diagnostics
 
 . $topsrcdir/build/unix/mozconfig.linux
 
 # Avoid dependency on libstdc++ 4.5
 ac_add_options --enable-stdcxx-compat
 
+# PGO
+mk_add_options PROFILE_GEN_SCRIPT='$(PYTHON) @MOZ_OBJDIR@/_profile/pgo/profileserver.py 10'
+
 # Needed to enable breakpad in application.ini
 export MOZILLA_OFFICIAL=1
 
 export MOZ_TELEMETRY_REPORTING=1
 
-# PGO
-mk_add_options PROFILE_GEN_SCRIPT='$(PYTHON) @MOZ_OBJDIR@/_profile/pgo/profileserver.py 10'
+# Treat warnings as errors in directories with FAIL_ON_WARNINGS.
+ac_add_options --enable-warnings-as-errors
 
 # Enable parallel compiling
 mk_add_options MOZ_MAKE_FLAGS="-j4"
 
-#Use ccache
+# Use ccache
 ac_add_options --with-ccache=/usr/bin/ccache
 
-# Treat warnings as errors in directories with FAIL_ON_WARNINGS.
-ac_add_options --enable-warnings-as-errors
-
 # Package js shell.
 export MOZ_PACKAGE_JSSHELL=1
--- a/browser/devtools/styleinspector/CssRuleView.jsm
+++ b/browser/devtools/styleinspector/CssRuleView.jsm
@@ -62,17 +62,18 @@ const CSS_LINE_RE = /(?:[^;\(]*(?:\([^\)
 // Used to parse a single property line.
 const CSS_PROP_RE = /\s*([^:\s]*)\s*:\s*(.*?)\s*(?:! (important))?;?$/;
 
 Cu.import("resource://gre/modules/Services.jsm");
 Cu.import("resource:///modules/devtools/CssLogic.jsm");
 
 var EXPORTED_SYMBOLS = ["CssRuleView",
                         "_ElementStyle",
-                        "_editableField"];
+                        "_editableField",
+                        "_getInplaceEditorForSpan"];
 
 /**
  * Our model looks like this:
  *
  * ElementStyle:
  *   Responsible for keeping track of which properties are overridden.
  *   Maintains a list of Rule objects that apply to the element.
  * Rule:
@@ -1470,16 +1471,24 @@ InplaceEditor.prototype = {
 
     // Call the user's change handler if available.
     if (this.change) {
       this.change(this.input.value.trim());
     }
   }
 };
 
+/*
+ * Various API consumers (especially tests) sometimes want to grab the
+ * inplaceEditor expando off span elements. However, when each global has its
+ * own compartment, those expandos live on Xray wrappers that are only visible
+ * within this JSM. So we provide a little workaround here.
+ */
+function _getInplaceEditorForSpan(aSpan) { return aSpan.inplaceEditor; };
+
 /**
  * Store of CSSStyleDeclarations mapped to properties that have been changed by
  * the user.
  */
 function UserProperties()
 {
   this.weakMap = new WeakMap();
 }
--- a/browser/devtools/styleinspector/test/browser_ruleview_editor.js
+++ b/browser/devtools/styleinspector/test/browser_ruleview_editor.js
@@ -2,16 +2,17 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 let tempScope = {}
 Cu.import("resource:///modules/devtools/CssRuleView.jsm", tempScope);
 let CssRuleView = tempScope.CssRuleView;
 let _ElementStyle = tempScope._ElementStyle;
 let _editableField = tempScope._editableField;
+let inplaceEditor = tempScope._getInplaceEditorForSpan;
 
 let doc = content.document;
 
 function expectDone(aValue, aCommit, aNext)
 {
   return function(aDoneValue, aDoneCommit) {
     dump("aDoneValue: " + aDoneValue + " commit: " + aDoneCommit + "\n");
 
@@ -38,50 +39,50 @@ function createSpan()
 function testReturnCommit()
 {
   clearBody();
   let span = createSpan();
   _editableField({
     element: span,
     initial: "explicit initial",
     start: function() {
-      is(span.inplaceEditor.input.value, "explicit initial", "Explicit initial value should be used.");
-      span.inplaceEditor.input.value = "Test Value";
+      is(inplaceEditor(span).input.value, "explicit initial", "Explicit initial value should be used.");
+      inplaceEditor(span).input.value = "Test Value";
       EventUtils.sendKey("return");
     },
     done: expectDone("Test Value", true, testBlurCommit)
   });
   span.focus();
 }
 
 function testBlurCommit()
 {
   clearBody();
   let span = createSpan();
   _editableField({
     element: span,
     start: function() {
-      is(span.inplaceEditor.input.value, "Edit Me!", "textContent of the span used.");
-      span.inplaceEditor.input.value = "Test Value";
-      span.inplaceEditor.input.blur();
+      is(inplaceEditor(span).input.value, "Edit Me!", "textContent of the span used.");
+      inplaceEditor(span).input.value = "Test Value";
+      inplaceEditor(span).input.blur();
     },
     done: expectDone("Test Value", true, testAdvanceCharCommit)
   });
   span.focus();
 }
 
 function testAdvanceCharCommit()
 {
   clearBody();
   let span = createSpan();
   _editableField({
     element: span,
     advanceChars: ":",
     start: function() {
-      let input = span.inplaceEditor.input;
+      let input = inplaceEditor(span).input;
       for each (let ch in "Test:") {
         EventUtils.sendChar(ch);
       }
     },
     done: expectDone("Test", true, testEscapeCancel)
   });
   span.focus();
 }
@@ -89,17 +90,17 @@ function testAdvanceCharCommit()
 function testEscapeCancel()
 {
   clearBody();
   let span = createSpan();
   _editableField({
     element: span,
     initial: "initial text",
     start: function() {
-      span.inplaceEditor.input.value = "Test Value";
+      inplaceEditor(span).input.value = "Test Value";
       EventUtils.sendKey("escape");
     },
     done: expectDone("initial text", false, finishTest)
   });
   span.focus();
 }
 
 
--- a/browser/devtools/styleinspector/test/browser_ruleview_editor_changedvalues.js
+++ b/browser/devtools/styleinspector/test/browser_ruleview_editor_changedvalues.js
@@ -2,27 +2,28 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 let tempScope = {};
 Cu.import("resource:///modules/devtools/CssRuleView.jsm", tempScope);
 let CssRuleView = tempScope.CssRuleView;
 let _ElementStyle = tempScope._ElementStyle;
 let _editableField = tempScope._editableField;
+let inplaceEditor = tempScope._getInplaceEditorForSpan;
 
 let doc;
 let ruleDialog;
 let ruleView;
 
 function waitForEditorFocus(aParent, aCallback)
 {
   aParent.addEventListener("focus", function onFocus(evt) {
-    if (evt.target.inplaceEditor) {
+    if (inplaceEditor(evt.target)) {
       aParent.removeEventListener("focus", onFocus, true);
-      let editor = evt.target.inplaceEditor;
+      let editor = inplaceEditor(evt.target);
       executeSoon(function() {
         aCallback(editor);
       });
     }
   }, true);
 }
 
 function waitForEditorBlur(aEditor, aCallback)
@@ -78,17 +79,17 @@ function startTest()
 
 function testCancelNew()
 {
   // Start at the beginning: start to add a rule to the element's style
   // declaration, but leave it empty.
 
   let elementRuleEditor = ruleView.element.children[0]._ruleEditor;
   waitForEditorFocus(elementRuleEditor.element, function onNewElement(aEditor) {
-    is(elementRuleEditor.newPropSpan.inplaceEditor, aEditor, "Next focused editor should be the new property editor.");
+    is(inplaceEditor(elementRuleEditor.newPropSpan), aEditor, "Next focused editor should be the new property editor.");
     let input = aEditor.input;
     waitForEditorBlur(aEditor, function () {
       ok(!gRuleViewChanged, "Shouldn't get a change event after a cancel.");
       is(elementRuleEditor.rule.textProps.length,  0, "Should have canceled creating a new text property.");
       ok(!elementRuleEditor.propertyList.hasChildNodes(), "Should not have any properties.");
       testCreateNew();
     });
     aEditor.input.blur();
@@ -99,26 +100,26 @@ function testCancelNew()
                              ruleDialog);
 }
 
 function testCreateNew()
 {
   // Create a new property.
   let elementRuleEditor = ruleView.element.children[0]._ruleEditor;
   waitForEditorFocus(elementRuleEditor.element, function onNewElement(aEditor) {
-    is(elementRuleEditor.newPropSpan.inplaceEditor, aEditor, "Next focused editor should be the new property editor.");
+    is(inplaceEditor(elementRuleEditor.newPropSpan), aEditor, "Next focused editor should be the new property editor.");
     let input = aEditor.input;
     input.value = "background-color";
 
     waitForEditorFocus(elementRuleEditor.element, function onNewValue(aEditor) {
       expectChange();
       is(elementRuleEditor.rule.textProps.length,  1, "Should have created a new text property.");
       is(elementRuleEditor.propertyList.children.length, 1, "Should have created a property editor.");
       let textProp = elementRuleEditor.rule.textProps[0];
-      is(aEditor, textProp.editor.valueSpan.inplaceEditor, "Should be editing the value span now.");
+      is(aEditor, inplaceEditor(textProp.editor.valueSpan), "Should be editing the value span now.");
 
       aEditor.input.value = "#XYZ";
       waitForEditorBlur(aEditor, function() {
         expectChange();
         is(textProp.value, "#XYZ", "Text prop should have been changed.");
         is(textProp.editor._validate(), false, "#XYZ should not be a valid entry");
         testEditProperty();
       });
@@ -132,22 +133,22 @@ function testCreateNew()
                              ruleDialog);
 }
 
 function testEditProperty()
 {
   let idRuleEditor = ruleView.element.children[1]._ruleEditor;
   let propEditor = idRuleEditor.rule.textProps[0].editor;
   waitForEditorFocus(propEditor.element, function onNewElement(aEditor) {
-    is(propEditor.nameSpan.inplaceEditor, aEditor, "Next focused editor should be the name editor.");
+    is(inplaceEditor(propEditor.nameSpan), aEditor, "Next focused editor should be the name editor.");
     let input = aEditor.input;
     waitForEditorFocus(propEditor.element, function onNewName(aEditor) {
       expectChange();
       input = aEditor.input;
-      is(propEditor.valueSpan.inplaceEditor, aEditor, "Focus should have moved to the value.");
+      is(inplaceEditor(propEditor.valueSpan), aEditor, "Focus should have moved to the value.");
 
       waitForEditorBlur(aEditor, function() {
         expectChange();
         let value = idRuleEditor.rule.style.getPropertyValue("border-color");
         is(value, "red", "border-color should have been set.");
         is(propEditor._validate(), true, "red should be a valid entry");
         finishTest();
       });
--- a/browser/devtools/styleinspector/test/browser_ruleview_focus.js
+++ b/browser/devtools/styleinspector/test/browser_ruleview_focus.js
@@ -1,15 +1,18 @@
 /* vim: set ts=2 et sw=2 tw=80: */
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 // Test that focus doesn't leave the style editor when adding a property
 // (bug 719916)
 
+let tempScope = {};
+Cu.import("resource:///modules/devtools/CssRuleView.jsm", tempScope);
+let inplaceEditor = tempScope._getInplaceEditorForSpan;
 let doc;
 let stylePanel;
 
 function waitForRuleView(aCallback)
 {
   if (InspectorUI.ruleView) {
     aCallback();
     return;
@@ -22,19 +25,19 @@ function waitForRuleView(aCallback)
       aCallback();
     });
   }, true);
 }
 
 function waitForEditorFocus(aParent, aCallback)
 {
   aParent.addEventListener("focus", function onFocus(evt) {
-    if (evt.target.inplaceEditor) {
+    if (inplaceEditor(evt.target)) {
       aParent.removeEventListener("focus", onFocus, true);
-      let editor = evt.target.inplaceEditor;
+      let editor = inplaceEditor(evt.target);
       executeSoon(function() {
         aCallback(editor);
       });
     }
   }, true);
 }
 
 function openRuleView()
--- a/browser/devtools/styleinspector/test/browser_ruleview_ui.js
+++ b/browser/devtools/styleinspector/test/browser_ruleview_ui.js
@@ -2,27 +2,28 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 let tempScope = {}
 Cu.import("resource:///modules/devtools/CssRuleView.jsm", tempScope);
 let CssRuleView = tempScope.CssRuleView;
 let _ElementStyle = tempScope._ElementStyle;
 let _editableField = tempScope._editableField;
+let inplaceEditor = tempScope._getInplaceEditorForSpan;
 
 let doc;
 let ruleDialog;
 let ruleView;
 
 function waitForEditorFocus(aParent, aCallback)
 {
   aParent.addEventListener("focus", function onFocus(evt) {
-    if (evt.target.inplaceEditor) {
+    if (inplaceEditor(evt.target)) {
       aParent.removeEventListener("focus", onFocus, true);
-      let editor = evt.target.inplaceEditor;
+      let editor = inplaceEditor(evt.target);
       executeSoon(function() {
         aCallback(editor);
       });
     }
   }, true);
 }
 
 function waitForEditorBlur(aEditor, aCallback)
@@ -78,17 +79,17 @@ function startTest()
 
 function testCancelNew()
 {
   // Start at the beginning: start to add a rule to the element's style
   // declaration, but leave it empty.
 
   let elementRuleEditor = ruleView.element.children[0]._ruleEditor;
   waitForEditorFocus(elementRuleEditor.element, function onNewElement(aEditor) {
-    is(elementRuleEditor.newPropSpan.inplaceEditor, aEditor, "Next focused editor should be the new property editor.");
+    is(inplaceEditor(elementRuleEditor.newPropSpan), aEditor, "Next focused editor should be the new property editor.");
     let input = aEditor.input;
     waitForEditorBlur(aEditor, function () {
       ok(!gRuleViewChanged, "Shouldn't get a change event after a cancel.");
       is(elementRuleEditor.rule.textProps.length,  0, "Should have canceled creating a new text property.");
       ok(!elementRuleEditor.propertyList.hasChildNodes(), "Should not have any properties.");
       testCreateNew();
     });
     aEditor.input.blur();
@@ -99,26 +100,26 @@ function testCancelNew()
                              ruleDialog);
 }
 
 function testCreateNew()
 {
   // Create a new property.
   let elementRuleEditor = ruleView.element.children[0]._ruleEditor;
   waitForEditorFocus(elementRuleEditor.element, function onNewElement(aEditor) {
-    is(elementRuleEditor.newPropSpan.inplaceEditor, aEditor, "Next focused editor should be the new property editor.");
+    is(inplaceEditor(elementRuleEditor.newPropSpan), aEditor, "Next focused editor should be the new property editor.");
     let input = aEditor.input;
     input.value = "background-color";
 
     waitForEditorFocus(elementRuleEditor.element, function onNewValue(aEditor) {
       expectChange();
       is(elementRuleEditor.rule.textProps.length,  1, "Should have created a new text property.");
       is(elementRuleEditor.propertyList.children.length, 1, "Should have created a property editor.");
       let textProp = elementRuleEditor.rule.textProps[0];
-      is(aEditor, textProp.editor.valueSpan.inplaceEditor, "Should be editing the value span now.");
+      is(aEditor, inplaceEditor(textProp.editor.valueSpan), "Should be editing the value span now.");
 
       aEditor.input.value = "purple";
       waitForEditorBlur(aEditor, function() {
         expectChange();
         is(textProp.value, "purple", "Text prop should have been changed.");
         testEditProperty();
       });
 
@@ -132,22 +133,22 @@ function testCreateNew()
                              ruleDialog);
 }
 
 function testEditProperty()
 {
   let idRuleEditor = ruleView.element.children[1]._ruleEditor;
   let propEditor = idRuleEditor.rule.textProps[0].editor;
   waitForEditorFocus(propEditor.element, function onNewElement(aEditor) {
-    is(propEditor.nameSpan.inplaceEditor, aEditor, "Next focused editor should be the name editor.");
+    is(inplaceEditor(propEditor.nameSpan), aEditor, "Next focused editor should be the name editor.");
     let input = aEditor.input;
     waitForEditorFocus(propEditor.element, function onNewName(aEditor) {
       expectChange();
       input = aEditor.input;
-      is(propEditor.valueSpan.inplaceEditor, aEditor, "Focus should have moved to the value.");
+      is(inplaceEditor(propEditor.valueSpan), aEditor, "Focus should have moved to the value.");
 
       waitForEditorBlur(aEditor, function() {
         expectChange();
         is(idRuleEditor.rule.style.getPropertyValue("border-color"), "red",
            "border-color should have been set.");
         testDisableProperty();
       });
 
--- a/browser/installer/package-manifest.in
+++ b/browser/installer/package-manifest.in
@@ -168,16 +168,17 @@
 @BINPATH@/components/dom_network.xpt
 @BINPATH@/components/dom_notification.xpt
 @BINPATH@/components/dom_html.xpt
 @BINPATH@/components/dom_indexeddb.xpt
 @BINPATH@/components/dom_offline.xpt
 @BINPATH@/components/dom_json.xpt
 @BINPATH@/components/dom_power.xpt
 @BINPATH@/components/dom_range.xpt
+@BINPATH@/components/dom_settings.xpt
 @BINPATH@/components/dom_sidebar.xpt
 @BINPATH@/components/dom_sms.xpt
 @BINPATH@/components/dom_storage.xpt
 @BINPATH@/components/dom_stylesheets.xpt
 @BINPATH@/components/dom_traversal.xpt
 @BINPATH@/components/dom_xbl.xpt
 @BINPATH@/components/dom_xpath.xpt
 @BINPATH@/components/dom_xul.xpt
@@ -414,16 +415,18 @@
 #ifdef MOZ_SERVICES_SYNC
 @BINPATH@/components/SyncComponents.manifest
 @BINPATH@/components/Weave.js
 #endif
 @BINPATH@/components/TelemetryPing.js
 @BINPATH@/components/TelemetryPing.manifest
 @BINPATH@/components/messageWakeupService.js
 @BINPATH@/components/messageWakeupService.manifest
+@BINPATH@/components/SettingsManager.js
+@BINPATH@/components/SettingsManager.manifest
 @BINPATH@/components/Webapps.js
 @BINPATH@/components/Webapps.manifest
 
 @BINPATH@/components/ContactManager.js
 @BINPATH@/components/ContactManager.manifest
 
 ; Modules
 @BINPATH@/modules/*
--- a/browser/locales/en-US/chrome/browser/browser.properties
+++ b/browser/locales/en-US/chrome/browser/browser.properties
@@ -336,27 +336,12 @@ telemetryNoButtonLabel = No
 telemetryNoButtonAccessKey = N
 
 # Webapps notification popup
 webapps.install = Install
 webapps.install.accesskey = I
 #LOCALIZATION NOTE (webapps.requestInstall) %1$S is the web app name, %2$S is the site from which the web app is installed
 webapps.requestInstall = Do you want to install "%1$S" from this site (%2$S)?
 
-# Keyword.URL reset prompt
-# LOCALIZATION NOTE (keywordPrompt.message):
-#  - %1$S is brandShortName
-#  - %2$S is a host name (e.g. "somewebsearch.com") from the current value of keyword.URL
-#  - %3$S is the name of the default search engine (e.g. "Google")
-keywordPrompt.message = %1$S is using '%2$S' for searches from the location bar. Would you like to restore the default search (%3$S)?
-
-# LOCALIZATION NOTE (keywordPrompt.yesButton): %1$S is the name of the default search engine
-keywordPrompt.yesButton = Yes, use %1$S
-keywordPrompt.yesButton.accessKey = Y
-
-# LOCALIZATION NOTE (keywordPrompt.noButton): %1$S is a host name (e.g. "somewebsearch.com") from the current value of keyword.URL
-keywordPrompt.noButton = No, continue using '%1$S'
-keywordPrompt.noButton.accessKey  = N
-
 # Telemetry opt-out prompt for Aurora and Nightly
 # LOCALIZATION NOTE (telemetryOptOutPrompt): %1$S and %3$S will be replaced by
 # brandFullName, and %2$S by the value of the toolkit.telemetry.server_owner preference.
 telemetryOptOutPrompt = %1$S sends information about performance, hardware, usage and customizations back to %2$S to help improve %3$S.
deleted file mode 100644
--- a/browser/modules/KeywordURLResetPrompter.jsm
+++ /dev/null
@@ -1,106 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-let EXPORTED_SYMBOLS = [ "KeywordURLResetPrompter" ];
-
-const Ci = Components.interfaces;
-const Cc = Components.classes;
-const Cu = Components.utils;
-
-Cu.import("resource://gre/modules/Services.jsm");
-
-const KEYWORD_PROMPT_REV = 1;
-
-let KeywordURLResetPrompter = {
-  get shouldPrompt() {
-    let keywordURLUserSet = Services.prefs.prefHasUserValue("keyword.URL");
-    let declinedRev;
-    try {
-      declinedRev = Services.prefs.getIntPref("browser.keywordURLPromptDeclined");
-    } catch (ex) {}
-
-    return keywordURLUserSet && declinedRev != KEYWORD_PROMPT_REV;
-  },
-
-  prompt: function KeywordURLResetPrompter_prompt(win, keywordURI) {
-    let tabbrowser = win.gBrowser;
-    let notifyBox = tabbrowser.getNotificationBox();
-
-    let existingNotification = notifyBox.getNotificationWithValue("keywordURL-reset");
-    if (existingNotification)
-      return;
-
-    // Find the name/URI of this build's original default engine.
-    // XXX: Can't use originalDefaultEngine getter here, because that doesn't
-    //      use the default pref branch.
-    let defaultURI;
-    let defaultEngine;
-    try {
-      let defaultPB = Services.prefs.getDefaultBranch(null);
-      let defaultName = defaultPB.getComplexValue("browser.search.defaultenginename",
-                                                  Ci.nsIPrefLocalizedString).data;
-      defaultEngine = Services.search.getEngineByName(defaultName);
-      defaultURI = defaultEngine.getSubmission("foo").uri;
-    } catch (ex) {
-      // Something went horribly wrong! bail out
-      return;
-    }
-
-    // If the user-set value has the same base domain as the default, don't
-    // prompt.
-    let keywordBaseDomain;
-    try {
-      keywordBaseDomain = Services.eTLD.getBaseDomain(keywordURI);
-      if (keywordBaseDomain == Services.eTLD.getBaseDomain(defaultURI))
-        return;
-    } catch (ex) {}
-
-    if (!keywordBaseDomain)
-      return;
-
-    let brandBundle  = Services.strings.createBundle("chrome://branding/locale/brand.properties");
-    let brandShortName = brandBundle.GetStringFromName("brandShortName");
-
-    let browserBundle = win.gNavigatorBundle;
-    let msg = browserBundle.getFormattedString("keywordPrompt.message",
-                                               [brandShortName, keywordBaseDomain,
-                                                defaultEngine.name]);
-    let buttons = [
-      {
-        label: browserBundle.getFormattedString("keywordPrompt.yesButton",
-                                                [defaultEngine.name]),
-        accessKey: browserBundle.getString("keywordPrompt.yesButton.accessKey"),
-        popup:     null,
-        callback: function(aNotificationBar, aButton) {
-          Services.prefs.clearUserPref("keyword.URL");
-          Services.prefs.clearUserPref("browser.search.defaultenginename");
-          try {
-            // If the currently loaded URI still has the same base domain as the
-            // keyword URI (this is used as a rough approximation of whether the
-            // user is still seeing search results as opposed to having clicked
-            // on a result link), load the default engine's searchForm URL so
-            // that they can re-do their search.
-            let currentBaseDomain = Services.eTLD.getBaseDomain(tabbrowser.currentURI);
-            if (currentBaseDomain == keywordBaseDomain)
-              tabbrowser.loadURI(defaultEngine.searchForm);
-          } catch (ex) {}
-        }
-      },
-      {
-        label: browserBundle.getFormattedString("keywordPrompt.noButton",
-                                                [keywordBaseDomain]),
-        accessKey: browserBundle.getString("keywordPrompt.noButton.accessKey"),
-        popup:     null,
-        callback: function(aNotificationBar, aButton) {
-          Services.prefs.setIntPref("browser.keywordURLPromptDeclined", KEYWORD_PROMPT_REV);
-        }
-      }
-    ];
-    
-    let notification = notifyBox.appendNotification(msg, "keywordURL-reset", null, notifyBox.PRIORITY_WARNING_HIGH, buttons);
-    notification.setAttribute("hideclose", true);
-    // stick around for a few page loads in case there are redirects involved
-    notification.persistence = 3;
-  }
-}
--- a/browser/modules/Makefile.in
+++ b/browser/modules/Makefile.in
@@ -47,17 +47,16 @@ include $(topsrcdir)/config/config.mk
 TEST_DIRS += test
 
 EXTRA_JS_MODULES = \
 	openLocationLastURL.jsm \
 	NetworkPrioritizer.jsm \
 	NewTabUtils.jsm \
 	offlineAppCache.jsm \
 	TelemetryTimestamps.jsm \
-	KeywordURLResetPrompter.jsm \
 	webappsUI.jsm \
 	$(NULL)
 
 ifeq ($(MOZ_WIDGET_TOOLKIT),windows) 
 EXTRA_JS_MODULES += \
 	WindowsPreviewPerTab.jsm \
 	WindowsJumpLists.jsm \
 	$(NULL)
--- a/browser/modules/test/Makefile.in
+++ b/browser/modules/test/Makefile.in
@@ -41,17 +41,16 @@ VPATH		= @srcdir@
 relativesrcdir  = browser/modules/test
 
 include $(DEPTH)/config/autoconf.mk
 include $(topsrcdir)/config/rules.mk
 
 _BROWSER_FILES = \
                  browser_NetworkPrioritizer.js \
                  browser_TelemetryTimestamps.js \
-                 browser_keywordURLReset.js \
                  $(NULL)
 
 ifeq ($(MOZ_WIDGET_TOOLKIT),windows) 
 _BROWSER_FILES += \
                  browser_taskbar_preview.js \
                  $(NULL)
 endif
 
deleted file mode 100644
--- a/browser/modules/test/browser_keywordURLReset.js
+++ /dev/null
@@ -1,110 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-function test() {
-  waitForExplicitFinish();
-
-  let newTab = gBrowser.selectedTab = gBrowser.addTab("about:blank", {skipAnimation: true});
-  registerCleanupFunction(function () {
-    gBrowser.removeTab(newTab);
-    Services.prefs.clearUserPref("keyword.URL");
-    Services.prefs.clearUserPref("browser.search.defaultenginename");
-  });
-
-  function onKeywordPrefUse(cb) {
-    Services.obs.addObserver(function obs() {
-      Services.obs.removeObserver(obs, "defaultURIFixup-using-keyword-pref");
-      executeSoon(function () {
-        let nbox = gBrowser.getNotificationBox();
-        let notification = nbox.getNotificationWithValue("keywordURL-reset");
-        cb(notification);
-      });
-    }, "defaultURIFixup-using-keyword-pref", false);
-  }
-
-  function testQuery(cb) {
-    onKeywordPrefUse(cb);
-    gURLBar.focus();
-    gURLBar.value = "foo bar";
-    gURLBar.handleCommand();
-  }
-
-  function setKeywordURL(value) {
-    Services.prefs.setCharPref("keyword.URL", value);
-    let keywordURI = XULBrowserWindow._uriFixup.keywordToURI("foo bar");
-    is(keywordURI.spec, value + "foo+bar", "keyword.URL was set to " + value);
-  }
-
-  // Before modifying any prefs, get a submission object for this build's
-  // actual default engine for verification of the "Reset" functionality.
-  let originalDefaultEngine = Services.search.originalDefaultEngine;
-  let defaultSubmission = originalDefaultEngine.getSubmission("foo bar", "application/x-moz-keywordsearch");
-  if (!defaultSubmission)
-    defaultSubmission = originalDefaultEngine.getSubmission("foo bar");
-
-  var tests = [
-    {
-      name: "similar URL that shouldn't trigger prompt",
-      setup: function () {
-        setKeywordURL(defaultSubmission.uri.prePath + "/othersearch");
-      },
-      check: function (notification) {
-        ok(!notification, "didn't get a search reset notification");
-      }
-    },
-    {
-      name: "URL that should trigger prompt",
-      setup: function () {
-        // First clear any values from the previous test so that we can verify
-        // that the dummy default engine we're adding below has an effect.
-        Services.prefs.clearUserPref("keyword.URL");
-
-        // Add a dummy "default engine" to verify that the "reset" actually
-        // resets the originalDefaultEngine too (and not just keyword.URL)
-        Services.search.addEngineWithDetails("TestEngine", "", "", "", "GET", "http://mochi.test/test?q={searchTerms}");
-        Services.prefs.setCharPref("browser.search.defaultenginename", "TestEngine");
-
-        // Check that it was added successfully
-        let engine = Services.search.getEngineByName("TestEngine");
-        ok(engine, "added engine successfully");
-        registerCleanupFunction(function () {
-          Services.search.removeEngine(engine);
-        });
-        is(Services.search.originalDefaultEngine, engine, "engine is now the originalDefaultEngine");
-        let keywordURI = XULBrowserWindow._uriFixup.keywordToURI("foo bar");
-        is(keywordURI.spec, "http://mochi.test/test?q=foo+bar", "default engine affects keywordToURI");
-
-        setKeywordURL("http://invalid.foo/search/");
-      },
-      check: function (notification) {
-        ok(notification, "got a search reset notification");
-
-        // Press the "reset" button
-        notification.getElementsByTagName("button").item(0).click();
-
-        // Check that the reset worked
-        let keywordURI = XULBrowserWindow._uriFixup.keywordToURI("foo bar");
-        is(keywordURI.spec, defaultSubmission.uri.spec,
-           "keyword.URL came from original default engine after reset");
-      }
-    }
-  ];
-
-  function nextTest() {
-    let test = tests.shift();
-    if (!test) {
-      finish();
-      return;
-    }
-
-    info("Running test: " + test.name);
-    test.setup();
-    testQuery(function (notification) {
-      test.check(notification);
-      executeSoon(nextTest);
-    });
-  }
-  
-  nextTest();
-}
-
--- a/browser/themes/winstripe/browser-aero.css
+++ b/browser/themes/winstripe/browser-aero.css
@@ -61,16 +61,20 @@
   }
 
   #main-window[tabsontop=false]:not([disablechrome]) .tabbrowser-tab[selected=true]:not(:-moz-lwtheme) {
     background-image: @toolbarShadowOnTab@,
                       -moz-linear-gradient(white, @toolbarHighlight@ 50%),
                       -moz-linear-gradient(@customToolbarColor@, @customToolbarColor@);
   }
 
+  #navigator-toolbox:not(:-moz-lwtheme)::after {
+    background-color: #aabccf;
+  }
+
   #navigator-toolbox[tabsontop=true] #urlbar:not(:-moz-lwtheme),
   #navigator-toolbox[tabsontop=true] .searchbar-textbox:not(:-moz-lwtheme) {
     border-color: hsla(210,54%,20%,.25) hsla(210,54%,20%,.27) hsla(210,54%,20%,.3);
   }
 
   #navigator-toolbox[tabsontop=true] #urlbar:not(:-moz-lwtheme):not([focused]):hover,
   #navigator-toolbox[tabsontop=true] .searchbar-textbox:not(:-moz-lwtheme):not([focused]):hover {
     border-color: hsla(210,54%,20%,.35) hsla(210,54%,20%,.37) hsla(210,54%,20%,.4);
@@ -205,17 +209,17 @@
   }
 
   /* Toolbar shadow behind tabs */
   /* This code is only needed for restored windows (i.e. sizemode=normal)
      because of the border radius on the toolbar below the tab bar. */
   #main-window[sizemode=normal] #navigator-toolbox[tabsontop=true] > #nav-bar:not(:-moz-lwtheme),
   #main-window[sizemode=normal] #navigator-toolbox[tabsontop=true] > #nav-bar[collapsed=true]:not([customizing]) + toolbar:not(:-moz-lwtheme),
   #main-window[sizemode=normal] #navigator-toolbox[tabsontop=true] > #nav-bar[collapsed=true]:not([customizing]) + #customToolbars + #PersonalToolbar:not(:-moz-lwtheme),
-  #main-window[sizemode=normal][tabsontop=true][disablechrome] #navigator-toolbox:not(:-moz-lwtheme)::after {
+  #main-window[sizemode=normal][disablechrome] #navigator-toolbox[tabsontop=true]:not(:-moz-lwtheme)::after {
     border-top: 1px solid @toolbarShadowColor@;
     border-top-left-radius: 2.5px;
     border-top-right-radius: 2.5px;
     background-clip: padding-box;
   }
   #main-window[sizemode=normal] #TabsToolbar[tabsontop=true]:not(:-moz-lwtheme) {
     margin-bottom: -1px;
     background-image: none !important;
@@ -239,17 +243,17 @@
   }
 
   #main-window[sizemode=normal] #TabsToolbar[tabsontop=false] {
     padding-left: 2px;
     padding-right: 2px;
   }
 
   /* Rounded corners for when chrome is disabled */
-  #main-window[sizemode=normal][tabsontop=true][disablechrome] #navigator-toolbox:not(:-moz-lwtheme)::after {
+  #main-window[sizemode=normal][disablechrome] #navigator-toolbox[tabsontop=true]:not(:-moz-lwtheme)::after {
     visibility: visible;
     background-color: @customToolbarColor@;
     background-image: -moz-linear-gradient(@toolbarHighlight@, @toolbarHighlight@);
     height: 4px;
   }
 
   /* Make the window draggable by glassed toolbars (bug 555081) */
   #toolbar-menubar:not([autohide="true"]),
--- a/configure.in
+++ b/configure.in
@@ -1618,23 +1618,25 @@ if test "$OS_TARGET" = "Android" -a -z "
     if test -n "$MOZ_ANDROID_LIBSTDCXX" ; then
        if test ! -e "$android_ndk/sources/cxx-stl/gnu-libstdc++/libs/$ANDROID_CPU_ARCH/libstdc++.a" ; then
           AC_MSG_ERROR([Cannot find path to libstdc++ (NDK version >= 5?)])
        fi
        STLPORT_CPPFLAGS="-I$android_ndk/sources/cxx-stl/gnu-libstdc++/include -I$android_ndk/sources/cxx-stl/gnu-libstdc++/libs/$ANDROID_CPU_ARCH/include -D_GLIBCXX_PERMIT_BACKWARD_HASH"
        STLPORT_LDFLAGS="-L$android_ndk/sources/cxx-stl/gnu-libstdc++/libs/$ANDROID_CPU_ARCH"
        STLPORT_LIBS="-lstdc++"
     elif test -e "$android_ndk/sources/cxx-stl/stlport/src/iostream.cpp" ; then
+       if test -e "$android_ndk/sources/cxx-stl/stlport/libs/$ANDROID_CPU_ARCH/libstlport_static.a"; then
+          STLPORT_LDFLAGS="-L$_objdir/build/stlport -L$android_ndk/sources/cxx-stl/stlport/libs/$ANDROID_CPU_ARCH/"
+       elif test -e "$android_ndk/tmp/ndk-digit/build/install/sources/cxx-stl/stlport/libs/$ANDROID_CPU_ARCH/libstlport_static.a"; then
+          STLPORT_LDFLAGS="-L$_objdir/build/stlport -L$android_ndk/tmp/ndk-digit/build/install/sources/cxx-stl/stlport/libs/$ANDROID_CPU_ARCH/"
+       else
+          AC_MSG_ERROR([Couldn't find path to stlport in the android ndk])
+       fi
        STLPORT_SOURCES="$android_ndk/sources/cxx-stl/stlport"
        STLPORT_CPPFLAGS="-I$_objdir/build/stlport -I$android_ndk/sources/cxx-stl/stlport/stlport"
-       STLPORT_LDFLAGS="-L$_objdir/build/stlport -L$android_ndk/sources/cxx-stl/stlport/libs/$ANDROID_CPU_ARCH/"
-       STLPORT_LIBS="-lstlport_static"
-    elif  test -e "$android_ndk/tmp/ndk-digit/build/install/sources/cxx-stl/stlport/libs/$ANDROID_CPU_ARCH/libstlport_static.a" ; then
-       STLPORT_CPPFLAGS="-I$android_ndk/sources/cxx-stl/stlport/stlport"
-       STLPORT_LDFLAGS="-L$android_ndk/tmp/ndk-digit/build/install/sources/cxx-stl/stlport/libs/$ANDROID_CPU_ARCH"
        STLPORT_LIBS="-lstlport_static"
     elif test "$target" != "arm-android-eabi"; then
        dnl fail if we're not building with NDKr4
        AC_MSG_ERROR([Couldn't find path to stlport in the android ndk])
     fi
     CXXFLAGS="$CXXFLAGS $STLPORT_CPPFLAGS"
     LDFLAGS="$LDFLAGS $STLPORT_LDFLAGS"
     LIBS="$LIBS $STLPORT_LIBS"
@@ -4962,30 +4964,50 @@ dnl ====================================
 if test "$MOZ_ENABLE_QT"
 then
     MOZ_ARG_WITH_STRING(qtdir,
     [  --with-qtdir=\$dir       Specify Qt directory ],
     [ QTDIR=$withval])
 
     if test -z "$QTDIR"; then
         PKG_CHECK_MODULES(MOZ_QT, QtGui QtNetwork QtCore QtOpenGL)
+        PKG_CHECK_MODULES(MOZ_QT5, QtWidgets QtMultimedia QtPrintSupport QtQuick1,
+                      MOZ_ENABLE_QT5=1,
+                      MOZ_ENABLE_QT5=)
+        if test "$MOZ_ENABLE_QT5"; then
+            echo "Using qt5"
+            MOZ_QT_CFLAGS="$MOZ_QT_CFLAGS $MOZ_QT5_CFLAGS"
+            MOZ_QT_LIBS="$MOZ_QT_LIBS $MOZ_QT5_LIBS"
+        fi
+
         AC_CHECK_PROGS(HOST_MOC, $MOC moc, "")
         AC_CHECK_PROGS(HOST_RCC, $RCC rcc, "")
     else
         MOZ_QT_LIBS="-L$QTDIR/lib/ -lQtGui -lQtNetwork -lQtCore -lQtXml -lQtOpenGL"
 
         MOZ_QT_CFLAGS="-DQT_SHARED"
         MOZ_QT_CFLAGS="$MOZ_QT_CFLAGS -I$QTDIR/include"
         MOZ_QT_CFLAGS="$MOZ_QT_CFLAGS -I$QTDIR/include/Qt"
         MOZ_QT_CFLAGS="$MOZ_QT_CFLAGS -I$QTDIR/include/QtGui"
         MOZ_QT_CFLAGS="$MOZ_QT_CFLAGS -I$QTDIR/include/QtCore"
         MOZ_QT_CFLAGS="$MOZ_QT_CFLAGS -I$QTDIR/include/QtNetwork"
         MOZ_QT_CFLAGS="$MOZ_QT_CFLAGS -I$QTDIR/include/QtXml"
+        MOZ_QT_CFLAGS="$MOZ_QT_CFLAGS -I$QTDIR/include/QtDeclarative"
         HOST_MOC="$QTDIR/bin/moc"
         HOST_RCC="$QTDIR/bin/rcc"
+
+        # QtWidgets was introduced only in Qt5
+        if test -d $QTDIR/include/QtWidgets; then
+            echo "Using qt5"
+            MOZ_QT_CFLAGS="$MOZ_QT_CFLAGS -I$QTDIR/include/QtWidgets"
+            MOZ_QT_CFLAGS="$MOZ_QT_CFLAGS -I$QTDIR/include/QtMultimedia"
+            MOZ_QT_CFLAGS="$MOZ_QT_CFLAGS -I$QTDIR/include/QtPrintSupport"
+            MOZ_QT_CFLAGS="$MOZ_QT_CFLAGS -I$QTDIR/include/QtQuick1"
+            MOZ_QT_LIBS="$MOZ_QT_LIBS -lQtWidgets -lQtMultimedia -lQtPrintSupport -lQtQuick1"
+        fi
     fi
     if test -z "$HOST_MOC"; then
         AC_MSG_ERROR([No acceptable moc preprocessor found. Qt SDK is not installed or --with-qt is
 incorrect])
     fi
     if test -z "$HOST_RCC"; then
         AC_MSG_ERROR([No acceptable rcc preprocessor found. Qt SDK is not installed or --with-qt is
 incorrect])
--- a/content/base/public/nsIDocument.h
+++ b/content/base/public/nsIDocument.h
@@ -1416,17 +1416,21 @@ public:
    */
   virtual already_AddRefed<nsIDocument>
   CreateStaticClone(nsISupports* aCloneContainer);
 
   /**
    * If this document is a static clone, this returns the original
    * document.
    */
-  nsIDocument* GetOriginalDocument() { return mOriginalDocument; }
+  nsIDocument* GetOriginalDocument()
+  {
+    MOZ_ASSERT(!mOriginalDocument || !mOriginalDocument->GetOriginalDocument());
+    return mOriginalDocument;
+  }
 
   /**
    * Called by nsParser to preload images. Can be removed and code moved
    * to nsPreloadURIs::PreloadURIs() in file nsParser.cpp whenever the
    * parser-module is linked with gklayout-module.  aCrossOriginAttr should
    * be a void string if the attr is not present.
    */
   virtual void MaybePreLoadImage(nsIURI* uri,
--- a/content/base/src/nsDocument.cpp
+++ b/content/base/src/nsDocument.cpp
@@ -8081,19 +8081,22 @@ nsIDocument::CreateStaticClone(nsISuppor
   SetContainer(aCloneContainer);
   nsCOMPtr<nsIDOMNode> clonedNode;
   nsresult rv = domDoc->CloneNode(true, 1, getter_AddRefs(clonedNode));
   SetContainer(originalContainer);
 
   nsCOMPtr<nsIDocument> clonedDoc;
   if (NS_SUCCEEDED(rv)) {
     clonedDoc = do_QueryInterface(clonedNode);
-    nsCOMPtr<nsIDOMDocument> clonedDOMDoc = do_QueryInterface(clonedDoc);
-    if (clonedDOMDoc) {
-      clonedDoc->mOriginalDocument = this;
+    if (clonedDoc) {
+      if (IsStaticDocument()) {
+        clonedDoc->mOriginalDocument = mOriginalDocument;
+      } else {
+        clonedDoc->mOriginalDocument = this;
+      }
       PRInt32 sheetsCount = GetNumberOfStyleSheets();
       for (PRInt32 i = 0; i < sheetsCount; ++i) {
         nsRefPtr<nsCSSStyleSheet> sheet = do_QueryObject(GetStyleSheetAt(i));
         if (sheet) {
           if (sheet->IsApplicable()) {
             nsRefPtr<nsCSSStyleSheet> clonedSheet =
               sheet->Clone(nsnull, nsnull, clonedDoc, nsnull);
             NS_WARN_IF_FALSE(clonedSheet, "Cloning a stylesheet didn't work!");
--- a/content/canvas/src/Makefile.in
+++ b/content/canvas/src/Makefile.in
@@ -47,16 +47,17 @@ include $(DEPTH)/config/autoconf.mk
 MODULE		= content
 LIBRARY_NAME	= gkconcvs_s
 LIBXUL_LIBRARY  = 1
 
 EXPORTS = \
 	CustomQS_Canvas.h \
 	CustomQS_Canvas2D.h \
 	CustomQS_WebGL.h \
+	WebGLContext.h \
 	$(NULL)
 
 EXPORTS_NAMESPACES = mozilla/dom
 
 EXPORTS_mozilla/dom = \
   ImageData.h \
   $(NULL)
 
--- a/content/canvas/src/WebGLContext.cpp
+++ b/content/canvas/src/WebGLContext.cpp
@@ -89,16 +89,18 @@ NS_NewCanvasRenderingContextWebGL(nsIDOM
     NS_ADDREF(*aResult = ctx);
     return NS_OK;
 }
 
 WebGLContext::WebGLContext()
     : mCanvasElement(nsnull),
       gl(nsnull)
 {
+    mEnabledExtensions.SetLength(WebGLExtensionID_Max);
+
     mGeneration = 0;
     mInvalidated = false;
     mResetLayer = true;
     mVerbose = false;
     mOptionsFrozen = false;
 
     mActiveTexture = 0;
     mWebGLError = LOCAL_GL_NO_ERROR;
@@ -484,17 +486,17 @@ WebGLContext::SetDimensions(PRInt32 widt
         }
         LogMessage("Using software rendering via OSMesa (THIS WILL BE SLOW)");
     }
 
 #ifdef XP_WIN
     // if we want EGL, try it now
     if (!gl && (preferEGL || useANGLE) && !preferOpenGL) {
         gl = gl::GLContextProviderEGL::CreateOffscreen(gfxIntSize(width, height), format);
-        if (gl && !InitAndValidateGL()) {
+        if (!gl || !InitAndValidateGL()) {
             LogMessage("Error during ANGLE OpenGL ES initialization");
             return NS_ERROR_FAILURE;
         }
     }
 #endif
 
     // try the default provider, whatever that is
     if (!gl && useOpenGL) {
@@ -1163,19 +1165,21 @@ WebGLContext::ForceRestoreContext()
 //
 
 NS_IMPL_CYCLE_COLLECTING_ADDREF(WebGLContext)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(WebGLContext)
 
 NS_IMPL_CYCLE_COLLECTION_CLASS(WebGLContext)
 NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(WebGLContext)
   NS_IMPL_CYCLE_COLLECTION_UNLINK_NSCOMPTR(mCanvasElement)
+  NS_IMPL_CYCLE_COLLECTION_UNLINK_NSTARRAY(mEnabledExtensions)
 NS_IMPL_CYCLE_COLLECTION_UNLINK_END
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(WebGLContext)
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE_NSCOMPTR(mCanvasElement)
+  NS_IMPL_CYCLE_COLLECTION_TRAVERSE_NSTARRAY_OF_NSCOMPTR(mEnabledExtensions)
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
 
 DOMCI_DATA(WebGLRenderingContext, WebGLContext)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(WebGLContext)
   NS_INTERFACE_MAP_ENTRY(nsIDOMWebGLRenderingContext)
   NS_INTERFACE_MAP_ENTRY(nsICanvasRenderingContextInternal)
   NS_INTERFACE_MAP_ENTRY(nsISupportsWeakReference)
@@ -1291,54 +1295,44 @@ NS_IMETHODIMP base::SetName(WebGLuint aN
 
 NAME_NOT_SUPPORTED(WebGLTexture)
 NAME_NOT_SUPPORTED(WebGLBuffer)
 NAME_NOT_SUPPORTED(WebGLProgram)
 NAME_NOT_SUPPORTED(WebGLShader)
 NAME_NOT_SUPPORTED(WebGLFramebuffer)
 NAME_NOT_SUPPORTED(WebGLRenderbuffer)
 
-NS_IMPL_ADDREF(WebGLExtension)
-NS_IMPL_RELEASE(WebGLExtension)
+// WebGLExtension
+
+NS_IMPL_CYCLE_COLLECTION_CLASS(WebGLExtension)
+
+NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN(WebGLExtension)
+  NS_IMPL_CYCLE_COLLECTION_TRACE_PRESERVED_WRAPPER
+NS_IMPL_CYCLE_COLLECTION_TRACE_END
+
+NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(WebGLExtension)
+  NS_IMPL_CYCLE_COLLECTION_TRAVERSE_SCRIPT_OBJECTS
+NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
+
+NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(WebGLExtension)
+  NS_IMPL_CYCLE_COLLECTION_UNLINK_PRESERVED_WRAPPER
+NS_IMPL_CYCLE_COLLECTION_UNLINK_END
+  
+NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(WebGLExtension)
+  NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
+  NS_INTERFACE_MAP_ENTRY(nsISupports)
+  NS_INTERFACE_MAP_ENTRY(nsIWebGLExtension)
+  NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(WebGLExtension)
+NS_INTERFACE_MAP_END 
+
+NS_IMPL_CYCLE_COLLECTING_ADDREF(WebGLExtension)
+NS_IMPL_CYCLE_COLLECTING_RELEASE(WebGLExtension)
 
 DOMCI_DATA(WebGLExtension, WebGLExtension)
 
-NS_INTERFACE_MAP_BEGIN(WebGLExtension)
-  NS_INTERFACE_MAP_ENTRY(nsIWebGLExtension)
-  NS_INTERFACE_MAP_ENTRY(nsISupports)
-  NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(WebGLExtension)
-NS_INTERFACE_MAP_END
-
-NS_IMPL_ADDREF(WebGLExtensionStandardDerivatives)
-NS_IMPL_RELEASE(WebGLExtensionStandardDerivatives)
-
-DOMCI_DATA(WebGLExtensionStandardDerivatives, WebGLExtensionStandardDerivatives)
-
-NS_INTERFACE_MAP_BEGIN(WebGLExtensionStandardDerivatives)
-  NS_INTERFACE_MAP_ENTRY(nsIWebGLExtensionStandardDerivatives)
-  NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, WebGLExtension)
-  NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(WebGLExtensionStandardDerivatives)
-NS_INTERFACE_MAP_END_INHERITING(WebGLExtension)
-
-NS_IMPL_ADDREF(WebGLExtensionTextureFilterAnisotropic)
-NS_IMPL_RELEASE(WebGLExtensionTextureFilterAnisotropic)
-
-DOMCI_DATA(WebGLExtensionTextureFilterAnisotropic, WebGLExtensionTextureFilterAnisotropic)
-
-NS_IMPL_ADDREF(WebGLExtensionLoseContext)
-NS_IMPL_RELEASE(WebGLExtensionLoseContext)
-
-DOMCI_DATA(WebGLExtensionLoseContext, WebGLExtensionLoseContext)
-
-NS_INTERFACE_MAP_BEGIN(WebGLExtensionLoseContext)
-  NS_INTERFACE_MAP_ENTRY(nsIWebGLExtensionLoseContext)
-  NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, WebGLExtension)
-  NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(WebGLExtensionLoseContext)
-NS_INTERFACE_MAP_END_INHERITING(WebGLExtension)
-
 /* readonly attribute WebGLsizei drawingBufferWidth; */
 NS_IMETHODIMP
 WebGLContext::GetDrawingBufferWidth(WebGLsizei *aWidth)
 {
     if (!IsContextStable())
         return NS_OK;
 
     *aWidth = mWidth;
--- a/content/canvas/src/WebGLContext.h
+++ b/content/canvas/src/WebGLContext.h
@@ -53,16 +53,17 @@
 #include "nsIDOMWebGLRenderingContext.h"
 #include "nsICanvasRenderingContextInternal.h"
 #include "nsHTMLCanvasElement.h"
 #include "nsWeakReference.h"
 #include "nsIDOMHTMLElement.h"
 #include "nsIMemoryReporter.h"
 #include "nsIJSNativeInitializer.h"
 #include "nsContentUtils.h"
+#include "nsWrapperCache.h"
 
 #include "GLContextProvider.h"
 #include "Layers.h"
 
 #include "CheckedInt.h"
 #include "nsDataHashtable.h"
 
 #ifdef XP_MACOSX
@@ -532,16 +533,20 @@ public:
     NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(WebGLContext, nsIDOMWebGLRenderingContext)
 
     NS_DECL_NSIDOMWEBGLRENDERINGCONTEXT
 
     NS_DECL_NSITIMERCALLBACK
 
     // nsICanvasRenderingContextInternal
     NS_IMETHOD SetCanvasElement(nsHTMLCanvasElement* aParentCanvas);
+    nsHTMLCanvasElement* HTMLCanvasElement() {
+        return static_cast<nsHTMLCanvasElement*>(mCanvasElement.get());
+    }
+
     NS_IMETHOD SetDimensions(PRInt32 width, PRInt32 height);
     NS_IMETHOD InitializeWithSurface(nsIDocShell *docShell, gfxASurface *surface, PRInt32 width, PRInt32 height)
         { return NS_ERROR_NOT_IMPLEMENTED; }
     NS_IMETHOD Reset()
         { /* (InitializeWithSurface) */ return NS_ERROR_NOT_IMPLEMENTED; }
     NS_IMETHOD Render(gfxContext *ctx,
                       gfxPattern::GraphicsFilter f,
                       PRUint32 aFlags = RenderFlagPremultAlpha);
@@ -693,19 +698,16 @@ protected:
     nsresult BufferData_size(WebGLenum target, WebGLsizei size, WebGLenum usage);
     nsresult BufferData_buf(WebGLenum target, JSObject* data, WebGLenum usage);
     nsresult BufferData_array(WebGLenum target, JSObject* data, WebGLenum usage);
 
     nsresult BufferSubData_buf(WebGLenum target, PRInt32 offset, JSObject* data);
     nsresult BufferSubData_array(WebGLenum target, PRInt32 offset, JSObject* data);
 
     nsCOMPtr<nsIDOMHTMLCanvasElement> mCanvasElement;
-    nsHTMLCanvasElement *HTMLCanvasElement() {
-        return static_cast<nsHTMLCanvasElement*>(mCanvasElement.get());
-    }
 
     nsRefPtr<gl::GLContext> gl;
 
     CheckedUint32 mGeneration;
 
     WebGLContextOptions mOptions;
 
     bool mInvalidated;
@@ -758,17 +760,17 @@ protected:
     // extensions
     enum WebGLExtensionID {
         WebGL_OES_texture_float,
         WebGL_OES_standard_derivatives,
         WebGL_EXT_texture_filter_anisotropic,
         WebGL_MOZ_WEBGL_lose_context,
         WebGLExtensionID_Max
     };
-    nsRefPtr<WebGLExtension> mEnabledExtensions[WebGLExtensionID_Max];
+    nsAutoTArray<nsRefPtr<WebGLExtension>, WebGLExtensionID_Max> mEnabledExtensions;
     bool IsExtensionEnabled(WebGLExtensionID ext) const {
         NS_ABORT_IF_FALSE(ext >= 0 && ext < WebGLExtensionID_Max, "bogus index!");
         return mEnabledExtensions[ext] != nsnull;
     }
     bool IsExtensionSupported(WebGLExtensionID ei);
 
     bool InitAndValidateGL();
     bool ValidateBuffers(PRInt32* maxAllowedCount, const char *info);
@@ -992,16 +994,18 @@ public:
         mContextGeneration = context->Generation();
     }
 
     bool IsCompatibleWithContext(WebGLContext *other) {
         return mContext == other &&
             mContextGeneration == other->Generation();
     }
 
+    WebGLContext *Context() const { return mContext; }
+
 protected:
     WebGLContext *mContext;
     PRUint32 mContextGeneration;
 };
 
 struct WebGLVertexAttribData {
     // note that these initial values are what GL initializes vertex attribs to
     WebGLVertexAttribData()
@@ -2536,24 +2540,27 @@ protected:
     WebGLint mRangeMin;
     WebGLint mRangeMax;
     WebGLint mPrecision;
 };
 
 class WebGLExtension
     : public nsIWebGLExtension
     , public WebGLContextBoundObject
+    , public nsWrapperCache
 {
 public:
     WebGLExtension(WebGLContext *baseContext)
         : WebGLContextBoundObject(baseContext)
     {}
 
-    NS_DECL_ISUPPORTS
+    NS_DECL_CYCLE_COLLECTING_ISUPPORTS
+    NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(WebGLExtension)
     NS_DECL_NSIWEBGLEXTENSION
+
     virtual ~WebGLExtension() {}
 };
 
 inline const WebGLRectangleObject *WebGLContext::FramebufferRectangleObject() const {
     return mBoundFramebuffer ? mBoundFramebuffer->RectangleObject()
                              : static_cast<const WebGLRectangleObject*>(this);
 }
 
--- a/content/canvas/src/WebGLExtensionLoseContext.cpp
+++ b/content/canvas/src/WebGLExtensionLoseContext.cpp
@@ -69,8 +69,19 @@ WebGLExtensionLoseContext::LoseContext()
 NS_IMETHODIMP 
 WebGLExtensionLoseContext::RestoreContext()
 {
     if (!mContext->RestoreContext())
         mContext->mWebGLError = LOCAL_GL_INVALID_OPERATION;
 
     return NS_OK;
 }
+
+NS_IMPL_ADDREF_INHERITED(WebGLExtensionLoseContext, WebGLExtension)
+NS_IMPL_RELEASE_INHERITED(WebGLExtensionLoseContext, WebGLExtension)
+
+DOMCI_DATA(WebGLExtensionLoseContext, WebGLExtensionLoseContext)
+
+NS_INTERFACE_MAP_BEGIN(WebGLExtensionLoseContext)
+  NS_INTERFACE_MAP_ENTRY(nsIWebGLExtensionLoseContext)
+  NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, WebGLExtension)
+  NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(WebGLExtensionLoseContext)
+NS_INTERFACE_MAP_END_INHERITING(WebGLExtension)
--- a/content/canvas/src/WebGLExtensionStandardDerivatives.cpp
+++ b/content/canvas/src/WebGLExtensionStandardDerivatives.cpp
@@ -51,8 +51,19 @@ WebGLExtensionStandardDerivatives::WebGL
 {
 
 }
 
 WebGLExtensionStandardDerivatives::~WebGLExtensionStandardDerivatives()
 {
 
 }
+
+NS_IMPL_ADDREF_INHERITED(WebGLExtensionStandardDerivatives, WebGLExtension)
+NS_IMPL_RELEASE_INHERITED(WebGLExtensionStandardDerivatives, WebGLExtension)
+
+DOMCI_DATA(WebGLExtensionStandardDerivatives, WebGLExtensionStandardDerivatives)
+
+NS_INTERFACE_MAP_BEGIN(WebGLExtensionStandardDerivatives)
+  NS_INTERFACE_MAP_ENTRY(nsIWebGLExtensionStandardDerivatives)
+  NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, WebGLExtension)
+  NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(WebGLExtensionStandardDerivatives)
+NS_INTERFACE_MAP_END_INHERITING(WebGLExtension)
--- a/content/canvas/src/WebGLExtensionTextureFilterAnisotropic.cpp
+++ b/content/canvas/src/WebGLExtensionTextureFilterAnisotropic.cpp
@@ -41,24 +41,29 @@
 #include "WebGLContext.h"
 #include "WebGLExtensions.h"
 
 #include "nsContentUtils.h"
 #include "mozilla/Preferences.h"
 
 using namespace mozilla;
 
-NS_INTERFACE_MAP_BEGIN(WebGLExtensionTextureFilterAnisotropic)
-  NS_INTERFACE_MAP_ENTRY(nsIWebGLExtensionTextureFilterAnisotropic)
-  NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, WebGLExtension)
-  NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(WebGLExtensionTextureFilterAnisotropic)
-NS_INTERFACE_MAP_END_INHERITING(WebGLExtension)
-
 WebGLExtensionTextureFilterAnisotropic::WebGLExtensionTextureFilterAnisotropic(WebGLContext* context) :
     WebGLExtension(context)
 {
 
 }
 
 WebGLExtensionTextureFilterAnisotropic::~WebGLExtensionTextureFilterAnisotropic()
 {
 
 }
+
+NS_IMPL_ADDREF_INHERITED(WebGLExtensionTextureFilterAnisotropic, WebGLExtension)
+NS_IMPL_RELEASE_INHERITED(WebGLExtensionTextureFilterAnisotropic, WebGLExtension)
+
+DOMCI_DATA(WebGLExtensionTextureFilterAnisotropic, WebGLExtensionTextureFilterAnisotropic)
+
+NS_INTERFACE_MAP_BEGIN(WebGLExtensionTextureFilterAnisotropic)
+  NS_INTERFACE_MAP_ENTRY(nsIWebGLExtensionTextureFilterAnisotropic)
+  NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, WebGLExtension)
+  NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(WebGLExtensionTextureFilterAnisotropic)
+NS_INTERFACE_MAP_END_INHERITING(WebGLExtension)
--- a/content/canvas/src/WebGLExtensions.h
+++ b/content/canvas/src/WebGLExtensions.h
@@ -44,39 +44,39 @@ namespace mozilla {
 class WebGLExtensionLoseContext :
     public nsIWebGLExtensionLoseContext,
     public WebGLExtension
 {
 public:
     WebGLExtensionLoseContext(WebGLContext*);
     virtual ~WebGLExtensionLoseContext();
 
-    NS_DECL_ISUPPORTS
+    NS_DECL_ISUPPORTS_INHERITED
     NS_DECL_NSIWEBGLEXTENSIONLOSECONTEXT
 };
 
 class WebGLExtensionStandardDerivatives :
     public nsIWebGLExtensionStandardDerivatives,
     public WebGLExtension
 {
 public:
     WebGLExtensionStandardDerivatives(WebGLContext* context);
     virtual ~WebGLExtensionStandardDerivatives();
 
-    NS_DECL_ISUPPORTS
+    NS_DECL_ISUPPORTS_INHERITED
     NS_DECL_NSIWEBGLEXTENSION
 };
 
 class WebGLExtensionTextureFilterAnisotropic :
     public nsIWebGLExtensionTextureFilterAnisotropic,
     public WebGLExtension
 {
 public:
     WebGLExtensionTextureFilterAnisotropic(WebGLContext* context);
     virtual ~WebGLExtensionTextureFilterAnisotropic();
 
-    NS_DECL_ISUPPORTS
+    NS_DECL_ISUPPORTS_INHERITED
     NS_DECL_NSIWEBGLEXTENSION
 };
 
 }
 
 #endif // WEBGLEXTENSIONS_H_
--- a/content/canvas/test/webgl/00_test_list.txt
+++ b/content/canvas/test/webgl/00_test_list.txt
@@ -1,6 +1,6 @@
-// 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
-
+// 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
+
--- a/content/canvas/test/webgl/README.mozilla
+++ b/content/canvas/test/webgl/README.mozilla
@@ -1,14 +1,28 @@
-This is a local copy of the WebGL conformance suite, SVN revision 16776
+This is a local copy of the WebGL conformance suite, version 1.0.1, SVN revision 17159 (on the 1.0.1 branch, not on trunk)
+
+The canonical location for this 1.0.1 test suite is:
 
-The canonical location for this testsuite is:
+  https://cvs.khronos.org/svn/repos/registry/trunk/public/webgl/conformance-suites/1.0.1
+
+The canonical location of the development tree is:
 
   https://cvs.khronos.org/svn/repos/registry/trunk/public/webgl/sdk/tests
 
 All files and directories in this directory, with the exceptions listed below, come from
 upstream and should not be modified without corresponding upstream fixes and/or a
 patch file in this directory. The exceptions (the Mozilla-specific files) are:
  * README.mozilla (this file)
  * failing_tests_*.txt
  * Makefile.in
  * *.patch files, if any
 
+How to do an update:
+ 1. unapply local patches (the .patch files here)
+ 2. perform the update:
+   * method A: apply diff with new version
+   * method B: erase all files here, import copy of new version.
+ 3. edit CONFORMANCE_TEST_VERSION in test_webgl_conformance_test_suite.html. That's what
+    determines with tests to run, as some tests are only enabled in some not-yet-released
+    version.
+ 4. reapply local patches.
+ 5. update this readme and the .patch files
--- a/content/canvas/test/webgl/README.txt
+++ b/content/canvas/test/webgl/README.txt
@@ -1,28 +1,28 @@
-Welcome to the WebGL Conformance Test Suite
-===========================================
-
-This is the initial release of the WebGL conformance test suite.
-
-NOTE TO USERS: Unless you are a WebGL implementor, there is no need to submit
-a conformance result using this process.  Should you discover bugs in your
-browser's WebGL implementation, either via this test suite or otherwise,
-please report them to your browser vendor's bug tracking system.
-
-FOR WEBGL IMPLEMENTORS: Please follow the isntructions below to create
-a formal conformance submission.'
-
-1) Open webgl-conformance-tests.html in your target browser
-
-2) Press the "run tests" button
-
-3) At the end of the run, press "display text summary"
-
-4) Verify that the User Agent and WebGL renderer strings identify your browser and target correctly.
-
-5) Copy the contents of the text summary (starting with "WebGL Conformance Test Results") and send via email to
-   --- NEED ADDRESS HERE --- @khronos.org
-
-
-- Version 1.0.0
-- February 24, 2011
-
+Welcome to the WebGL Conformance Test Suite
+===========================================
+
+This is the initial release of the WebGL conformance test suite.
+
+NOTE TO USERS: Unless you are a WebGL implementor, there is no need to submit
+a conformance result using this process.  Should you discover bugs in your
+browser's WebGL implementation, either via this test suite or otherwise,
+please report them to your browser vendor's bug tracking system.
+
+FOR WEBGL IMPLEMENTORS: Please follow the isntructions below to create
+a formal conformance submission.'
+
+1) Open webgl-conformance-tests.html in your target browser
+
+2) Press the "run tests" button
+
+3) At the end of the run, press "display text summary"
+
+4) Verify that the User Agent and WebGL renderer strings identify your browser and target correctly.
+
+5) Copy the contents of the text summary (starting with "WebGL Conformance Test Results") and send via email to
+   --- NEED ADDRESS HERE --- @khronos.org
+
+
+- Version 1.0.0
+- February 24, 2011
+
--- a/content/canvas/test/webgl/conformance/00_readme.txt
+++ b/content/canvas/test/webgl/conformance/00_readme.txt
@@ -1,13 +1,13 @@
-This file "00_test_list.txt" lists which files the test harness should run.
-
-If you add new tests you can update it with
-
-on windows
-
-   dir /b *.html >00_test_list.txt
-
-on OSX / Linux
-
-   ls -1 *.html >00_test_list.txt
-
-
+This file "00_test_list.txt" lists which files the test harness should run.
+
+If you add new tests you can update it with
+
+on windows
+
+   dir /b *.html >00_test_list.txt
+
+on OSX / Linux
+
+   ls -1 *.html >00_test_list.txt
+
+
new file mode 100644
--- /dev/null
+++ b/content/canvas/test/webgl/conformance/LICENSE_CHROMIUM
@@ -0,0 +1,30 @@
+// For files copyrighted by the Chromium Authors, the following
+// license applies:
+
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+//    * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//    * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+//    * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--- a/content/canvas/test/webgl/conformance/attribs/gl-vertex-attrib-zero-issues.html
+++ b/content/canvas/test/webgl/conformance/attribs/gl-vertex-attrib-zero-issues.html
@@ -32,25 +32,21 @@
         gl_FragColor = vec4(0.0,0.0,0.0,0.0);
     }
 </script>
 
 <script>
 description("Test some of the issues of the difference between attrib 0 on OpenGL vs WebGL");
 debug("");
 var wtu = WebGLTestUtils;
-var canvas = document.getElementById("example");
-var gl = wtu.create3DContext(canvas);
+var gl = wtu.create3DContext("example");
 
 function setup(numVerts, attribIndex) {
   var program = wtu.setupProgram(
-      gl,
-      [wtu.loadShaderFromScript(gl, 'vshader', gl.VERTEX_SHADER),
-       wtu.loadShaderFromScript(gl, 'fshader', gl.FRAGMENT_SHADER)],
-      ['vPosition'], [attribIndex]);
+      gl, ['vshader', 'fshader'], ['vPosition'], [attribIndex]);
   // draw with something on attrib zero with a small number of vertices
   var vertexObject = gl.createBuffer();
   g_program = program;
   g_attribLocation = attribIndex;
   shouldBe("g_attribLocation", "gl.getAttribLocation(g_program, 'vPosition')");
   gl.bindBuffer(gl.ARRAY_BUFFER, vertexObject);
   gl.bufferData(
       gl.ARRAY_BUFFER, new Float32Array(numVerts * 3), gl.STATIC_DRAW);
--- a/content/canvas/test/webgl/conformance/canvas/buffer-offscreen-test.html
+++ b/content/canvas/test/webgl/conformance/canvas/buffer-offscreen-test.html
@@ -48,19 +48,18 @@ function timer() {
     }
 }
 
 function go() {
     description("This test ensures WebGL implementations correctly clear the drawing buffer on composite if preserveDrawingBuffer is false.");
 
     debug("");
 
-    gl1 = create3DContext(document.getElementById("c"));
-    c2 = document.createElement('canvas');
-    gl2 = create3DContext(c2);
+    gl1 = wtu.create3DContext("c");
+    gl2 = create3DContext();
     shouldBeTrue("gl1 != null");
     shouldBeTrue("gl2 != null");
 
     shouldBeTrue('gl1.getContextAttributes().preserveDrawingBuffer == false');
     shouldBeTrue('gl2.getContextAttributes().preserveDrawingBuffer == false');
 
     function init(gl) {
         gl.clearColor(1, 0, 0, 1);
--- a/content/canvas/test/webgl/conformance/canvas/buffer-preserve-test.html
+++ b/content/canvas/test/webgl/conformance/canvas/buffer-preserve-test.html
@@ -54,17 +54,17 @@ function timer() {
     setTimeout(timer, 500);
 }
 
 function go() {
     description("This test ensures WebGL implementations correctly clear the drawing buffer on composite if preserveDrawingBuffer is false.");
 
     debug("");
 
-    gl1 = create3DContext(document.getElementById("c"));
+    gl1 = wtu.create3DContext("c");
     if (!gl1) {
         finishTest();
         return;
     }
 
     shouldBeTrue("gl1 != null");
     shouldBeTrue('gl1.getContextAttributes().preserveDrawingBuffer == false');
 
--- a/content/canvas/test/webgl/conformance/canvas/drawingbuffer-static-canvas-test.html
+++ b/content/canvas/test/webgl/conformance/canvas/drawingbuffer-static-canvas-test.html
@@ -89,18 +89,17 @@ function drawTriangleTest(gl)
 
 description("This test ensures WebGL implementations correctly implement drawingbufferWidth/Height with compositing.");
 
 debug("");
 
 var wtu = WebGLTestUtils;
 var err;
 var maxSize;
-var canvas = document.getElementById("canvas");
-var gl =  wtu.create3DContext(canvas);
+var gl =  wtu.create3DContext("canvas");
 if (!gl) {
   testFailed("context does not exist");
 } else {
   testPassed("context exists");
 
   gl.program = createProgram(gl, "vshader", "fshader", ["vPosition"]);
   shouldBeNonNull("gl.program");
   gl.useProgram(gl.program);
@@ -109,37 +108,37 @@ if (!gl) {
   gl.clearColor(0, 0, 0, 1);
   gl.clearDepth(1);
   shouldBe('gl.getError()', 'gl.NO_ERROR');
 
   debug("");
   debug("Checking drawingBufferWidth/drawingBufferHeight");
 
   // Check that a canvas with no width or height is 300x150 pixels
-  shouldBe('gl.drawingBufferWidth', 'canvas.width');
-  shouldBe('gl.drawingBufferHeight', 'canvas.height');
+  shouldBe('gl.drawingBufferWidth', 'gl.canvas.width');
+  shouldBe('gl.drawingBufferHeight', 'gl.canvas.height');
 
   // Check that changing the canvas size to something too large falls back to reasonable values.
   maxSize = gl.getParameter(gl.MAX_VIEWPORT_DIMS);
   shouldBeTrue('maxSize[0] > 0');
   shouldBeTrue('maxSize[1] > 0');
 
   // debug("MAX_VIEWPORT_DIMS = " + maxSize[0] + "x" + maxSize[1]);
-  canvas.width = maxSize[0] * 4;
-  canvas.height = maxSize[1] * 4;
+  gl.canvas.width = maxSize[0] * 4;
+  gl.canvas.height = maxSize[1] * 4;
   shouldBeTrue('gl.drawingBufferWidth > 0');
   shouldBeTrue('gl.drawingBufferHeight > 0');
   shouldBeTrue('gl.drawingBufferWidth <= maxSize[0]');
   shouldBeTrue('gl.drawingBufferHeight <= maxSize[1]');
   shouldBe('gl.getError()', 'gl.NO_ERROR');
 
   debug("");
   debug("Checking scaling up then back down to 50/50, drawing still works.");
-  canvas.width = 50;
-  canvas.height = 50;
+  gl.canvas.width = 50;
+  gl.canvas.height = 50;
   shouldBeTrue('gl.drawingBufferWidth == 50');
   shouldBeTrue('gl.drawingBufferHeight == 50');
   shouldBe('gl.getError()', 'gl.NO_ERROR');
   drawTriangleTest(gl);
   shouldBe('gl.getError()', 'gl.NO_ERROR');
 }
 debug("")
 successfullyParsed = true;
--- a/content/canvas/test/webgl/conformance/canvas/drawingbuffer-test.html
+++ b/content/canvas/test/webgl/conformance/canvas/drawingbuffer-test.html
@@ -88,18 +88,17 @@ function drawTriangleTest(gl)
 
 description("This test ensures WebGL implementations correctly implement drawingbufferWidth/Height.");
 
 debug("");
 
 var wtu = WebGLTestUtils;
 var err;
 var maxSize;
-var canvas = document.createElement("canvas");
-var gl = create3DContext(canvas);
+var gl = wtu.create3DContext();
 if (!gl) {
   testFailed("context does not exist");
 } else {
   testPassed("context exists");
 
   gl.program = createProgram(gl, "vshader", "fshader", ["vPosition"]);
   shouldBeNonNull("gl.program");
   gl.useProgram(gl.program);
@@ -108,37 +107,37 @@ if (!gl) {
   gl.clearColor(0, 0, 0, 1);
   gl.clearDepth(1);
   shouldBe('gl.getError()', 'gl.NO_ERROR');
 
   debug("");
   debug("Checking drawingBufferWidth/drawingBufferHeight");
 
   // Check that a canvas with no width or height is 300x150 pixels
-  shouldBe('gl.drawingBufferWidth', 'canvas.width');
-  shouldBe('gl.drawingBufferHeight', 'canvas.height');
+  shouldBe('gl.drawingBufferWidth', 'gl.canvas.width');
+  shouldBe('gl.drawingBufferHeight', 'gl.canvas.height');
 
   // Check that changing the canvas size to something too large falls back to reasonable values.
   maxSize = gl.getParameter(gl.MAX_VIEWPORT_DIMS);
   shouldBeTrue('maxSize[0] > 0');
   shouldBeTrue('maxSize[1] > 0');
 
   // debug("MAX_VIEWPORT_DIMS = " + maxSize[0] + "x" + maxSize[1]);
-  canvas.width = maxSize[0] * 4;
-  canvas.height = maxSize[1] * 4;
+  gl.canvas.width = maxSize[0] * 4;
+  gl.canvas.height = maxSize[1] * 4;
   shouldBeTrue('gl.drawingBufferWidth > 0');
   shouldBeTrue('gl.drawingBufferHeight > 0');
   shouldBeTrue('gl.drawingBufferWidth <= maxSize[0]');
   shouldBeTrue('gl.drawingBufferHeight <= maxSize[1]');
   shouldBe('gl.getError()', 'gl.NO_ERROR');
 
   debug("");
   debug("Checking scaling up then back down to 50/50, drawing still works.");
-  canvas.width = 50;
-  canvas.height = 50;
+  gl.canvas.width = 50;
+  gl.canvas.height = 50;
   shouldBeTrue('gl.drawingBufferWidth == 50');
   shouldBeTrue('gl.drawingBufferHeight == 50');
   shouldBe('gl.getError()', 'gl.NO_ERROR');
   drawTriangleTest(gl);
   shouldBe('gl.getError()', 'gl.NO_ERROR');
 }
 debug("")
 successfullyParsed = true;
--- a/content/canvas/test/webgl/conformance/context/constants.html
+++ b/content/canvas/test/webgl/conformance/context/constants.html
@@ -191,17 +191,16 @@ SAMPLE_COVERAGE_VALUE          : 0x80AA,
 SAMPLE_COVERAGE_INVERT         : 0x80AB,
     
     /* GetTextureParameter */
     /*      TEXTURE_MAG_FILTER */
     /*      TEXTURE_MIN_FILTER */
     /*      TEXTURE_WRAP_S */
     /*      TEXTURE_WRAP_T */
     
-NUM_COMPRESSED_TEXTURE_FORMATS : 0x86A2,
 COMPRESSED_TEXTURE_FORMATS     : 0x86A3,
     
     /* HintMode */
 DONT_CARE                      : 0x1100,
 FASTEST                        : 0x1101,
 NICEST                         : 0x1102,
     
     /* HintTarget */
new file mode 100644
--- /dev/null
+++ b/content/canvas/test/webgl/conformance/context/context-attribute-preserve-drawing-buffer.html
@@ -0,0 +1,113 @@
+<!--
+Copyright (C) 2012 Opera Software ASA.  All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY OPERA SOFTWARE ASA. ''AS IS'' AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ -->
+<!DOCTYPE html>
+<html>
+    <head>
+        <meta charset="utf-8">
+        <link rel="stylesheet" href="../../resources/js-test-style.css"/>
+        <script src="../../resources/js-test-pre.js"></script>
+        <script src="../resources/webgl-test.js"></script>
+        <style>
+            canvas {
+                width:50px;
+                height:50px;
+            }
+            .square {
+                display:inline-block;
+                width:50px;
+                height:50px;
+                background-color:red;
+            }
+        </style>
+        <script>
+            function checkResult(ctx1, ctx2, preserve) {
+                var imgData1 = ctx1.getImageData(0,0,1,1);
+                var imgData2 = ctx2.getImageData(0,0,1,1);
+                var correct1 = [255,0,0,255];
+                var correct2 = preserve ? [255,0,0,255] : [0,0,0,255];
+                var ok1 = true;
+                var ok2 = true;
+                for (var p = 0; p < 4; ++p) {
+                    if (imgData1.data[p] != correct1[p])
+                        ok1 = false;
+                    if (imgData2.data[p] != correct2[p])
+                        ok2 = false;
+                }
+                if (ok1 && ok2)
+                    testPassed('Rendered ok with preserveDrawingBuffer ' + preserve +'.');
+                else
+                    testFailed('Did not render ok with preserveDrawingBuffer ' + preserve + '.');
+                if (preserve) {
+                    debug('<br /><span class="pass">TEST COMPLETE</span>');
+                    notifyFinishedToHarness()
+                } else {
+                    runTest(true);
+                }
+            }
+
+            function runTest(preserve) {
+                var c1 = document.getElementById('c' + (preserve * 3 + 1));
+                var c2 = document.getElementById('c' + (preserve * 3 + 2));
+                var c3 = document.getElementById('c' + (preserve * 3 + 3));
+                var ctx1 = c1.getContext('2d');
+                var ctx2 = c2.getContext('2d');
+                var gl = c3.getContext('experimental-webgl', { alpha:false, preserveDrawingBuffer:preserve });
+                gl.clearColor(1, 0, 0, 1);
+                gl.clear(gl.COLOR_BUFFER_BIT);
+                ctx1.drawImage(c3, 0, 0);
+                setTimeout(function() { ctx2.drawImage(c3, 0, 0); checkResult(ctx1, ctx2, preserve); }, 100);
+
+            }
+        </script>
+    </head>
+    <body>
+        <div>
+            <canvas id='c1'></canvas>
+            <canvas id='c2'></canvas>
+            <canvas id='c3'></canvas>
+            <span>should look as right pattern</span>
+            <div class='square'></div>
+            <div class='square' style='background-color:black'></div>
+            <div class='square'></div>
+        </div>
+        <div>
+            <canvas id='c4'></canvas>
+            <canvas id='c5'></canvas>
+            <canvas id='c6'></canvas>
+            <span>should look as right pattern</span>
+            <div class='square'></div>
+            <div class='square'></div>
+            <div class='square'></div>
+        </div>
+        <div id="description"></div>
+        <div id="console"></div>
+        <script>
+            description('Verify that preserveDrawingBuffer attribute is honored.');
+            runTest(false);
+            successfullyParsed = true;
+            shouldBeTrue("successfullyParsed");
+        </script>
+    </body>
+</html>
--- a/content/canvas/test/webgl/conformance/extensions/00_test_list.txt
+++ b/content/canvas/test/webgl/conformance/extensions/00_test_list.txt
@@ -1,8 +1,8 @@
 oes-standard-derivatives.html
 ext-texture-filter-anisotropic.html
 oes-texture-float.html
 oes-vertex-array-object.html
 webgl-debug-renderer-info.html
 webgl-debug-shaders.html
---min-version 1.0.2 webgl-experimental-compressed-textures.html
+--min-version 1.0.2 webgl-compressed-texture-s3tc.html
 
deleted file mode 100644
--- a/content/canvas/test/webgl/conformance/extensions/compressed-textures/4x4.rgb.dxt1.js
+++ /dev/null
@@ -1,3 +0,0 @@
-var img_4x4_rgb_dxt1 = [
-0xe0,0x07,0x00,0xf8,0x11,0x10,0x15,0x00,
-];
deleted file mode 100644
--- a/content/canvas/test/webgl/conformance/extensions/compressed-textures/4x4.rgba.dxt1.js
+++ /dev/null
@@ -1,3 +0,0 @@
-var img_4x4_rgba_dxt1 = [
-0xe0,0x07,0x00,0xf8,0x13,0x10,0x15,0x00,
-];
deleted file mode 100644
--- a/content/canvas/test/webgl/conformance/extensions/compressed-textures/4x4.rgba.dxt3.js
+++ /dev/null
@@ -1,3 +0,0 @@
-var img_4x4_rgba_dxt3 = [
-0xf6,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0xf8,0xe0,0x07,0x44,0x45,0x40,0x55,
-];
deleted file mode 100644
--- a/content/canvas/test/webgl/conformance/extensions/compressed-textures/4x4.rgba.dxt5.js
+++ /dev/null
@@ -1,3 +0,0 @@
-var img_4x4_rgba_dxt5 = [
-0xf6,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0xf8,0xe0,0x07,0x44,0x45,0x40,0x55,
-];
deleted file mode 100644
--- a/content/canvas/test/webgl/conformance/extensions/compressed-textures/4x4.rgba.raw.js
+++ /dev/null
@@ -1,3 +0,0 @@
-var img_4x4_rgba_raw = [
-0xff,0x00,0x00,0x69,0x00,0xff,0x00,0xff,0xff,0x00,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0xff,0x00,0x00,0xff,0x00,0xff,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,
-];
deleted file mode 100644
--- a/content/canvas/test/webgl/conformance/extensions/compressed-textures/8x8.rgb.dxt1.js
+++ /dev/null
@@ -1,3 +0,0 @@
-var img_8x8_rgb_dxt1 = [
-0xe0,0x07,0x00,0xf8,0x11,0x10,0x15,0x00,0x1f,0x00,0xe0,0xff,0x11,0x10,0x15,0x00,0xe0,0x07,0x1f,0xf8,0x44,0x45,0x40,0x55,0x1f,0x00,0xff,0x07,0x44,0x45,0x40,0x55,
-];
deleted file mode 100644
--- a/content/canvas/test/webgl/conformance/extensions/compressed-textures/8x8.rgba.dxt1.js
+++ /dev/null
@@ -1,3 +0,0 @@
-var img_8x8_rgba_dxt1 = [
-0xe0,0x07,0x00,0xf8,0x13,0x13,0x15,0x00,0x1f,0x00,0xe0,0xff,0x11,0x10,0x15,0x00,0xe0,0x07,0x1f,0xf8,0x44,0x45,0x43,0x57,0x1f,0x00,0xff,0x07,0x44,0x45,0x40,0x55,
-];
deleted file mode 100644
--- a/content/canvas/test/webgl/conformance/extensions/compressed-textures/8x8.rgba.dxt3.js
+++ /dev/null
@@ -1,3 +0,0 @@
-var img_8x8_rgba_dxt3 = [
-0xf6,0xff,0xf6,0xff,0xff,0xff,0xff,0xff,0x00,0xf8,0xe0,0x07,0x44,0x45,0x40,0x55,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xe0,0xff,0x1f,0x00,0x44,0x45,0x40,0x55,0xff,0xff,0xff,0xff,0xf6,0xff,0xf6,0xff,0x1f,0xf8,0xe0,0x07,0x11,0x10,0x15,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x1f,0x00,0x11,0x10,0x15,0x00,
-];
deleted file mode 100644
--- a/content/canvas/test/webgl/conformance/extensions/compressed-textures/8x8.rgba.dxt5.js
+++ /dev/null
@@ -1,3 +0,0 @@
-var img_8x8_rgba_dxt5 = [
-0xff,0x69,0x01,0x10,0x00,0x00,0x00,0x00,0x00,0xf8,0xe0,0x07,0x44,0x45,0x40,0x55,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0x1f,0x00,0x44,0x45,0x40,0x55,0xff,0x69,0x00,0x00,0x00,0x01,0x10,0x00,0x1f,0xf8,0xe0,0x07,0x11,0x10,0x15,0x00,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x07,0x1f,0x00,0x11,0x10,0x15,0x00,
-];
deleted file mode 100644
--- a/content/canvas/test/webgl/conformance/extensions/compressed-textures/8x8.rgba.pvrtc4bpp.js
+++ /dev/null
@@ -1,3 +0,0 @@
-var img_8x8_rgba_pvrtc4bpp = [
-0x33,0x30,0x3f,0x00,0xe0,0x83,0x00,0xfc,0xcc,0xcf,0xc0,0xff,0xe0,0x83,0x1f,0xfc,0xcc,0xcf,0xc0,0xff,0xe0,0xff,0x1f,0x80,0x33,0x30,0x3f,0x00,0xfe,0x83,0x1f,0x80,
-];
deleted file mode 100644
--- a/content/canvas/test/webgl/conformance/extensions/compressed-textures/8x8.rgba.raw.js
+++ /dev/null
@@ -1,3 +0,0 @@
-var img_8x8_rgba_raw = [
-0xff,0x00,0x00,0x69,0x00,0xff,0x00,0xff,0xff,0x00,0x00,0xff,0x00,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0x00,0x00,0xff,0xff,0xff,0xff,0x00,0xff,0x00,0x00,0xff,0xff,0x00,0xff,0x00,0x69,0x00,0xff,0x00,0xff,0xff,0x00,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0xff,0xff,0x00,0xff,0x00,0x00,0xff,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0x00,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0x00,0x00,0xff,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0xff,0x00,0xff,0xff,0x00,0xff,0xff,0x00,0xff,0x00,0xff,0xff,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0xff,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0x00,0xff,0x00,0xff,0xff,0x00,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0x00,0x69,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0xff,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0xff,0xff,0xff,0xff,0x00,0xff,0x69,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,
-];
--- a/content/canvas/test/webgl/conformance/extensions/oes-standard-derivatives.html
+++ b/content/canvas/test/webgl/conformance/extensions/oes-standard-derivatives.html
@@ -115,18 +115,18 @@ if (!gl) {
     } else {
         testPassed("Successfully enabled OES_standard_derivatives extension");
 
         runSupportedTest(true);
 
         runHintTestEnabled();
         runShaderTests(true);
         runOutputTests();
-      // similar to bug 683216, see the discussion in bug 630672
-      // runUniqueObjectTest();
+        runUniqueObjectTest();
+        runReferenceCycleTest();
     }
 }
 
 function runSupportedTest(extensionEnabled) {
     var supported = gl.getSupportedExtensions();
     if (supported.indexOf("OES_standard_derivatives") >= 0) {
         if (extensionEnabled) {
             testPassed("OES_standard_derivatives listed as supported and getExtension succeeded");
@@ -252,21 +252,17 @@ 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);
     gl.hint(ext.FRAGMENT_SHADER_DERIVATIVE_HINT_OES, gl.NICEST);
 
-    var shaders = [
-        wtu.loadShaderFromScript(gl, "outputVertexShader"),
-        wtu.loadShaderFromScript(gl, "outputFragmentShader")
-    ];
-    var program = wtu.setupProgram(gl, shaders, ['vPosition', 'texCoord0'], [0, 1]);
+    var program = wtu.setupProgram(gl, ["outputVertexShader", "outputFragmentShader"], ['vPosition', 'texCoord0'], [0, 1]);
     var quadParameters = wtu.setupUnitQuad(gl, 0, 1);
 
     function readLocation(x, y) {
         var pixels = new Uint8Array(1 * 1 * 4);
         var px = Math.floor(x * canvas.width);
         var py = Math.floor(y * canvas.height);
         gl.readPixels(px, py, 1, 1, gl.RGBA, gl.UNSIGNED_BYTE, pixels);
         return pixels;
@@ -341,45 +337,38 @@ function runOutputTests() {
     setupBuffers(1.0, 0.5, 0.5, 0.0);
     wtu.drawQuad(gl);
     expectResult([3, 3, 5, 255],
                  "Draw 4 (variation in x & y) returned the correct data",
                  "Draw 4 (variation in x & y) returned incorrect data");
 
 }
 
-function attemptToForceGC()
-{
-    var holderArray = [];
-    var tempArray;
-    window.tempArray = holderArray;
-    for (var i = 0; i < 12; ++i) {
-        tempArray = [];
-        for (var j = 0; j < 1024 * 1024; ++j) {
-            tempArray.push(0);
-        }
-        holderArray.push(tempArray);
-    }
-    window.tempArray = null;
-}
-
 function runUniqueObjectTest()
 {
     debug("Testing that getExtension() returns the same object each time");
     gl.getExtension("OES_standard_derivatives").myProperty = 2;
-    if (window.GCController) {
-        window.GCController.collect();
-    } else if (window.opera && window.opera.collect) {
-        window.opera.collect();
-    } else {
-        attemptToForceGC();
-    }
+    gc();
     shouldBe('gl.getExtension("OES_standard_derivatives").myProperty', '2');
 }
 
+function runReferenceCycleTest()
+{
+    // create some reference cycles. The goal is to see if they cause leaks. The point is that
+    // some browser test runners have instrumentation to detect leaked refcounted objects.
+
+    debug("Testing reference cycles between context and extension objects");
+    var ext = gl.getExtension("OES_standard_derivatives");
+
+    // create cycle between extension and context, since the context has to hold a reference to the extension
+    ext.context = gl;
+
+    // create a self-cycle on the extension object
+    ext.ext = ext;
+}
 
 debug("");
 successfullyParsed = true;
 </script>
 <script src="../../resources/js-test-post.js"></script>
 
 </body>
 </html>
--- a/content/canvas/test/webgl/conformance/extensions/oes-texture-float.html
+++ b/content/canvas/test/webgl/conformance/extensions/oes-texture-float.html
@@ -61,17 +61,17 @@ var gl = create3DContext(canvas);
 
 if (!gl) {
   testFailed("WebGL context does not exist");
 } else {
   testPassed("WebGL context exists");
 
   var texturedShaders = [
       wtu.setupSimpleTextureVertexShader(gl),
-      wtu.loadShaderFromScript(gl, "testFragmentShader")
+      "testFragmentShader"
   ];
   var testProgram =
       wtu.setupProgram(gl,
                        texturedShaders,
                        ['vPosition', 'texCoord0'],
                        [0, 1]);
   var quadParameters = wtu.setupUnitQuad(gl, 0, 1);
 
@@ -80,18 +80,18 @@ if (!gl) {
   runTextureCreationTest(testProgram, false);
 
   if (!gl.getExtension("OES_texture_float")) {
       testPassed("No OES_texture_float support -- this is legal");
   } else {
       testPassed("Successfully enabled OES_texture_float extension");
       runTextureCreationTest(testProgram, true);
       runRenderTargetTest(testProgram);
-      // bug 683216, see the discussion in bug 630672
-      // runUniqueObjectTest();
+      runUniqueObjectTest();
+      runReferenceCycleTest();
   }
 }
 
 // Needs to be global for shouldBe to see it.
 var pixels;
 
 function allocateTexture()
 {
@@ -160,67 +160,56 @@ function runRenderTargetTest(testProgram
     // While strictly speaking it is probably legal for a WebGL implementation to support
     // floating-point textures but not as attachments to framebuffer objects, any such
     // implementation is so poor that it arguably should not advertise support for the
     // OES_texture_float extension. For this reason the conformance test requires that the
     // framebuffer is complete here.
     if (gl.checkFramebufferStatus(gl.FRAMEBUFFER) != gl.FRAMEBUFFER_COMPLETE)
         return;
 
-    var shaders = [
-        wtu.loadShaderFromScript(gl, "positionVertexShader"),
-        wtu.loadShaderFromScript(gl, "floatingPointFragmentShader")
-    ];
     var renderProgram =
         wtu.setupProgram(gl,
-                         shaders,
+                         ["positionVertexShader", "floatingPointFragmentShader"],
                          ['vPosition'],
                          [0]);
     wtu.drawQuad(gl);
     glErrorShouldBe(gl, gl.NO_ERROR, "rendering to floating-point texture should succeed");
 
     // Now sample from the floating-point texture and verify we got the correct values.
     gl.bindFramebuffer(gl.FRAMEBUFFER, null);
     gl.bindTexture(gl.TEXTURE_2D, texture);
     gl.useProgram(testProgram);
     gl.uniform1i(gl.getUniformLocation(testProgram, "tex"), 0);
     wtu.drawQuad(gl);
     glErrorShouldBe(gl, gl.NO_ERROR, "rendering from floating-point texture should succeed");
     checkRenderingResults();
 }
 
-function attemptToForceGC()
-{
-    var holderArray = [];
-    var tempArray;
-    window.tempArray = holderArray;
-    for (var i = 0; i < 12; ++i) {
-        tempArray = [];
-        for (var j = 0; j < 1024 * 1024; ++j) {
-            tempArray.push(0);
-        }
-        holderArray.push(tempArray);
-    }
-    window.tempArray = null;
-}
-
 function runUniqueObjectTest()
 {
     debug("Testing that getExtension() returns the same object each time");
     gl.getExtension("OES_texture_float").myProperty = 2;
-    if (window.GCController) {
-        window.GCController.collect();
-    } else if (window.opera && window.opera.collect) {
-        window.opera.collect();
-    } else {
-        attemptToForceGC();
-    }
+    gc();
     shouldBe('gl.getExtension("OES_texture_float").myProperty', '2');
 }
 
+function runReferenceCycleTest()
+{
+    // create some reference cycles. The goal is to see if they cause leaks. The point is that
+    // some browser test runners have instrumentation to detect leaked refcounted objects.
+
+    debug("Testing reference cycles between context and extension objects");
+    var ext = gl.getExtension("OES_texture_float");
+
+    // create cycle between extension and context, since the context has to hold a reference to the extension
+    ext.context = gl;
+
+    // create a self-cycle on the extension object
+    ext.ext = ext;
+}
 
 debug("");
 successfullyParsed = true;
 </script>
 <script src="../../resources/js-test-post.js"></script>
 
 </body>
 </html>
new file mode 100644
--- /dev/null
+++ b/content/canvas/test/webgl/conformance/extensions/webgl-compressed-texture-s3tc.html
@@ -0,0 +1,614 @@
+<!--
+Copyright (c) 2012 The Chromium Authors. All rights reserved.
+Use of this source code is governed by a BSD-style license that can be
+found in the LICENSE file.
+ -->
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+<title>WebGL WEBGL_compressed_texture_s3tc 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>
+description("This test verifies the functionality of the WEBGL_compressed_texture_s3tc extension, if it is available.");
+
+debug("");
+
+var img_4x4_rgba_raw = new Uint8Array([
+    0xff,0x00,0x00,0x69,0x00,0xff,0x00,0xff,0xff,0x00,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0xff,0x00,0x00,0xff,0x00,0xff,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,
+]);
+var img_4x4_rgb_dxt1 = new Uint8Array([
+    0xe0,0x07,0x00,0xf8,0x11,0x10,0x15,0x00,
+]);
+var img_4x4_rgba_dxt1 = new Uint8Array([
+    0xe0,0x07,0x00,0xf8,0x13,0x10,0x15,0x00,
+]);
+var img_4x4_rgba_dxt3 = new Uint8Array([
+    0xf6,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0xf8,0xe0,0x07,0x44,0x45,0x40,0x55,
+]);
+var img_4x4_rgba_dxt5 = new Uint8Array([
+    0xf6,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0xf8,0xe0,0x07,0x44,0x45,0x40,0x55,
+]);
+var img_8x8_rgba_raw = new Uint8Array([
+    0xff,0x00,0x00,0x69,0x00,0xff,0x00,0xff,0xff,0x00,0x00,0xff,0x00,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0x00,0x00,0xff,0xff,0xff,0xff,0x00,0xff,0x00,0x00,0xff,0xff,0x00,0xff,0x00,0x69,0x00,0xff,0x00,0xff,0xff,0x00,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0xff,0xff,0x00,0xff,0x00,0x00,0xff,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0x00,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0x00,0x00,0xff,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0xff,0x00,0xff,0xff,0x00,0xff,0xff,0x00,0xff,0x00,0xff,0xff,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0xff,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0x00,0xff,0x00,0xff,0xff,0x00,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0x00,0x69,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0xff,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0xff,0xff,0xff,0xff,0x00,0xff,0x69,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,
+]);
+var img_8x8_rgb_dxt1 = new Uint8Array([
+    0xe0,0x07,0x00,0xf8,0x11,0x10,0x15,0x00,0x1f,0x00,0xe0,0xff,0x11,0x10,0x15,0x00,0xe0,0x07,0x1f,0xf8,0x44,0x45,0x40,0x55,0x1f,0x00,0xff,0x07,0x44,0x45,0x40,0x55,
+]);
+var img_8x8_rgba_dxt1 = new Uint8Array([
+    0xe0,0x07,0x00,0xf8,0x13,0x13,0x15,0x00,0x1f,0x00,0xe0,0xff,0x11,0x10,0x15,0x00,0xe0,0x07,0x1f,0xf8,0x44,0x45,0x43,0x57,0x1f,0x00,0xff,0x07,0x44,0x45,0x40,0x55,
+]);
+var img_8x8_rgba_dxt3 = new Uint8Array([
+    0xf6,0xff,0xf6,0xff,0xff,0xff,0xff,0xff,0x00,0xf8,0xe0,0x07,0x44,0x45,0x40,0x55,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xe0,0xff,0x1f,0x00,0x44,0x45,0x40,0x55,0xff,0xff,0xff,0xff,0xf6,0xff,0xf6,0xff,0x1f,0xf8,0xe0,0x07,0x11,0x10,0x15,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x1f,0x00,0x11,0x10,0x15,0x00,
+]);
+var img_8x8_rgba_dxt5 = new Uint8Array([
+    0xff,0x69,0x01,0x10,0x00,0x00,0x00,0x00,0x00,0xf8,0xe0,0x07,0x44,0x45,0x40,0x55,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0x1f,0x00,0x44,0x45,0x40,0x55,0xff,0x69,0x00,0x00,0x00,0x01,0x10,0x00,0x1f,0xf8,0xe0,0x07,0x11,0x10,0x15,0x00,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x07,0x1f,0x00,0x11,0x10,0x15,0x00,
+]);
+
+var wtu = WebGLTestUtils;
+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_RGB_S3TC_DXT1_EXT        : 0x83F0,
+    COMPRESSED_RGBA_S3TC_DXT1_EXT       : 0x83F1,
+    COMPRESSED_RGBA_S3TC_DXT3_EXT       : 0x83F2,
+    COMPRESSED_RGBA_S3TC_DXT5_EXT       : 0x83F3,
+};
+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 = gl.getExtension("WEBGL_compressed_texture_s3tc");
+    if (!ext) {
+        ext = gl.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");
+    }
+    if (!ext) {
+        testPassed("No WEBGL_compressed_texture_s3tc support -- this is legal");
+        runSupportedTest(false);
+    } else {
+        testPassed("Successfully enabled WEBGL_compressed_texture_s3tc extension");
+
+        runSupportedTest(true);
+        runTestExtension();
+    }
+}
+
+function runSupportedTest(extensionEnabled) {
+    var supported = gl.getSupportedExtensions();
+    if (supported.indexOf("WEBGL_compressed_texture_s3tc") >= 0 ||
+        supported.indexOf("WEBKIT_WEBGL_compressed_texture_s3tc") >= 0) {
+        if (extensionEnabled) {
+            testPassed("WEBGL_compressed_texture_s3tc listed as supported and getExtension succeeded");
+        } else {
+            testFailed("WEBGL_compressed_texture_s3tc listed as supported but getExtension failed");
+        }
+    } else {
+        if (extensionEnabled) {
+            testFailed("WEBGL_compressed_texture_s3tc not listed as supported but getExtension succeeded");
+        } else {
+            testPassed("WEBGL_compressed_texture_s3tc not listed as supported and getExtension failed -- this is legal");
+        }
+    }
+}
+
+
+function runTestDisabled() {
+    debug("Testing binding enum with extension disabled");
+
+    shouldBe('gl.getParameter(gl.COMPRESSED_TEXTURE_FORMATS)', '[]');
+}
+
+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");
+
+    // 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
+    shouldBe("supportedFormats.length", "4");
+
+    // check that all 4 formats exist
+    for (var name in validFormats.length) {
+        formatExists(validFormats[name], supportedFormats);
+    }
+
+    // Test each format
+    testDXT1_RGB();
+    testDXT1_RGBA();
+    testDXT3_RGBA();
+    testDXT5_RGBA();
+}
+
+function testDXT1_RGB() {
+    var tests = [
+        {   width: 4,
+            height: 4,
+            channels: 3,
+            data: img_4x4_rgb_dxt1,
+            format: ext.COMPRESSED_RGB_S3TC_DXT1_EXT
+        },
+        {   width: 8,
+            height: 8,
+            channels: 3,
+            data: img_8x8_rgb_dxt1,
+            format: ext.COMPRESSED_RGB_S3TC_DXT1_EXT
+        }
+    ];
+    testDXTTextures(tests);
+}
+
+function testDXT1_RGBA() {
+    var tests = [
+        {   width: 4,
+            height: 4,
+            channels: 4,
+            data: img_4x4_rgba_dxt1,
+            format: ext.COMPRESSED_RGBA_S3TC_DXT1_EXT
+        },
+        {   width: 8,
+            height: 8,
+            channels: 4,
+            data: img_8x8_rgba_dxt1,
+            format: ext.COMPRESSED_RGBA_S3TC_DXT1_EXT
+        }
+    ];
+    testDXTTextures(tests);
+}
+
+function testDXT3_RGBA() {
+    var tests = [
+        {   width: 4,
+            height: 4,
+            channels: 4,
+            data: img_4x4_rgba_dxt3,
+            format: ext.COMPRESSED_RGBA_S3TC_DXT3_EXT
+        },
+        {   width: 8,
+            height: 8,
+            channels: 4,
+            data: img_8x8_rgba_dxt3,
+            format: ext.COMPRESSED_RGBA_S3TC_DXT3_EXT
+        }
+    ];
+    testDXTTextures(tests);
+}
+
+function testDXT5_RGBA() {
+    var tests = [
+        {   width: 4,
+            height: 4,
+            channels: 4,
+            data: img_4x4_rgba_dxt5,
+            format: ext.COMPRESSED_RGBA_S3TC_DXT5_EXT
+        },
+        {   width: 8,
+            height: 8,
+            channels: 4,
+            data: img_8x8_rgba_dxt5,
+            format: ext.COMPRESSED_RGBA_S3TC_DXT5_EXT
+        }
+    ];
+    testDXTTextures(tests);
+}
+
+function testDXTTextures(tests) {
+    debug("<hr/>");
+    for (var ii = 0; ii < tests.length; ++ii) {
+        testDXTTexture(tests[ii]);
+    }
+}
+
+function uncompressDXTBlock(
+    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_RGB_S3TC_DXT1_EXT ||
+                 format == ext.COMPRESSED_RGBA_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_RGB_S3TC_DXT1_EXT:
+                alpha = 255;
+                break;
+            case ext.COMPRESSED_RGBA_S3TC_DXT1_EXT:
+                alpha = (code == 3 && !c0gtc1) ? 0 : 255;
+                break;
+            case ext.COMPRESSED_RGBA_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_RGBA_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] = srcColor[0];
+            destBuffer[dstOff + 1] = srcColor[1];
+            destBuffer[dstOff + 2] = srcColor[2];
+            destBuffer[dstOff + 3] = alpha;
+        }
+    }
+}
+
+function getBlockSize(format) {
+  var isDXT1 = format == ext.COMPRESSED_RGB_S3TC_DXT1_EXT ||
+               format == ext.COMPRESSED_RGBA_S3TC_DXT1_EXT;
+  return isDXT1 ? 8 : 16;
+}
+
+function uncompressDXT(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) {
+            uncompressDXTBlock(
+                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) {
+    var data = new Uint8Array(test.data);
+    var width = test.width;
+    var height = test.height;
+    var format = test.format;
+
+    var uncompressedData = uncompressDXT(width, height, data, format);
+
+    canvas.width = width;
+    canvas.height = height;
+    gl.viewport(0, 0, width, height);
+    debug("testing " + formatToString(format) + " " + width + "x" + height);
+    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);
+    gl.compressedTexImage2D(gl.TEXTURE_2D, 0, format, width, height, 0, data);
+    glErrorShouldBe(gl, gl.NO_ERROR, "uploading compressed texture");
+    wtu.drawQuad(gl);
+    compareRect(width, height, test.channels, width, height, uncompressedData, data, format);
+
+    gl.compressedTexImage2D(gl.TEXTURE_2D, 0, format, width, height, 1, data);
+    glErrorShouldBe(gl, gl.INVALID_VALUE, "non 0 border");
+
+    gl.compressedTexImage2D(gl.TEXTURE_2D, 0, format, width + 4, height, 0, data);
+    glErrorShouldBe(gl, gl.INVALID_VALUE, "data size does not match dimensions");
+    gl.compressedTexImage2D(gl.TEXTURE_2D, 0, format, width, height + 4, 0, data);
+    glErrorShouldBe(gl, gl.INVALID_VALUE, "data size does not match dimensions");
+    gl.compressedTexImage2D(gl.TEXTURE_2D, 0, format, width - 4, height, 0, data);
+    glErrorShouldBe(gl, gl.INVALID_VALUE, "data size does not match dimensions");
+    gl.compressedTexImage2D(gl.TEXTURE_2D, 0, format, width, height - 4, 0, data);
+    glErrorShouldBe(gl, gl.INVALID_VALUE, "data size does not match dimensions");
+
+    gl.compressedTexImage2D(gl.TEXTURE_2D, 0, format, width - 1, height, 0, data);
+    glErrorShouldBe(gl, gl.INVALID_OPERATION, "invalid dimensions");
+    gl.compressedTexImage2D(gl.TEXTURE_2D, 0, format, width - 2, height, 0, data);
+    glErrorShouldBe(gl, gl.INVALID_OPERATION, "invalid dimensions");
+    gl.compressedTexImage2D(gl.TEXTURE_2D, 0, format, width, height - 1, 0, data);
+    glErrorShouldBe(gl, gl.INVALID_OPERATION, "invalid dimensions");
+    gl.compressedTexImage2D(gl.TEXTURE_2D, 0, format, width, height - 2, 0, data);
+    glErrorShouldBe(gl, gl.INVALID_OPERATION, "invalid dimensions");
+
+    if (width == 4) {
+      gl.compressedTexImage2D(gl.TEXTURE_2D, 1, format, 1, height, 0, data);
+      glErrorShouldBe(gl, gl.NO_ERROR, "valid dimensions for level > 0");
+      gl.compressedTexImage2D(gl.TEXTURE_2D, 1, format, 2, height, 0, data);
+      glErrorShouldBe(gl, gl.NO_ERROR, "valid dimensions for level > 0");
+    }
+    if (height == 4) {
+      gl.compressedTexImage2D(gl.TEXTURE_2D, 1, format, width, 1, 0, data);
+      glErrorShouldBe(gl, gl.NO_ERROR, "valid dimensions for level > 0");
+      gl.compressedTexImage2D(gl.TEXTURE_2D, 1, format, width, 2, 0, data);
+      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_RGB_S3TC_DXT1_EXT:
+      wrongFormat = ext.COMPRESSED_RGBA_S3TC_DXT1_EXT;
+      break;
+    case ext.COMPRESSED_RGBA_S3TC_DXT1_EXT:
+      wrongFormat = ext.COMPRESSED_RGB_S3TC_DXT1_EXT;
+      break;
+    case ext.COMPRESSED_RGBA_S3TC_DXT3_EXT:
+      wrongFormat = ext.COMPRESSED_RGBA_S3TC_DXT5_EXT;
+      break;
+    case ext.COMPRESSED_RGBA_S3TC_DXT5_EXT:
+      wrongFormat = ext.COMPRESSED_RGBA_S3TC_DXT3_EXT;
+      break;
+    }
+
+    gl.compressedTexSubImage2D(gl.TEXTURE_2D, 0, 0, 0, width, height, wrongFormat, data);
+    glErrorShouldBe(gl, gl.INVALID_OPERATION, "format does not match");
+
+    gl.compressedTexSubImage2D(gl.TEXTURE_2D, 0, 0, 0, width + 4, height, format, data);
+    glErrorShouldBe(gl, gl.INVALID_VALUE, "data size does not match dimensions");
+    gl.compressedTexSubImage2D(gl.TEXTURE_2D, 0, 0, 0, width, height + 4, format, data);
+    glErrorShouldBe(gl, gl.INVALID_VALUE, "data size does not match dimensions");
+    gl.compressedTexSubImage2D(gl.TEXTURE_2D, 0, 0, 0, width - 4, height, format, data);
+    glErrorShouldBe(gl, gl.INVALID_VALUE, "data size does not match dimensions");
+    gl.compressedTexSubImage2D(gl.TEXTURE_2D, 0, 0, 0, width, height - 4, format, data);
+    glErrorShouldBe(gl, gl.INVALID_VALUE, "data size does not match dimensions");
+
+    gl.compressedTexSubImage2D(gl.TEXTURE_2D, 0, 0, 0, width - 1, height, format, data);
+    glErrorShouldBe(gl, gl.INVALID_OPERATION, "invalid dimensions");
+    gl.compressedTexSubImage2D(gl.TEXTURE_2D, 0, 0, 0, width - 2, height, format, data);
+    glErrorShouldBe(gl, gl.INVALID_OPERATION, "invalid dimensions");
+    gl.compressedTexSubImage2D(gl.TEXTURE_2D, 0, 0, 0, width, height - 1, format, data);
+    glErrorShouldBe(gl, gl.INVALID_OPERATION, "invalid dimensions");
+    gl.compressedTexSubImage2D(gl.TEXTURE_2D, 0, 0, 0, width, height - 2, format, data);
+    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);
+        glErrorShouldBe(gl, gl.INVALID_OPERATION, "invalid offset");
+        gl.compressedTexSubImage2D(gl.TEXTURE_2D, 0, 0, 1, 4, 4, format, subData);
+        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);
+            glErrorShouldBe(gl, gl.NO_ERROR, "uploading compressed texture");
+            wtu.drawQuad(gl);
+            compareRect(width, height, test.channels, width, height, uncompressedData, data, format);
+        }
+    }
+}
+
+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 < imageWidth; ++yy) {
+        for (var xx = 0; xx < imageHeight; ++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);
+        }
+    }
+    var img = document.createElement("img");
+    img.src = c.toDataURL();
+    return img;
+}
+function compareRect(
+        actualWidth, actualHeight, actualChannels,
+        dataWidth, dataHeight, expectedData,
+        testData, testFormat) {
+    var actual = new Uint8Array(actualWidth * actualHeight * 4);
+    gl.readPixels(
+            0, 0, actualWidth, actualHeight, gl.RGBA, gl.UNSIGNED_BYTE, actual);
+
+    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);
+
+    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 (actual[actualOffset + jj] != expected[jj]) {
+                    failed = true;
+                    var was = actual[actualOffset + 0].toString();
+                    for (j = 1; j < 4; ++j) {
+                        was += "," + actual[actualOffset + j];
+                    }
+                    testFailed('at (' + xx + ', ' + yy +
+                                         ') expected: ' + expected + ' was ' + was);
+                }
+            }
+        }
+    }
+    if (!failed) {
+        testPassed("texture rendered correctly");
+    }
+}
+
+function testPVRTCTextures() {
+    testFailed("PVRTC test not yet implemented");
+}
+
+debug("");
+successfullyParsed = true;
+</script>
+<script src="../../resources/js-test-post.js"></script>
+
+</body>
+</html>
--- a/content/canvas/test/webgl/conformance/extensions/webgl-debug-renderer-info.html
+++ b/content/canvas/test/webgl/conformance/extensions/webgl-debug-renderer-info.html
@@ -21,18 +21,17 @@ found in the LICENSE file.
 <!-- Shaders for testing standard derivatives -->
 
 <script>
 description("This test verifies the functionality of the WEBGL_debug_renderer_info extension, if it is available.");
 
 debug("");
 
 var wtu = WebGLTestUtils;
-var canvas = document.getElementById("canvas");
-var gl = create3DContext(canvas);
+var gl = wtu.create3DContext("canvas");
 var ext = null;
 var vao = null;
 
 if (!gl) {
     testFailed("WebGL context does not exist");
 } else {
     testPassed("WebGL context exists");
 
--- a/content/canvas/test/webgl/conformance/extensions/webgl-debug-shaders.html
+++ b/content/canvas/test/webgl/conformance/extensions/webgl-debug-shaders.html
@@ -21,18 +21,17 @@ found in the LICENSE file.
 <!-- Shaders for testing standard derivatives -->
 
 <script>
 description("This test verifies the functionality of the WEBGL_debug_shaders extension, if it is available.");
 
 debug("");
 
 var wtu = WebGLTestUtils;
-var canvas = document.getElementById("canvas");
-var gl = create3DContext(canvas);
+var gl = wtu.create3DContext("canvas");
 var ext = null;
 var shader = null;
 
 if (!gl) {
     testFailed("WebGL context does not exist");
 } else {
     testPassed("WebGL context exists");
 
deleted file mode 100644
--- a/content/canvas/test/webgl/conformance/extensions/webgl-experimental-compressed-textures.html
+++ /dev/null
@@ -1,520 +0,0 @@
-<!--
-Copyright (c) 2011 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
- -->
-<!DOCTYPE html>
-<html>
-<head>
-<meta charset="utf-8">
-<title>WebGL WEBGL_EXPERIMENTAL_compressed_textures Conformance Tests</title>
-<link rel="stylesheet" href="../../resources/js-test-style.css"/>
-<style>
-img {
- border: 1px solid black;
- margin-right: 1em;
-}
-.testimages {
-}
-
-.testimages br {
-  clear: both;
-}
-
-.testimages > div {
-  float: left;
-  margin: 1em;
-}
-</style>
-<script src="../../resources/desktop-gl-constants.js" type="text/javascript"></script>
-<script src="../../resources/js-test-pre.js"></script>
-<script src="../resources/webgl-test.js"></script>
-<script src="../resources/webgl-test-utils.js"></script>
-<script src="compressed-textures/4x4.rgb.dxt1.js"></script>
-<script src="compressed-textures/4x4.rgba.dxt1.js"></script>
-<script src="compressed-textures/4x4.rgba.dxt5.js"></script>
-<script src="compressed-textures/8x8.rgb.dxt1.js"></script>
-<script src="compressed-textures/8x8.rgba.dxt1.js"></script>
-<script src="compressed-textures/8x8.rgba.dxt5.js"></script>
-<script src="compressed-textures/8x8.rgba.pvrtc4bpp.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<canvas id="canvas" width="8" height="8" style="width: 8px; height: 8px;"></canvas>
-<div id="console"></div>
-<!-- Shaders for testing standard derivatives -->
-<script>
-description("This test verifies the functionality of the OES_vertex_array_object extension, if it is available.");
-
-debug("");
-
-var wtu = WebGLTestUtils;
-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_RGB_S3TC_DXT1_EXT        : 0x83F0,
-  COMPRESSED_RGBA_S3TC_DXT1_EXT       : 0x83F1,
-  COMPRESSED_RGBA_S3TC_DXT5_EXT       : 0x83F3,
-  ETC1_RGB8_OES                       : 0x8D64,
-  COMPRESSED_RGB_PVRTC_4BPPV1_IMG     : 0x8C00,
-  COMPRESSED_RGBA_PVRTC_4BPPV1_IMG    : 0x8C02
-};
-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 = gl.getExtension("WEBGL_EXPERIMENTAL_compressed_textures");
-  if (!ext) {
-    testPassed("No WEBGL_EXPERIMENTAL_compressed_textures support -- this is legal");
-    runSupportedTest(false);
-  } else {
-    testPassed("Successfully enabled WEBGL_EXPERIMENTAL_compressed_textures extension");
-
-    runSupportedTest(true);
-    runTestExtension();
-  }
-}
-
-function runSupportedTest(extensionEnabled) {
-  var supported = gl.getSupportedExtensions();
-  if (supported.indexOf("WEBGL_EXPERIMENTAL_compressed_textures") >= 0) {
-    if (extensionEnabled) {
-      testPassed("WEBGL_EXPERIMENTAL_compressed_textures listed as supported and getExtension succeeded");
-    } else {
-      testFailed("WEBGL_EXPERIMENTAL_compressed_textures listed as supported but getExtension failed");
-    }
-  } else {
-    if (extensionEnabled) {
-      testFailed("WEBGL_EXPERIMENTAL_compressed_textures not listed as supported but getExtension succeeded");
-    } else {
-      testPassed("WEBGL_EXPERIMENTAL_compressed_textures not listed as supported and getExtension failed -- this is legal");
-    }
-  }
-}
-
-
-function runTestDisabled() {
-  debug("Testing binding enum with extension disabled");
-
-  // Default value is null
-  if (gl.getParameter(gl.COMPRESSED_TEXTURE_FORMATS) === null) {
-    testPassed("Default value of COMPRESSED_TEXTURE_FORMATS is null");
-  } else {
-    testFailed("Default value of COMPRESSED_TEXTURE_FORMATS is not null");
-  }
-}
-
-function checkIsValidFormat(format) {
-  for (var name in validFormats) {
-    if (format == validFormats[name]) {
-      testPassed("supported format " + formatToString(format) + " is valid");
-      return;
-    }
-  }
-  testFailed("supported format " + formatToString(format) + " is not valid");
-}
-
-function formatToString(format) {
-  for (var p in ext) {
-    if (ext[p] == format) {
-      return p;
-    }
-  }
-  return "0x" + format.toString(16);
-}
-
-function runTestExtension() {
-  debug("Testing WEBGL_EXPERIMENTAL_compressed_textures");
-
-  // 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);
-  // Even if no formats are supported this should return an array.
-  shouldBeTrue("supportedFormats.length !== undefined");
-
-  // check that each format is an allowed format
-  for (var ii = 0; ii < supportedFormats.length; ++ii) {
-    checkIsValidFormat(supportedFormats[ii]);
-  }
-
-  // Test each format
-  for (var ii = 0; ii < supportedFormats.length; ++ii) {
-    switch (supportedFormats[ii]) {
-    case ext.COMPRESSED_RGB_S3TC_DXT1_EXT:
-      testDXT1_RGB();
-      break;
-    case ext.COMPRESSED_RGBA_S3TC_DXT1_EXT:
-      testDXT1_RGBA();
-      break;
-    case ext.COMPRESSED_RGBA_S3TC_DXT5_EXT:
-      testDXT5_RGBA();
-      break;
-    case ext.ETC1_RGB8_OES:
-      testETC1_RGB8();
-      break;
-    case ext.COMPRESSED_RGB_PVRTC_4BPPV1_IMG:
-      testPVRTC_RGB_4BPPV1();
-      break;
-    case ext.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG:
-      testPVRTC_RGBA_4BPPV1();
-      break;
-    }
-  }
-}
-
-function testDXT1_RGB() {
-  var tests = [
-    { width: 4,
-      height: 4,
-      channels: 3,
-      data: img_4x4_rgb_dxt1,
-      format: ext.COMPRESSED_RGB_S3TC_DXT1_EXT
-    },
-    { width: 8,
-      height: 8,
-      channels: 3,
-      data: img_8x8_rgb_dxt1,
-      format: ext.COMPRESSED_RGB_S3TC_DXT1_EXT
-    }
-  ];
-  testDXTTextures(tests);
-}
-
-function testDXT1_RGBA() {
-  var tests = [
-    { width: 4,
-      height: 4,
-      channels: 4,
-      data: img_4x4_rgba_dxt1,
-      format: ext.COMPRESSED_RGBA_S3TC_DXT1_EXT
-    },
-    { width: 8,
-      height: 8,
-      channels: 4,
-      data: img_8x8_rgba_dxt1,
-      format: ext.COMPRESSED_RGBA_S3TC_DXT1_EXT
-    }
-  ];
-  testDXTTextures(tests);
-}
-
-function testDXT5_RGBA() {
-  var tests = [
-    { width: 4,
-      height: 4,
-      channels: 4,
-      data: img_4x4_rgba_dxt5,
-      format: ext.COMPRESSED_RGBA_S3TC_DXT5_EXT
-    },
-    { width: 8,
-      height: 8,
-      channels: 4,
-      data: img_8x8_rgba_dxt5,
-      format: ext.COMPRESSED_RGBA_S3TC_DXT5_EXT
-    }
-  ];
-  testDXTTextures(tests);
-}
-
-function testETC1_RGB8() {
-  testFailed("ETC1 test not yet implemented");
-}
-
-function testPVRTC_RGB_4BPPV1() {
-  var tests = [
-    { width: 8,
-      height: 8,
-      channels: 4,
-      data: img_8x8_rgba_pvrtc4bpp,
-      format: ext.COMPRESSED_RGB_PVRTC_4BPPV1_IMG
-    }
-  ];
-  testPVRTCTextures(tests);
-}
-
-function testPVRTC_RGB_4BPPV1() {
-  var tests = [
-    { width: 8,
-      height: 8,
-      channels: 4,
-      data: img_8x8_rgba_pvrtc4bpp,
-      format: ext.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG
-    }
-  ];
-  testPVRTCTextures(tests);
-}
-
-function testDXTTextures(tests) {
-  debug("<hr/>");
-  for (var ii = 0; ii < tests.length; ++ii) {
-    testDXTTexture(tests[ii]);
-  }
-}
-
-function uncompressDXTBlock(
-    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 colorOffset =
-      srcOffset + ((format == ext.COMPRESSED_RGBA_S3TC_DXT5_EXT) ? 8 : 0);
-  var color0 = make565(src, colorOffset + 0);
-  var color1 = make565(src, colorOffset + 2);
-  var c0gtc1 = color0 > color1 || format == ext.COMPRESSED_RGBA_S3TC_DXT5_EXT;
-  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_RGB_S3TC_DXT1_EXT:
-        alpha = 255;
-        break;
-      case ext.COMPRESSED_RGBA_S3TC_DXT1_EXT:
-        alpha = (code == 3 && !c0gtc1) ? 0 : 255;
-        break;
-      case ext.COMPRESSED_RGBA_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] = srcColor[0];
-      destBuffer[dstOff + 1] = srcColor[1];
-      destBuffer[dstOff + 2] = srcColor[2];
-      destBuffer[dstOff + 3] = alpha;
-    }
-  }
-}
-
-function uncompressDXT(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 = (format == ext.COMPRESSED_RGBA_S3TC_DXT5_EXT ? 16 : 8);
-  for (var yy = 0; yy < blocksDown; ++yy) {
-    for (var xx = 0; xx < blocksAcross; ++xx) {
-      uncompressDXTBlock(
-        dest, xx * 4, yy * 4, width, data,
-        (yy * blocksAcross + xx) * blockSize, format);
-    }
-  }
-  return dest;
-}
-
-function testDXTTexture(test) {
-  var uncompressedData = uncompressDXT(
-      test.width, test.height, test.data, test.format);
-
-  var inner = 4; //test.width == 4 ? 4 : 1
-  for (var ii = 0; ii < inner; ++ii) {
-    var width = test.width - ii;
-    var height = test.height - ii;
-    canvas.width = width;
-    canvas.height = height;
-    gl.viewport(0, 0, width, height);
-    debug("testing " + formatToString(test.format) + " " +
-          width + "x" + height);
-    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);
-    ext.compressedTexImage2D(
-        gl.TEXTURE_2D, 0, test.format, width, height, 0,
-        new Uint8Array(test.data));
-    glErrorShouldBe(gl, gl.NO_ERROR, "uploading compressed texture");
-    wtu.drawQuad(gl);
-    compareRect(
-        width, height, test.channels, test.width, test.height, uncompressedData,
-        test.data, test.format);
-  }
-
-  gl.compressedTexImage2D(
-      gl.TEXTURE_2D, 0, test.format, width + 1, height, 0,
-      new Uint8Array(test.data));
-  glErrorShouldBe(
-      gl, gl.INVALID_OPERATION, "data size does not match dimensions");
-
-
-  // TODO: test compressedTexSubImage2D
-  // TODO: test invalid width, height, xoffset, yoffset
-}
-
-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 < imageWidth; ++yy) {
-    for (var xx = 0; xx < imageHeight; ++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);
-    }
-  }
-  var img = document.createElement("img");
-  img.src = c.toDataURL();
-  return img;
-}
-function compareRect(
-    actualWidth, actualHeight, actualChannels,
-    dataWidth, dataHeight, expectedData,
-    testData, testFormat) {
-  var actual = new Uint8Array(actualWidth * actualHeight * 4);
-  gl.readPixels(
-      0, 0, actualWidth, actualHeight, gl.RGBA, gl.UNSIGNED_BYTE, actual);
-
-  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);
-
-  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 (actual[actualOffset + jj] != expected[jj]) {
-          failed = true;
-          var was = actual[actualOffset + 0].toString();
-          for (j = 1; j < 4; ++j) {
-            was += "," + actual[actualOffset + j];
-          }
-          testFailed('at (' + xx + ', ' + yy +
-                     ') expected: ' + expected + ' was ' + was);
-        }
-      }
-    }
-  }
-  if (!failed) {
-    testPassed("texture rendered correctly");
-  }
-}
-
-function testPVRTCTextures() {
-  testFailed("PVRTC test not yet implemented");
-}
-
-debug("");
-successfullyParsed = true;
-</script>
-<script src="../../resources/js-test-post.js"></script>
-
-</body>
-</html>
--- a/content/canvas/test/webgl/conformance/glsl/functions/glsl-function-acos.html
+++ b/content/canvas/test/webgl/conformance/glsl/functions/glsl-function-acos.html
@@ -21,53 +21,74 @@ found in the LICENSE file.
 <script>
 
 var piConstants = [
   "const float kPI     = 3.14159265358979323846;",
   "const float kHalfPI = (kPI * 0.5);",
   "const float k2PI    = (kPI * 2.0);"
 ].join("\n");
 
-var asinImplementation = [
-  "float asin_impl(float v) {",
-  "  return v + (1.0 / 2.0) * pow(v, 3.0) / 3.0 +",
-  "             ((1.0 * 3.0) / (2.0 * 4.0)) * pow(v, 5.0) / 5.0 +",
-  "             ((1.0 * 3.0 * 5.0) / (2.0 * 4.0 * 6.0)) * pow(v, 7.0) / 7.0 +",
-  "             ((1.0 * 3.0 * 5.0 * 7.0) / (2.0 * 4.0 * 6.0 * 8.0)) * pow(v, 9.0) / 9.0;",
-  "}"
-].join("\n");
+var kPI = Math.PI;
+var kHalfPI = Math.PI * 0.5;
+var k2PI = Math.PI * 2.0;
+var acos = Math.acos;  // shorthand
 
-GLSLGenerator.runFeatureTest({
+GLSLGenerator.runReferenceImageTest({
   feature: "acos",
   args: "$(type) value",
-  baseArgs: "value$(field)",
   testFunc: "$(func)($(type))",
-  emuFunc: [
-    asinImplementation,
-    "float $(func)_base(float value) {",
-    "  return kHalfPI - asin_impl(value);",
-    "}"
-  ].join("\n"),
   gridRes: 8,
-  tolerance: 8,
+  tolerance: 2,
   extra: piConstants,
   tests: [
-    ["$(output) = vec4(",
-     "    $(func)($(input).x * 0.8) / kPI,",
-     "    $(func)($(input).y * 0.8) / kPI,",
-     "    0,",
-     "    1);"].join("\n"),
-    ["$(output) = vec4(",
-     "    $(func)($(input).xy * 0.8) / kPI,",
-     "    0, 1);"].join("\n"),
-    ["$(output) = vec4(",
-     "    $(func)($(input).xyz * 0.8) / kPI,",
-     "    1);"].join("\n"),
-    ["$(output) = ",
-     "    $(func)($(input) * 0.8) / kPI;",
-    ].join("\n")
+    {
+      source: ["$(output) = vec4(",
+               "    $(func)($(input).x * 0.8) / kPI,",
+               "    $(func)($(input).y * 0.8) / kPI,",
+               "    0,",
+               "    1);"].join("\n"),
+      generator: function(x, y, z, w) {
+        return [ acos(x * 0.8) / kPI,
+                 acos(y * 0.8) / kPI,
+                 0,
+                 1 ];
+      },
+    },
+    {
+      source: ["$(output) = vec4(",
+               "    $(func)($(input).xy * 0.8) / kPI,",
+               "    0, 1);"].join("\n"),
+      generator: function(x, y, z, w) {
+        return [ acos(x * 0.8) / kPI,
+                 acos(y * 0.8) / kPI,
+                 0,
+                 1 ];
+      },
+    },
+    {
+      source: ["$(output) = vec4(",
+               "    $(func)($(input).xyz * 0.8) / kPI,",
+               "    1);"].join("\n"),
+      generator: function(x, y, z, w) {
+        return [ acos(x * 0.8) / kPI,
+                 acos(y * 0.8) / kPI,
+                 acos(z * 0.8) / kPI,
+                 1 ];
+      },
+    },
+    {
+      source: ["$(output) = ",
+               "    $(func)($(input) * 0.8) / kPI;",
+              ].join("\n"),
+      generator: function(x, y, z, w) {
+        return [ acos(x * 0.8) / kPI,
+                 acos(y * 0.8) / kPI,
+                 acos(z * 0.8) / kPI,
+                 acos(w * 0.8) / kPI ];
+      },
+    },
   ]
 });
 successfullyParsed = true;
 </script>
 </body>
 </html>
 
--- a/content/canvas/test/webgl/conformance/glsl/functions/glsl-function-asin.html
+++ b/content/canvas/test/webgl/conformance/glsl/functions/glsl-function-asin.html
@@ -21,53 +21,74 @@ found in the LICENSE file.
 <script>
 
 var piConstants = [
   "const float kPI     = 3.14159265358979323846;",
   "const float kHalfPI = (kPI * 0.5);",
   "const float k2PI    = (kPI * 2.0);"
 ].join("\n");
 
-var asinImplementation = [
-  "float asin_impl(float v) {",
-  "  return v + (1.0 / 2.0) * pow(v, 3.0) / 3.0 +",
-  "             ((1.0 * 3.0) / (2.0 * 4.0)) * pow(v, 5.0) / 5.0 +",
-  "             ((1.0 * 3.0 * 5.0) / (2.0 * 4.0 * 6.0)) * pow(v, 7.0) / 7.0 +",
-  "             ((1.0 * 3.0 * 5.0 * 7.0) / (2.0 * 4.0 * 6.0 * 8.0)) * pow(v, 9.0) / 9.0;",
-  "}"
-].join("\n");
+var kPI = Math.PI;
+var kHalfPI = Math.PI * 0.5;
+var k2PI = Math.PI * 2.0;
+var asin = Math.asin;  // shorthand
 
-GLSLGenerator.runFeatureTest({
+GLSLGenerator.runReferenceImageTest({
   feature: "asin",
   args: "$(type) value",
-  baseArgs: "value$(field)",
   testFunc: "$(func)($(type))",
-  emuFunc: [
-    asinImplementation,
-    "float $(func)_base(float value) {",
-    "  return asin_impl(value);",
-    "}"
-  ].join("\n"),
   gridRes: 8,
   tolerance: 2,
   extra: piConstants,
   tests: [
-    ["$(output) = vec4(",
-     "    $(func)($(input).x * 0.8) / kPI + 0.5,",
-     "    $(func)($(input).y * 0.8) / kPI + 0.5,",
-     "    0,",
-     "    1);"].join("\n"),
-    ["$(output) = vec4(",
-     "    $(func)($(input).xy * 0.8) / kPI + 0.5,",
-     "    0, 1);"].join("\n"),
-    ["$(output) = vec4(",
-     "    $(func)($(input).xyz * 0.8) / kPI + 0.5,",
-     "    1);"].join("\n"),
-    ["$(output) = ",
-     "    $(func)($(input) * 0.8) / kPI + 0.5;",
-    ].join("\n")
+    {
+      source: ["$(output) = vec4(",
+               "    $(func)($(input).x * 0.8) / kPI + 0.5,",
+               "    $(func)($(input).y * 0.8) / kPI + 0.5,",
+               "    0,",
+               "    1);"].join("\n"),
+      generator: function(x, y, z, w) {
+        return [ asin(x * 0.8) / kPI + 0.5,
+                 asin(y * 0.8) / kPI + 0.5,
+                 0,
+                 1 ];
+      },
+    },
+    {
+      source: ["$(output) = vec4(",
+               "    $(func)($(input).xy * 0.8) / kPI + 0.5,",
+               "    0, 1);"].join("\n"),
+      generator: function(x, y, z, w) {
+        return [ asin(x * 0.8) / kPI + 0.5,
+                 asin(y * 0.8) / kPI + 0.5,
+                 0,
+                 1 ];
+      },
+    },
+    {
+      source: ["$(output) = vec4(",
+               "    $(func)($(input).xyz * 0.8) / kPI + 0.5,",
+               "    1);"].join("\n"),
+      generator: function(x, y, z, w) {
+        return [ asin(x * 0.8) / kPI + 0.5,
+                 asin(y * 0.8) / kPI + 0.5,
+                 asin(z * 0.8) / kPI + 0.5,
+                 1 ];
+      },
+    },
+    {
+      source: ["$(output) = ",
+               "    $(func)($(input) * 0.8) / kPI + 0.5;",
+              ].join("\n"),
+      generator: function(x, y, z, w) {
+        return [ asin(x * 0.8) / kPI + 0.5,
+                 asin(y * 0.8) / kPI + 0.5,
+                 asin(z * 0.8) / kPI + 0.5,
+                 asin(w * 0.8) / kPI + 0.5 ];
+      },
+    },
   ]
 });
 successfullyParsed = true;
 </script>
 </body>
 </html>
 
--- a/content/canvas/test/webgl/conformance/glsl/functions/glsl-function-atan-xy.html
+++ b/content/canvas/test/webgl/conformance/glsl/functions/glsl-function-atan-xy.html
@@ -21,84 +21,77 @@ found in the LICENSE file.
 <script>
 
 var piConstants = [
   "const float kPI     = 3.14159265358979323846;",
   "const float kHalfPI = (kPI * 0.5);",
   "const float k2PI    = (kPI * 2.0);"
 ].join("\n");
 
-var atanImplementation = [
-  "const float kEpsilon = 0.0001;",
-  "",
-  "float atan_impl(float y, float x) {",
-  "  float atan_value = 0.0;",
-  "  float scale = 1.0;",
-  "  float sign = 1.0;",
-  "",
-  "  if (x > kEpsilon || abs(y) > kEpsilon) {",
-  "    if (x < 0.0 ^^ y < 0.0) {",
-  "      sign = -1.0;",
-  "    }",
-  "",
-  "    bool y_gt_x = abs(y) < abs(x);",
-  "    float value = y_gt_x ? abs(y / x) : abs(x / y);",
-  "",
-  "    // Use Taylors series expansion for atan",
-  "    for(int ii = 1; ii < 8; ii += 2) {",
-  "      atan_value += scale * pow(value, float(ii)) / float(ii);",
-  "      scale = -scale;",
-  "    }",
-  "",
-  "    atan_value = (y_gt_x) ? sign * atan_value : sign * (kHalfPI - atan_value);",
-  "  }",
-  "",
-  "  if (x < 0.0) {",
-  "    if (y < 0.0) {",
-  "      atan_value -= kHalfPI;",
-  "    } else if (y > 0.0) {",
-  "      atan_value += kHalfPI;",
-  "    }",
-  "  }",
-  "",
-  "  return atan_value;",
-  "}"
-].join("\n");
+var kPI = Math.PI;
+var kHalfPI = Math.PI * 0.5;
+var k2PI = Math.PI * 2.0;
+var atan2 = Math.atan2;  // shorthand
 
-GLSLGenerator.runFeatureTest({
+GLSLGenerator.runReferenceImageTest({
   feature: "atan",
   args: "$(type) y, $(type) x",
-  baseArgs: "y$(field), x$(field)",
   testFunc: "$(func)($(type), $(type))",
-  emuFunc: [
-    atanImplementation,
-    "float $(func)_base(float y, float x) {",
-    "  return atan_impl(y, x);",
-    "}"
-  ].join("\n"),
   gridRes: 8,
-  tolerance: 4,
+  tolerance: 5,
   extra: piConstants,
   tests: [
-    ["$(output) = vec4(",
-     "    $(func)($(input).x + 0.1, $(input).y) / k2PI + 0.5,",
-     "    0,",
-     "    0,",
-     "    1);"].join("\n"),
-    ["$(output) = vec4(",
-     "    $(func)($(input).xy + vec2(0.1, 0.1), $(input).yx) / ",
-     "            k2PI + vec2(0.5, 0.5),",
-     "    0, 1);"].join("\n"),
-    ["$(output) = vec4(",
-     "    $(func)($(input).xyz + vec3(0.1, 0.1, 0.1), $(input).yzx) / ",
-     "            k2PI + vec3(0.5, 0.5, 0.5),",
-     "    1);"].join("\n"),
-    ["$(output) = ",
-     "    $(func)($(input) + vec4(0.1, 0.1, 0.1, 0.1), $(input).wzyx) / ",
-     "            k2PI + vec4(0.5, 0.5, 0.5, 0.5);",
-    ].join("\n")
+    {
+      source: ["$(output) = vec4(",
+               "    $(func)($(input).x + 0.1, $(input).y) / k2PI + 0.5,",
+               "    0,",
+               "    0,",
+               "    1);"].join("\n"),
+      generator: function(x, y, z, w) {
+        return [ atan2(x + 0.1, y) / k2PI + 0.5,
+                 0,
+                 0,
+                 1 ];
+      },
+    },
+    {
+      source: ["$(output) = vec4(",
+               "    $(func)($(input).xy + vec2(0.1, 0.1), $(input).yx) / ",
+               "            k2PI + vec2(0.5, 0.5),",
+               "    0, 1);"].join("\n"),
+      generator: function(x, y, z, w) {
+        return [ atan2(x + 0.1, y) / k2PI + 0.5,
+                 atan2(y + 0.1, x) / k2PI + 0.5,
+                 0,
+                 1 ];
+      },
+    },
+    {
+      source: ["$(output) = vec4(",
+               "    $(func)($(input).xyz + vec3(0.1, 0.1, 0.1), $(input).yzx) / ",
+               "            k2PI + vec3(0.5, 0.5, 0.5),",
+               "    1);"].join("\n"),
+      generator: function(x, y, z, w) {
+        return [ atan2(x + 0.1, y) / k2PI + 0.5,
+                 atan2(y + 0.1, z) / k2PI + 0.5,
+                 atan2(z + 0.1, x) / k2PI + 0.5,
+                 1 ];
+      },
+    },
+    {
+      source: ["$(output) = ",
+               "    $(func)($(input) + vec4(0.1, 0.1, 0.1, 0.1), $(input).wzyx) / ",
+               "            k2PI + vec4(0.5, 0.5, 0.5, 0.5);",
+              ].join("\n"),
+      generator: function(x, y, z, w) {
+        return [ atan2(x + 0.1, w) / k2PI + 0.5,
+                 atan2(y + 0.1, z) / k2PI + 0.5,
+                 atan2(z + 0.1, y) / k2PI + 0.5,
+                 atan2(w + 0.1, x) / k2PI + 0.5 ];
+      },
+    },
   ]
 });
 successfullyParsed = true;
 </script>
 </body>
 </html>
 
--- a/content/canvas/test/webgl/conformance/glsl/functions/glsl-function-atan.html
+++ b/content/canvas/test/webgl/conformance/glsl/functions/glsl-function-atan.html
@@ -21,68 +21,74 @@ found in the LICENSE file.
 <script>
 
 var piConstants = [
   "const float kPI     = 3.14159265358979323846;",
   "const float kHalfPI = (kPI * 0.5);",
   "const float k2PI    = (kPI * 2.0);"
 ].join("\n");
 
-var atanImplementation = [
-  "float atan_impl(float value) {",
-  "  float atan_value = 0.0;",
-  "  float scale = 1.0;",
-  "  float sign = 1.0;",
-  "",
-  "  if (value < 0.0) {",
-  "    sign = -1.0;",
-  "    value = -value;",
-  "  }",
-  "",
-  "  bool value_le_1 = value <= 1.0;",
-  "  value = value_le_1 ? value : 1.0 / value;",
-  "",
-  "  // Use Taylors series expansion for atan",
-  "  for(int ii = 1; ii < 8; ii += 2) {",
-  "    atan_value += scale * pow(value, float(ii)) / float(ii);",
-  "    scale = -scale;",
-  "  }",
-  "",
-  "  return value_le_1 ? sign * atan_value : sign * (kHalfPI - atan_value);",
-  "}",
-].join("\n");
+var kPI = Math.PI;
+var kHalfPI = Math.PI * 0.5;
+var k2PI = Math.PI * 2.0;
+var atan = Math.atan;  // shorthand
 
-GLSLGenerator.runFeatureTest({
+GLSLGenerator.runReferenceImageTest({
   feature: "atan",
   args: "$(type) value",
-  baseArgs: "value$(field)",
   testFunc: "$(func)($(type))",
-  emuFunc: [
-    atanImplementation,
-    "",
-    "#define $(func)_base(value) atan_impl(value)"
-  ].join("\n"),
   gridRes: 8,
   tolerance: 4,
   extra: piConstants,
   tests: [
-    ["$(output) = vec4(",
-     "    $(func)($(input).x * 8.0 - 4.0) / k2PI + 0.5,",
-     "    0.5,",
-     "    0,",
-     "    1);"].join("\n"),
-    ["$(output) = vec4(",
-     "    $(func)($(input).xy * 8.0 - vec2(4, 4)) / k2PI + vec2(0.5, 0.5),",
-     "    0, 1);"].join("\n"),
-    ["$(output) = vec4(",
-     "    $(func)($(input).xyz * 8.0 - vec3(4, 4, 4)) / k2PI + vec3(0.5, 0.5, 0.5),",
-
-     "    1);"].join("\n"),
-    ["$(output) = ",
-     "    $(func)($(input) * 8.0 - vec4(4, 4, 4, 4)) / k2PI + vec4(0.5, 0.5, 0.5, 0.5);",
-    ].join("\n")
+    {
+      source: ["$(output) = vec4(",
+               "    $(func)($(input).x * 8.0 - 4.0) / k2PI + 0.5,",
+               "    0.5,",
+               "    0,",
+               "    1);"].join("\n"),
+      generator: function(x, y, z, w) {
+        return [ atan(x * 8.0 - 4.0) / k2PI + 0.5,
+                 0.5,
+                 0,
+                 1 ];
+      },
+    },
+    {
+      source: ["$(output) = vec4(",
+               "    $(func)($(input).xy * 8.0 - vec2(4, 4)) / k2PI + vec2(0.5, 0.5),",
+               "    0, 1);"].join("\n"),
+      generator: function(x, y, z, w) {
+        return [ atan(x * 8.0 - 4) / k2PI + 0.5,
+                 atan(y * 8.0 - 4) / k2PI + 0.5,
+                 0,
+                 1 ];
+      },
+    },
+    {
+      source: ["$(output) = vec4(",
+               "    $(func)($(input).xyz * 8.0 - vec3(4, 4, 4)) / k2PI + vec3(0.5, 0.5, 0.5),",
+               "    1);"].join("\n"),
+      generator: function(x, y, z, w) {
+        return [ atan(x * 8.0 - 4) / k2PI + 0.5,
+                 atan(y * 8.0 - 4) / k2PI + 0.5,
+                 atan(z * 8.0 - 4) / k2PI + 0.5,
+                 1 ];
+      },
+    },
+    {
+      source: ["$(output) = ",
+               "    $(func)($(input) * 8.0 - vec4(4, 4, 4, 4)) / k2PI + vec4(0.5, 0.5, 0.5, 0.5);",
+              ].join("\n"),
+      generator: function(x, y, z, w) {
+        return [ atan(x * 8.0 - 4) / k2PI + 0.5,
+                 atan(y * 8.0 - 4) / k2PI + 0.5,
+                 atan(z * 8.0 - 4) / k2PI + 0.5,
+                 atan(w * 8.0 - 4) / k2PI + 0.5 ];
+      },
+    },
   ]
 });
 successfullyParsed = true;
 </script>
 </body>
 </html>
 
--- a/content/canvas/test/webgl/conformance/glsl/functions/glsl-function-cos.html
+++ b/content/canvas/test/webgl/conformance/glsl/functions/glsl-function-cos.html
@@ -21,62 +21,78 @@ found in the LICENSE file.
 <script>
 
 var piConstants = [
   "const float kPI     = 3.14159265358979323846;",
   "const float kHalfPI = (kPI * 0.5);",
   "const float k2PI    = (kPI * 2.0);"
 ].join("\n");
 
-var sinImplementation = [
-  "",
-  "float sin_impl(float value) {",
-  "    value = mod(value + k2PI * 10.0, k2PI);",          // only positive values for now
-  "    int quad = int(floor(value / kHalfPI));",          // figure out which quad
-  "    float p = mod(value, kHalfPI);",                   // from 0.0 to PI/2
-  "    if (quad == 1 || quad == 3) { p = kHalfPI - p; }", // backward in quads 1,3
-  "    float c = p - ",
-  "              pow(p, 3.0) / (1.0 * 2.0 * 3.0) + ",
-  "              pow(p, 5.0) / (1.0 * 2.0 * 3.0 * 4.0 * 5.0) - ",
-  "              pow(p, 7.0) / (1.0 * 2.0 * 3.0 * 4.0 * 5.0 * 6.0 * 7.0);",
-  "    if (quad == 2 || quad == 3) { c = -c; }",
-  "    return c;",
-  "}"
-].join('\n');
+var kPI = Math.PI;
+var kHalfPI = Math.PI * 0.5;
+var k2PI = Math.PI * 2.0;
+var cos = Math.cos;  // shorthand
 
-GLSLGenerator.runFeatureTest({
+GLSLGenerator.runReferenceImageTest({
   feature: "cos",
   args: "$(type) value",
-  baseArgs: "value$(field)",
   testFunc: "$(func)($(type))",
-  emuFunc: [
-    sinImplementation,
-    "float $(func)_base(float value) {",
-    "  return sin_impl(value + kHalfPI);",
-    "}"
-  ].join("\n"),
   gridRes: 8,
   tolerance: 2,
   extra: piConstants,
   tests: [
-    ["$(output) = vec4(",
-     "    $(func)($(input).x * kHalfPI + kHalfPI),",
-     "    $(func)($(input).y * kHalfPI),",
-     "    0,",
-     "    1);"].join("\n"),
-    ["$(output) = vec4(",
-     "    $(func)($(input).xy * vec2(kPI, k2PI)) * 0.5 + vec2(0.5, 0.5),",
-     "    0, 1);"].join("\n"),
-    ["$(output) = vec4(",
-     "    $(func)($(input).xyz * vec3(kPI, k2PI, 4.0)) * ",
-     "    0.5 + vec3(0.5, 0.5, 0.5),",
-     "    1);"].join("\n"),
-    ["$(output) = ",
-     "    $(func)($(input) * vec4(k2PI, 4.0, kHalfPI, kPI)) *",
-     "    0.5 + vec4(0.5, 0.5, 0.5, 1);",
-    ].join("\n")
+    {
+      source: ["$(output) = vec4(",
+               "    $(func)($(input).x * kHalfPI + kHalfPI),",
+               "    $(func)($(input).y * kHalfPI),",
+               "    0,",
+               "    1);"].join("\n"),
+      generator: function(x, y, z, w) {
+	return [ cos(x * kHalfPI + kHalfPI),
+		 cos(y * kHalfPI),
+		 0,
+		 1 ];
+      },
+    },
+    {
+      source: ["$(output) = vec4(",
+	       "    $(func)($(input).xy * vec2(kPI, k2PI)) * 0.5 + vec2(0.5, 0.5),",
+	       "    0, 1);"].join("\n"),
+      generator: function(x, y, z, w) {
+	return [ cos(x * kPI) * 0.5 + 0.5,
+		 cos(y * k2PI) * 0.5 + 0.5,
+		 0,
+		 1 ];
+      },
+    },
+    {
+      // FIXME: for some reason, this test requires a higher tolerance when run in a vertex shader.
+      source: ["$(output) = vec4(",
+	       "    $(func)($(input).xyz * vec3(kPI, k2PI, 4.0)) * ",
+	       "    0.5 + vec3(0.5, 0.5, 0.5),",
+	       "    1);"].join("\n"),
+      generator: function(x, y, z, w) {
+	return [ cos(x * kPI) * 0.5 + 0.5,
+		 cos(y * k2PI) * 0.5 + 0.5,
+		 cos(z * 4.0) * 0.5 + 0.5,
+		 1 ];
+      },
+      tolerance: 7,
+    },
+    {
+      source: ["$(output) = ",
+	       "    $(func)($(input) * vec4(k2PI, 4.0, kHalfPI, kPI)) *",
+	       "    0.5 + vec4(0.5, 0.5, 0.5, 1);",
+	      ].join("\n"),
+      generator: function(x, y, z, w) {
+	return [ cos(x * k2PI) * 0.5 + 0.5,
+		 cos(y * 4.0) * 0.5 + 0.5,
+		 cos(z * kHalfPI) * 0.5 + 0.5,
+		 cos(w * kPI) * 0.5 + 1.0 ];
+      },
+    },
   ]
 });
 successfullyParsed = true;
 </script>
 </body>
 </html>
 
--- a/content/canvas/test/webgl/conformance/glsl/functions/glsl-function-sin.html
+++ b/content/canvas/test/webgl/conformance/glsl/functions/glsl-function-sin.html
@@ -21,62 +21,75 @@ found in the LICENSE file.
 <script>
 
 var piConstants = [
   "const float kPI     = 3.14159265358979323846;",
   "const float kHalfPI = (kPI * 0.5);",
   "const float k2PI    = (kPI * 2.0);"
 ].join("\n");
 
-var sinImplementation = [
-  "",
-  "float sin_impl(float value) {",
-  "    value = mod(value + k2PI * 10.0, k2PI);",          // only positive values for now
-  "    int quad = int(floor(value / kHalfPI));",          // figure out which quad
-  "    float p = mod(value, kHalfPI);",                   // from 0.0 to PI/2
-  "    if (quad == 1 || quad == 3) { p = kHalfPI - p; }", // backward in quads 1,3
-  "    float c = p - ",
-  "              pow(p, 3.0) / (1.0 * 2.0 * 3.0) + ",
-  "              pow(p, 5.0) / (1.0 * 2.0 * 3.0 * 4.0 * 5.0) - ",
-  "              pow(p, 7.0) / (1.0 * 2.0 * 3.0 * 4.0 * 5.0 * 6.0 * 7.0);",
-  "    if (quad == 2 || quad == 3) { c = -c; }",
-  "    return c;",
-  "}"
-].join('\n');
+var kPI = Math.PI;
+var kHalfPI = Math.PI * 0.5;
+var k2PI = Math.PI * 2.0;
+var sin = Math.sin;  // shorthand
 
-GLSLGenerator.runFeatureTest({
+GLSLGenerator.runReferenceImageTest({
   feature: "sin",
   args: "$(type) value",
-  baseArgs: "value$(field)",
   testFunc: "$(func)($(type))",
-  emuFunc: [
-    sinImplementation,
-    "float $(func)_base(float value) {",
-    "  return sin_impl(value);",
-    "}"
-  ].join("\n"),
   gridRes: 8,
-  tolerance: 2,
+  tolerance: 4,
   extra: piConstants,
   tests: [
-    ["$(output) = vec4(",
-     "    $(func)($(input).x * kHalfPI + kHalfPI),",
-     "    $(func)($(input).y * kHalfPI),",
-     "    0,",
-     "    1);"].join("\n"),
-    ["$(output) = vec4(",
-     "    $(func)($(input).xy * vec2(kPI, k2PI)) * 0.5 + vec2(0.5, 0.5),",
-     "    0, 1);"].join("\n"),
-    ["$(output) = vec4(",
-     "    $(func)($(input).xyz * vec3(kPI, k2PI, 4.0)) * ",
-     "    0.5 + vec3(0.5, 0.5, 0.5),",
-     "    1);"].join("\n"),
-    ["$(output) = ",
-     "    $(func)($(input) * vec4(k2PI, 4.0, kHalfPI, kPI)) *",
-     "    0.5 + vec4(0.5, 0.5, 0.5, 1);",
-    ].join("\n")
+    {
+      source: ["$(output) = vec4(",
+               "    $(func)($(input).x * kHalfPI + kHalfPI),",
+               "    $(func)($(input).y * kHalfPI),",
+               "    0,",
+               "    1);"].join("\n"),
+      generator: function(x, y, z, w) {
+        return [ sin(x * kHalfPI + kHalfPI),
+                 sin(y * kHalfPI),
+                 0,
+                 1 ];
+      },
+    },
+    {
+      source: ["$(output) = vec4(",
+               "    $(func)($(input).xy * vec2(kPI, k2PI)) * 0.5 + vec2(0.5, 0.5),",
+               "    0, 1);"].join("\n"),
+      generator: function(x, y, z, w) {
+        return [ sin(x * kPI) * 0.5 + 0.5,
+                 sin(y * k2PI) * 0.5 + 0.5,
+                 0,
+                 1 ];
+      },
+    },
+    {
+      source: ["$(output) = vec4(",
+               "    $(func)($(input).xyz * vec3(kPI, k2PI, 4.0)) * ",
+               "    0.5 + vec3(0.5, 0.5, 0.5),",
+               "    1);"].join("\n"),
+      generator: function(x, y, z, w) {
+        return [ sin(x * kPI) * 0.5 + 0.5,
+                 sin(y * k2PI) * 0.5 + 0.5,
+                 sin(z * 4.0) * 0.5 + 0.5,
+                 1 ];
+      },
+    },
+    {
+      source: ["$(output) = ",
+               "    $(func)($(input) * vec4(k2PI, 4.0, kHalfPI, kPI)) *",
+               "    0.5 + vec4(0.5, 0.5, 0.5, 1);",
+              ].join("\n"),
+      generator: function(x, y, z, w) {
+        return [ sin(x * k2PI) * 0.5 + 0.5,
+                 sin(y * 4.0) * 0.5 + 0.5,
+                 sin(z * kHalfPI) * 0.5 + 0.5,
+                 sin(w * kPI) * 0.5 + 1 ];
+      },
+    },
   ]
 });
 successfullyParsed = true;
 </script>
 </body>
 </html>
-
--- a/content/canvas/test/webgl/conformance/glsl/implicit/add_int_float.vert.html
+++ b/content/canvas/test/webgl/conformance/glsl/implicit/add_int_float.vert.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/implicit/add_int_mat2.vert.html
+++ b/content/canvas/test/webgl/conformance/glsl/implicit/add_int_mat2.vert.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/implicit/add_int_mat3.vert.html
+++ b/content/canvas/test/webgl/conformance/glsl/implicit/add_int_mat3.vert.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/implicit/add_int_mat4.vert.html
+++ b/content/canvas/test/webgl/conformance/glsl/implicit/add_int_mat4.vert.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/implicit/add_int_vec2.vert.html
+++ b/content/canvas/test/webgl/conformance/glsl/implicit/add_int_vec2.vert.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/implicit/add_int_vec3.vert.html
+++ b/content/canvas/test/webgl/conformance/glsl/implicit/add_int_vec3.vert.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/implicit/add_int_vec4.vert.html
+++ b/content/canvas/test/webgl/conformance/glsl/implicit/add_int_vec4.vert.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/implicit/add_ivec2_vec2.vert.html
+++ b/content/canvas/test/webgl/conformance/glsl/implicit/add_ivec2_vec2.vert.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/implicit/add_ivec3_vec3.vert.html
+++ b/content/canvas/test/webgl/conformance/glsl/implicit/add_ivec3_vec3.vert.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/implicit/add_ivec4_vec4.vert.html
+++ b/content/canvas/test/webgl/conformance/glsl/implicit/add_ivec4_vec4.vert.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/implicit/assign_int_to_float.vert.html
+++ b/content/canvas/test/webgl/conformance/glsl/implicit/assign_int_to_float.vert.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/implicit/assign_ivec2_to_vec2.vert.html
+++ b/content/canvas/test/webgl/conformance/glsl/implicit/assign_ivec2_to_vec2.vert.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/implicit/assign_ivec3_to_vec3.vert.html
+++ b/content/canvas/test/webgl/conformance/glsl/implicit/assign_ivec3_to_vec3.vert.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/implicit/assign_ivec4_to_vec4.vert.html
+++ b/content/canvas/test/webgl/conformance/glsl/implicit/assign_ivec4_to_vec4.vert.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/implicit/construct_struct.vert.html
+++ b/content/canvas/test/webgl/conformance/glsl/implicit/construct_struct.vert.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/implicit/divide_int_float.vert.html
+++ b/content/canvas/test/webgl/conformance/glsl/implicit/divide_int_float.vert.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/implicit/divide_int_mat2.vert.html
+++ b/content/canvas/test/webgl/conformance/glsl/implicit/divide_int_mat2.vert.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/implicit/divide_int_mat3.vert.html
+++ b/content/canvas/test/webgl/conformance/glsl/implicit/divide_int_mat3.vert.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/implicit/divide_int_mat4.vert.html
+++ b/content/canvas/test/webgl/conformance/glsl/implicit/divide_int_mat4.vert.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/implicit/divide_int_vec2.vert.html
+++ b/content/canvas/test/webgl/conformance/glsl/implicit/divide_int_vec2.vert.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/implicit/divide_int_vec3.vert.html
+++ b/content/canvas/test/webgl/conformance/glsl/implicit/divide_int_vec3.vert.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/implicit/divide_int_vec4.vert.html
+++ b/content/canvas/test/webgl/conformance/glsl/implicit/divide_int_vec4.vert.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/implicit/divide_ivec2_vec2.vert.html
+++ b/content/canvas/test/webgl/conformance/glsl/implicit/divide_ivec2_vec2.vert.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/implicit/divide_ivec3_vec3.vert.html
+++ b/content/canvas/test/webgl/conformance/glsl/implicit/divide_ivec3_vec3.vert.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/implicit/divide_ivec4_vec4.vert.html
+++ b/content/canvas/test/webgl/conformance/glsl/implicit/divide_ivec4_vec4.vert.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/implicit/equal_int_float.vert.html
+++ b/content/canvas/test/webgl/conformance/glsl/implicit/equal_int_float.vert.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/implicit/equal_ivec2_vec2.vert.html
+++ b/content/canvas/test/webgl/conformance/glsl/implicit/equal_ivec2_vec2.vert.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/implicit/equal_ivec3_vec3.vert.html
+++ b/content/canvas/test/webgl/conformance/glsl/implicit/equal_ivec3_vec3.vert.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/implicit/equal_ivec4_vec4.vert.html
+++ b/content/canvas/test/webgl/conformance/glsl/implicit/equal_ivec4_vec4.vert.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/implicit/function_int_float.vert.html
+++ b/content/canvas/test/webgl/conformance/glsl/implicit/function_int_float.vert.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/implicit/function_ivec2_vec2.vert.html
+++ b/content/canvas/test/webgl/conformance/glsl/implicit/function_ivec2_vec2.vert.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/implicit/function_ivec3_vec3.vert.html
+++ b/content/canvas/test/webgl/conformance/glsl/implicit/function_ivec3_vec3.vert.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/implicit/function_ivec4_vec4.vert.html
+++ b/content/canvas/test/webgl/conformance/glsl/implicit/function_ivec4_vec4.vert.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/implicit/greater_than.vert.html
+++ b/content/canvas/test/webgl/conformance/glsl/implicit/greater_than.vert.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/implicit/greater_than_equal.vert.html
+++ b/content/canvas/test/webgl/conformance/glsl/implicit/greater_than_equal.vert.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/implicit/less_than.vert.html
+++ b/content/canvas/test/webgl/conformance/glsl/implicit/less_than.vert.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/implicit/less_than_equal.vert.html
+++ b/content/canvas/test/webgl/conformance/glsl/implicit/less_than_equal.vert.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/implicit/multiply_int_float.vert.html
+++ b/content/canvas/test/webgl/conformance/glsl/implicit/multiply_int_float.vert.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/implicit/multiply_int_mat2.vert.html
+++ b/content/canvas/test/webgl/conformance/glsl/implicit/multiply_int_mat2.vert.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/implicit/multiply_int_mat3.vert.html
+++ b/content/canvas/test/webgl/conformance/glsl/implicit/multiply_int_mat3.vert.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/implicit/multiply_int_mat4.vert.html
+++ b/content/canvas/test/webgl/conformance/glsl/implicit/multiply_int_mat4.vert.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/implicit/multiply_int_vec2.vert.html
+++ b/content/canvas/test/webgl/conformance/glsl/implicit/multiply_int_vec2.vert.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/implicit/multiply_int_vec3.vert.html
+++ b/content/canvas/test/webgl/conformance/glsl/implicit/multiply_int_vec3.vert.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/implicit/multiply_int_vec4.vert.html
+++ b/content/canvas/test/webgl/conformance/glsl/implicit/multiply_int_vec4.vert.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/implicit/multiply_ivec2_vec2.vert.html
+++ b/content/canvas/test/webgl/conformance/glsl/implicit/multiply_ivec2_vec2.vert.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/implicit/multiply_ivec3_vec3.vert.html
+++ b/content/canvas/test/webgl/conformance/glsl/implicit/multiply_ivec3_vec3.vert.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/implicit/multiply_ivec4_vec4.vert.html
+++ b/content/canvas/test/webgl/conformance/glsl/implicit/multiply_ivec4_vec4.vert.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/implicit/not_equal_int_float.vert.html
+++ b/content/canvas/test/webgl/conformance/glsl/implicit/not_equal_int_float.vert.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/implicit/not_equal_ivec2_vec2.vert.html
+++ b/content/canvas/test/webgl/conformance/glsl/implicit/not_equal_ivec2_vec2.vert.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/implicit/not_equal_ivec3_vec3.vert.html
+++ b/content/canvas/test/webgl/conformance/glsl/implicit/not_equal_ivec3_vec3.vert.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/implicit/not_equal_ivec4_vec4.vert.html
+++ b/content/canvas/test/webgl/conformance/glsl/implicit/not_equal_ivec4_vec4.vert.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/implicit/subtract_int_float.vert.html
+++ b/content/canvas/test/webgl/conformance/glsl/implicit/subtract_int_float.vert.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/implicit/subtract_int_mat2.vert.html
+++ b/content/canvas/test/webgl/conformance/glsl/implicit/subtract_int_mat2.vert.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/implicit/subtract_int_mat3.vert.html
+++ b/content/canvas/test/webgl/conformance/glsl/implicit/subtract_int_mat3.vert.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/implicit/subtract_int_mat4.vert.html
+++ b/content/canvas/test/webgl/conformance/glsl/implicit/subtract_int_mat4.vert.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/implicit/subtract_int_vec2.vert.html
+++ b/content/canvas/test/webgl/conformance/glsl/implicit/subtract_int_vec2.vert.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/implicit/subtract_int_vec3.vert.html
+++ b/content/canvas/test/webgl/conformance/glsl/implicit/subtract_int_vec3.vert.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/implicit/subtract_int_vec4.vert.html
+++ b/content/canvas/test/webgl/conformance/glsl/implicit/subtract_int_vec4.vert.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/implicit/subtract_ivec2_vec2.vert.html
+++ b/content/canvas/test/webgl/conformance/glsl/implicit/subtract_ivec2_vec2.vert.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/implicit/subtract_ivec3_vec3.vert.html
+++ b/content/canvas/test/webgl/conformance/glsl/implicit/subtract_ivec3_vec3.vert.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/implicit/subtract_ivec4_vec4.vert.html
+++ b/content/canvas/test/webgl/conformance/glsl/implicit/subtract_ivec4_vec4.vert.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/implicit/ternary_int_float.vert.html
+++ b/content/canvas/test/webgl/conformance/glsl/implicit/ternary_int_float.vert.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/implicit/ternary_ivec2_vec2.vert.html
+++ b/content/canvas/test/webgl/conformance/glsl/implicit/ternary_ivec2_vec2.vert.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/implicit/ternary_ivec3_vec3.vert.html
+++ b/content/canvas/test/webgl/conformance/glsl/implicit/ternary_ivec3_vec3.vert.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/implicit/ternary_ivec4_vec4.vert.html
+++ b/content/canvas/test/webgl/conformance/glsl/implicit/ternary_ivec4_vec4.vert.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/misc/00_test_list.txt
+++ b/content/canvas/test/webgl/conformance/glsl/misc/00_test_list.txt
@@ -1,17 +1,18 @@
 attrib-location-length-limits.html
 embedded-struct-definitions-forbidden.html
 # this test is intentionally disabled as it is too strict and to hard to simulate
 # glsl-2types-of-textures-on-same-unit.html
 glsl-function-nodes.html
+--min-version 1.0.2 glsl-vertex-branch.html
 glsl-long-variable-names.html
 non-ascii-comments.vert.html
 non-ascii.vert.html
-
+--min-version 1.0.2 re-compile-re-link.html
 shader-with-256-character-identifier.frag.html
 shader-with-257-character-identifier.frag.html
 shader-with-_webgl-identifier.vert.html
 shader-with-arbitrary-indexing.frag.html
 shader-with-arbitrary-indexing.vert.html
 shader-with-attrib-array.vert.html
 shader-with-attrib-struct.vert.html
 shader-with-clipvertex.vert.html
@@ -26,16 +27,18 @@ shader-with-error-directive.html
 shader-with-explicit-int-cast.vert.html
 shader-with-float-return-value.frag.html
 --min-version 1.0.2 shader-with-for-scoping.html
 --min-version 1.0.2 shader-with-for-loop.html
 shader-with-frag-depth.frag.html
 shader-with-function-recursion.frag.html
 --min-version 1.0.2 shader-with-function-scoped-struct.html
 --min-version 1.0.2 shader-with-functional-scoping.html
+--min-version 1.0.2 shader-with-comma-assignment.html
+--min-version 1.0.2 shader-with-comma-conditional-assignment.html
 shader-with-glcolor.vert.html
 shader-with-gles-1.frag.html
 shader-with-gles-symbol.frag.html
 shader-with-glprojectionmatrix.vert.html
 shader-with-implicit-vec3-to-vec4-cast.vert.html
 shader-with-include.vert.html
 shader-with-int-return-value.frag.html
 shader-with-invalid-identifier.frag.html
--- a/content/canvas/test/webgl/conformance/glsl/misc/attrib-location-length-limits.html
+++ b/content/canvas/test/webgl/conformance/glsl/misc/attrib-location-length-limits.html
@@ -1,14 +1,15 @@
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL attrib location length tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test.js"> </script>
 <script src="../../resources/webgl-test-utils.js"> </script>
 </head>
 <body>
 <canvas id="example" width="50" height="50">
 There is supposed to be an example drawing here, but it's not important.
 </canvas>
@@ -41,17 +42,17 @@ void main() {
 </script>
 <script>
 if (window.initNonKhronosFramework) {
     window.initNonKhronosFramework(false);
 }
 description("test attrib location length limit");
 
 var wtu = WebGLTestUtils;
-var gl = wtu.create3DContext(document.getElementById("example"));
+var gl = wtu.create3DContext("example");
 
 debug("Test attrib location underneath the length limit");
 var program = wtu.loadProgramFromScript(gl, "goodVertexShader", "fragmentShader");
 shouldBe('gl.getProgramParameter(program, gl.LINK_STATUS)', 'true');
 var attribLoc = gl.getAttribLocation(program, "vPosition0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456");
 if (attribLoc == -1) {
     testFailed("attrib location was -1, should not be");
 } else {
--- a/content/canvas/test/webgl/conformance/glsl/misc/embedded-struct-definitions-forbidden.html
+++ b/content/canvas/test/webgl/conformance/glsl/misc/embedded-struct-definitions-forbidden.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/misc/glsl-function-nodes.html
+++ b/content/canvas/test/webgl/conformance/glsl/misc/glsl-function-nodes.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
  -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>GLSL function nodes Test</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test.js"> </script>
 <script src="../../resources/webgl-test-utils.js"> </script>
 
 <script id="vshaderFunction", type="x-shader/x-vertex">
 attribute vec4 aPosition;
 varying vec4 vColor;
 
--- a/content/canvas/test/webgl/conformance/glsl/misc/glsl-long-variable-names.html
+++ b/content/canvas/test/webgl/conformance/glsl/misc/glsl-long-variable-names.html
@@ -10,17 +10,17 @@
 <body>
     <canvas id="example" width="50" height="50">
     There is supposed to be an example drawing here, but it's not important.
     </canvas>
     <div id="description"></div>
     <div id="console"></div>
     <script id="vshader_shared_uniform" type="x-shader/x-vertex">
         attribute vec3 vPosition;
-        uniform float value01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890;
+        uniform mediump float value01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890;
         void main()
         {
             gl_Position = vec4(vPosition, value01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890);
         }
     </script>
 
     <script id="fshader_shared_uniform" type="x-shader/x-fragment">
         precision mediump float;
new file mode 100644
--- /dev/null
+++ b/content/canvas/test/webgl/conformance/glsl/misc/glsl-vertex-branch.html
@@ -0,0 +1,130 @@
+<!--
+Copyright (c) 2011 The Chromium Authors. All rights reserved.
+Use of this source code is governed by a BSD-style license that can be
+found in the LICENSE file.
+ -->
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>GLSL function nodes Test</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test.js"> </script>
+<script src="../../resources/webgl-test-utils.js"> </script>
+
+<script id="vshaderNoBranch", type="x-shader/x-vertex">
+attribute vec3 aPosition;
+uniform float redIntensity;
+
+varying vec4 vColor;
+
+float MADBug(float paramValue) {
+  float localVar = 1.0;
+  return 0.25 * ceil(localVar) + paramValue;
+}
+
+void main(void) {
+    gl_Position = vec4(aPosition, 1.0);
+    vColor = vec4(MADBug(redIntensity), 0., 0., 1.);
+}
+</script>
+
+<script id="vshaderBranch", type="x-shader/x-vertex">
+attribute vec3 aPosition;
+uniform float redIntensity;
+
+varying vec4 vColor;
+
+float MADBug(float paramValue) {
+  float localVar = 1.0;
+  return 0.25 * ceil(localVar) + paramValue;
+}
+
+void main(void) {
+    float condition = 42.;
+    if (condition == 0.) {}
+    gl_Position = vec4(aPosition, 1.0);
+    vColor = vec4(MADBug(redIntensity), 0., 0., 1.);
+}
+</script>
+
+<script id="fshader", type="x-shader/x-fragment">
+#if defined(GL_ES)
+precision mediump float;
+#endif
+varying vec4 vColor;
+void main()
+{
+   gl_FragColor = vColor;
+}
+</script>
+</head>
+<body>
+<canvas id="canvasNoBranch" width="50" height="50"></canvas>
+<canvas id="canvasBranch" width="50" height="50"></canvas>
+<div id="description">This tests against a Mac driver bug related to branches
+ inside of Vertex Shaders.</div>
+<div id="console"></div>
+<script>
+var width = 50;
+var height = 50;
+
+function drawAndRead(canvasID, vshaderID, buffer)
+{
+    var gl = initWebGL(canvasID, vshaderID, "fshader", ["aPosition"], [0, 0, 0, 1], 1);
+    var vertexObject = gl.createBuffer();
+    gl.bindBuffer(gl.ARRAY_BUFFER, vertexObject);
+    gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([ 0,0.5,0, -1,-1,0, 1,-1,0 ]), gl.STATIC_DRAW);
+    gl.enableVertexAttribArray(0);
+    gl.vertexAttribPointer(0, 3, gl.FLOAT, false, 0, 0);
+
+    var loc = gl.getUniformLocation(gl.program, "redIntensity");
+    gl.uniform1f(loc, 0.75);
+    gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+    gl.drawArrays(gl.TRIANGLES, 0, 3);
+    gl.readPixels(0, 0, width, height, gl.RGBA, gl.UNSIGNED_BYTE, buffer);
+    if (gl.getError() != gl.NO_ERROR)
+        return false;
+    return true;
+}
+
+function compareRendering(buffer1, buffer2, tol)
+{
+    for (var i = 0; i < width * height * 4; ++i) {
+        if (Math.abs(buffer1[i] - buffer2[i]) > tol)
+            return false;
+    }
+    return true;
+}
+
+function init()
+{
+    if (window.initNonKhronosFramework) {
+        window.initNonKhronosFramework(false);
+    }
+
+    description("tests vertex shader with branch");
+
+    var bufBranch = new Uint8Array(width * height * 4);
+    var bufNoBranch = new Uint8Array(width * height * 4);
+
+    if (drawAndRead("canvasBranch", "vshaderBranch", bufBranch) == false ||
+        drawAndRead("canvasNoBranch", "vshaderNoBranch", bufNoBranch) == false) {
+        testFailed("Setup failed");
+    } else {
+        if (compareRendering(bufBranch, bufNoBranch, 4) == false)
+            testFailed("Rendering results are different");
+        else
+            testPassed("Rendering results are the same");
+    }
+}
+
+init();
+successfullyParsed = true;
+</script>
+<script src="../../../resources/js-test-post.js"></script>
+</body>
+</html>
+
--- a/content/canvas/test/webgl/conformance/glsl/misc/non-ascii-comments.vert.html
+++ b/content/canvas/test/webgl/conformance/glsl/misc/non-ascii-comments.vert.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/misc/non-ascii.vert.html
+++ b/content/canvas/test/webgl/conformance/glsl/misc/non-ascii.vert.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
new file mode 100644
--- /dev/null
+++ b/content/canvas/test/webgl/conformance/glsl/misc/re-compile-re-link.html
@@ -0,0 +1,151 @@
+<!--
+Copyright (c) 2012 The Chromium Authors. All rights reserved.
+Use of this source code is governed by a BSD-style license that can be
+found in the LICENSE file.
+ -->
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL Re-Compile and Re-link Shader conformance test.</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test.js"> </script>
+<script src="../../resources/webgl-test-utils.js"> </script>
+</head>
+<body>
+<canvas id="example" width="4" height="4" style="width: 40px; height: 30px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vshader" type="x-shader/x-vertex">
+attribute float column;
+attribute float height;
+uniform float position;
+void main() {
+  gl_Position = vec4(mod(column - position, 1.0) * 2.0 - 1.0, height, 0, 1);
+}
+</script>
+
+<script id="fshader1" type="x-shader/x-fragment">
+precision mediump float;
+void main() {
+  gl_FragColor = vec4(1,0,0,1);
+}
+</script>
+<script id="fshader2" type="x-shader/x-fragment">
+precision mediump float;
+uniform float foobar;
+void main() {
+  gl_FragColor = vec4(1,0,foobar,1);
+}
+</script>
+<script id="vshaderB" type="not-js">
+attribute vec2 position;
+varying vec2 v_texCoord;
+void main() {
+  gl_Position = vec4(position, 0, 1);
+  v_texCoord = vec2(position * 0.5 + 0.5);
+}
+</script>
+<script id="fshaderB" type="not-js">
+precision mediump float;
+varying vec2 v_texCoord;
+uniform sampler2D tex;
+void main() {
+  gl_FragColor = texture2D(tex, v_texCoord);
+}
+</script>
+
+<script>
+description(document.title);
+var wtu = WebGLTestUtils;
+var gl = wtu.create3DContext("example");
+
+var vsSource = document.getElementById("vshader").text;
+var fs1Source = document.getElementById("fshader1").text;
+var fs2Source = document.getElementById("fshader2").text;
+
+var vsSourceB = document.getElementById("vshaderB").text;
+var fsSourceB = document.getElementById("fshaderB").text;
+
+var vShader = gl.createShader(gl.VERTEX_SHADER);
+var fShader = gl.createShader(gl.FRAGMENT_SHADER);
+
+var vShaderB = gl.createShader(gl.VERTEX_SHADER);
+var fShaderB = gl.createShader(gl.FRAGMENT_SHADER);
+
+var program = gl.createProgram();
+var programB = gl.createProgram();
+
+gl.attachShader(program, vShader);
+gl.attachShader(program, fShader);
+
+gl.attachShader(programB, vShaderB);
+gl.attachShader(programB, fShaderB);
+
+var success;
+var shader;
+
+function checkShaderStatus(s) {
+  shader = s;
+  shouldBeTrue("success = gl.getShaderParameter(shader, gl.COMPILE_STATUS)");
+  if (!success) {
+    debug("error: " + gl.getShaderInfoLog());
+  }
+}
+
+var prg;
+function checkProgramStatus(p) {
+  prg = p;
+  shouldBeTrue("success = gl.getProgramParameter(prg, gl.LINK_STATUS)");
+  if (!success) {
+    debug("error: " + gl.getProgramInfoLog(prg));
+  }
+}
+
+for (var i = 0; i < 10; ++i) {
+  gl.shaderSource(vShader, vsSource);
+  gl.compileShader(vShader);
+  checkShaderStatus(vShader)
+  gl.shaderSource(fShader, fs1Source);
+  gl.compileShader(fShader);
+  checkShaderStatus(fShader)
+
+  gl.linkProgram(program);
+  checkProgramStatus(program)
+  gl.useProgram(program);
+
+  gl.shaderSource(vShaderB, vsSourceB);
+  gl.compileShader(vShaderB);
+  checkShaderStatus(vShaderB)
+  gl.shaderSource(fShaderB, fsSourceB);
+  gl.compileShader(fShaderB);
+  checkShaderStatus(fShaderB)
+
+  gl.linkProgram(programB);
+  checkProgramStatus(programB)
+
+  gl.useProgram(programB);
+}
+
+for (var i = 0; i < 10; ++i) {
+  // Now change the fragment shader
+  gl.shaderSource(fShader, fs2Source);
+  gl.compileShader(fShader);
+  checkShaderStatus(fShader)
+
+  // And re-link
+  gl.linkProgram(program);
+  checkProgramStatus(program)
+}
+
+glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors");
+
+successfullyParsed = true;
+</script>
+<script src="../../../resources/js-test-post.js"></script>
+
+</body>
+</html>
+
+
--- a/content/canvas/test/webgl/conformance/glsl/misc/shader-with-256-character-identifier.frag.html
+++ b/content/canvas/test/webgl/conformance/glsl/misc/shader-with-256-character-identifier.frag.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="fragmentShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/misc/shader-with-257-character-identifier.frag.html
+++ b/content/canvas/test/webgl/conformance/glsl/misc/shader-with-257-character-identifier.frag.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="fragmentShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/misc/shader-with-_webgl-identifier.vert.html
+++ b/content/canvas/test/webgl/conformance/glsl/misc/shader-with-_webgl-identifier.vert.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/misc/shader-with-arbitrary-indexing.frag.html
+++ b/content/canvas/test/webgl/conformance/glsl/misc/shader-with-arbitrary-indexing.frag.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="fragmentShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/misc/shader-with-arbitrary-indexing.vert.html
+++ b/content/canvas/test/webgl/conformance/glsl/misc/shader-with-arbitrary-indexing.vert.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/misc/shader-with-attrib-array.vert.html
+++ b/content/canvas/test/webgl/conformance/glsl/misc/shader-with-attrib-array.vert.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/misc/shader-with-attrib-struct.vert.html
+++ b/content/canvas/test/webgl/conformance/glsl/misc/shader-with-attrib-struct.vert.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/misc/shader-with-clipvertex.vert.html
+++ b/content/canvas/test/webgl/conformance/glsl/misc/shader-with-clipvertex.vert.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
new file mode 100644
--- /dev/null
+++ b/content/canvas/test/webgl/conformance/glsl/misc/shader-with-comma-assignment.html
@@ -0,0 +1,41 @@
+<!--
+Copyright (c) 2011 The Chromium Authors. All rights reserved.
+Use of this source code is governed by a BSD-style license that can be
+found in the LICENSE file.
+-->
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="fragmentShader" type="text/something-not-javascript">
+// fragment shader with comma assignment should succeed
+precision mediump float;
+void main() {
+  float a = 0.0;
+  float b = 0.0;
+  float c = 0.0;
+  float d = 0.0;
+  a = 1.1, b = 3.1;
+  c = 2.1, d = 4.1;
+  // Output green if successful, red if not.
+  gl_FragColor = ((a + b + c + d > 10.0) ? vec4(0,1,0,1) : vec4(1,0,0,1));
+}
+</script>
+<script>
+GLSLConformanceTester.runRenderTest();
+successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
new file mode 100644
--- /dev/null
+++ b/content/canvas/test/webgl/conformance/glsl/misc/shader-with-comma-conditional-assignment.html
@@ -0,0 +1,200 @@
+<!--
+Copyright (c) 2011 The Chromium Authors. All rights reserved.
+Use of this source code is governed by a BSD-style license that can be
+found in the LICENSE file.
+-->
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="fragmentShaderAGreaterThanBCheckR" type="text/something-not-javascript">
+// fragment shader with for scoping should succeed
+precision mediump float;
+void main() {
+  float a = 3.0;
+  float b = 2.0;
+  float r = 0.0;
+  float r0 = 0.5;
+  float r1 = 1.0;
+  float ab = a > b ? (r = r0, a) : (r = r1, b);
+  // Output green if successful, red if not.
+  gl_FragColor = ((r == r0) ? vec4(0,1,0,1) : vec4(1,0,0,1));
+}
+</script>
+<script id="fragmentShaderAGreaterThanBCheckAB" type="text/something-not-javascript">
+// fragment shader with for scoping should succeed
+precision mediump float;
+void main() {
+  float a = 3.0;
+  float b = 2.0;
+  float r = 0.0;
+  float r0 = 0.5;
+  float r1 = 1.0;
+  float ab = a > b ? (r = r0, a) : (r = r1, b);
+  // Output green if successful, red if not.
+  gl_FragColor = ((ab == a) ? vec4(0,1,0,1) : vec4(1,0,0,1));
+}
+</script>
+<script id="fragmentShaderAGreaterThanBCheckT0" type="text/something-not-javascript">
+// fragment shader with for scoping should succeed
+precision mediump float;
+void main() {
+  float a = 3.0;
+  float b = 2.0;
+  float t0 = 0.0;
+  float t1 = 0.0;
+  float r0 = 0.5;
+  float r1 = 1.0;
+  float ab = a > b ? (t0 = r0, a) : (t1 = r1, b);
+  // Output green if successful, red if not.
+  gl_FragColor = ((t0 == r0) ? vec4(0,1,0,1) : vec4(1,0,0,1));
+}
+</script>
+<script id="fragmentShaderAGreaterThanBCheckT1" type="text/something-not-javascript">
+// fragment shader with for scoping should succeed
+precision mediump float;
+void main() {
+  float a = 3.0;
+  float b = 2.0;
+  float t0 = 0.0;
+  float t1 = 0.0;
+  float r0 = 0.5;
+  float r1 = 1.0;
+  float ab = a > b ? (t0 = r0, a) : (t1 = r1, b);
+  // Output green if successful, red if not.
+  gl_FragColor = ((t1 == 0.0) ? vec4(0,1,0,1) : vec4(1,0,0,1));
+}
+</script>
+<script id="fragmentShaderBGreaterThanACheckR" type="text/something-not-javascript">
+// fragment shader with for scoping should succeed
+precision mediump float;
+void main() {
+  float a = 2.0;
+  float b = 3.0;
+  float r = 0.0;
+  float r0 = 0.5;
+  float r1 = 1.0;
+  float ab = a > b ? (r = r0, a) : (r = r1, b);
+  // Output green if successful, red if not.
+  gl_FragColor = ((r == r1) ? vec4(0,1,0,1) : vec4(1,0,0,1));
+}
+</script>
+<script id="fragmentShaderBGreaterThanACheckAB" type="text/something-not-javascript">
+// fragment shader with for scoping should succeed
+precision mediump float;
+void main() {
+  float a = 2.0;
+  float b = 3.0;
+  float r = 0.0;
+  float r0 = 0.5;
+  float r1 = 1.0;
+  float ab = a > b ? (r = r0, a) : (r = r1, b);
+  // Output green if successful, red if not.
+  gl_FragColor = ((ab == b) ? vec4(0,1,0,1) : vec4(1,0,0,1));
+}
+</script>
+<script id="fragmentShaderBGreaterThanACheckT0" type="text/something-not-javascript">
+// fragment shader with for scoping should succeed
+precision mediump float;
+void main() {
+  float a = 2.0;
+  float b = 3.0;
+  float t0 = 0.0;
+  float t1 = 0.0;
+  float r0 = 0.5;
+  float r1 = 1.0;
+  float ab = a > b ? (t0 = r0, a) : (t1 = r1, b);
+  // Output green if successful, red if not.
+  gl_FragColor = ((t0 == 0.0) ? vec4(0,1,0,1) : vec4(1,0,0,1));
+}
+</script>
+<script id="fragmentShaderBGreaterThanACheckT1" type="text/something-not-javascript">
+// fragment shader with for scoping should succeed
+precision mediump float;
+void main() {
+  float a = 2.0;
+  float b = 3.0;
+  float t0 = 0.0;
+  float t1 = 0.0;
+  float r0 = 0.5;
+  float r1 = 1.0;
+  float ab = a > b ? (t0 = r0, a) : (t1 = r1, b);
+  // Output green if successful, red if not.
+  gl_FragColor = ((t1 == r1) ? vec4(0,1,0,1) : vec4(1,0,0,1));
+}
+</script>
+<script>
+GLSLConformanceTester.runRenderTests([
+{ vShaderId: undefined,
+  vShaderSuccess: true,
+  fShaderId: 'fragmentShaderAGreaterThanBCheckR',
+  fShaderSuccess: true,
+  linkSuccess: true,
+  passMsg: "comma based conditional assignment works",
+},
+{ vShaderId: undefined,
+  vShaderSuccess: true,
+  fShaderId: 'fragmentShaderAGreaterThanBCheckAB',
+  fShaderSuccess: true,
+  linkSuccess: true,
+  passMsg: "comma based conditional assignment works",
+},
+{ vShaderId: undefined,
+  vShaderSuccess: true,
+  fShaderId: 'fragmentShaderAGreaterThanBCheckT0',
+  fShaderSuccess: true,
+  linkSuccess: true,
+  passMsg: "comma based conditional assignment works",
+},
+{ vShaderId: undefined,
+  vShaderSuccess: true,
+  fShaderId: 'fragmentShaderAGreaterThanBCheckT1',
+  fShaderSuccess: true,
+  linkSuccess: true,
+  passMsg: "comma based conditional assignment works",
+},
+{ vShaderId: undefined,
+  vShaderSuccess: true,
+  fShaderId: 'fragmentShaderBGreaterThanACheckR',
+  fShaderSuccess: true,
+  linkSuccess: true,
+  passMsg: "comma based conditional assignment works",
+},
+{ vShaderId: undefined,
+  vShaderSuccess: true,
+  fShaderId: 'fragmentShaderBGreaterThanACheckAB',
+  fShaderSuccess: true,
+  linkSuccess: true,
+  passMsg: "comma based conditional assignment works",
+},
+{ vShaderId: undefined,
+  vShaderSuccess: true,
+  fShaderId: 'fragmentShaderBGreaterThanACheckT0',
+  fShaderSuccess: true,
+  linkSuccess: true,
+  passMsg: "comma based conditional assignment works",
+},
+{ vShaderId: undefined,
+  vShaderSuccess: true,
+  fShaderId: 'fragmentShaderBGreaterThanACheckT1',
+  fShaderSuccess: true,
+  linkSuccess: true,
+  passMsg: "comma based conditional assignment works",
+}
+]);
+successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
--- a/content/canvas/test/webgl/conformance/glsl/misc/shader-with-conditional-scoping.html
+++ b/content/canvas/test/webgl/conformance/glsl/misc/shader-with-conditional-scoping.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="fragmentShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/misc/shader-with-default-precision.frag.html
+++ b/content/canvas/test/webgl/conformance/glsl/misc/shader-with-default-precision.frag.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="fragmentShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/misc/shader-with-default-precision.vert.html
+++ b/content/canvas/test/webgl/conformance/glsl/misc/shader-with-default-precision.vert.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/misc/shader-with-define-line-continuation.frag.html
+++ b/content/canvas/test/webgl/conformance/glsl/misc/shader-with-define-line-continuation.frag.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="fragmentShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/misc/shader-with-dfdx-no-ext.frag.html
+++ b/content/canvas/test/webgl/conformance/glsl/misc/shader-with-dfdx-no-ext.frag.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="fragmentShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/misc/shader-with-dfdx.frag.html
+++ b/content/canvas/test/webgl/conformance/glsl/misc/shader-with-dfdx.frag.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="fragmentShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/misc/shader-with-do-scoping.html
+++ b/content/canvas/test/webgl/conformance/glsl/misc/shader-with-do-scoping.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="fragmentShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/misc/shader-with-error-directive.html
+++ b/content/canvas/test/webgl/conformance/glsl/misc/shader-with-error-directive.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/desktop-gl-constants.js" type="text/javascript"></script>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
--- a/content/canvas/test/webgl/conformance/glsl/misc/shader-with-explicit-int-cast.vert.html
+++ b/content/canvas/test/webgl/conformance/glsl/misc/shader-with-explicit-int-cast.vert.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/misc/shader-with-float-return-value.frag.html
+++ b/content/canvas/test/webgl/conformance/glsl/misc/shader-with-float-return-value.frag.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="fragmentShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/misc/shader-with-for-loop.html
+++ b/content/canvas/test/webgl/conformance/glsl/misc/shader-with-for-loop.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="fragmentShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/misc/shader-with-for-scoping.html
+++ b/content/canvas/test/webgl/conformance/glsl/misc/shader-with-for-scoping.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="fragmentShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/misc/shader-with-frag-depth.frag.html
+++ b/content/canvas/test/webgl/conformance/glsl/misc/shader-with-frag-depth.frag.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="fragmentShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/misc/shader-with-function-recursion.frag.html
+++ b/content/canvas/test/webgl/conformance/glsl/misc/shader-with-function-recursion.frag.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="fragmentShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/misc/shader-with-function-scoped-struct.html
+++ b/content/canvas/test/webgl/conformance/glsl/misc/shader-with-function-scoped-struct.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="fragmentShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/misc/shader-with-functional-scoping.html
+++ b/content/canvas/test/webgl/conformance/glsl/misc/shader-with-functional-scoping.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="fragmentShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/misc/shader-with-glcolor.vert.html
+++ b/content/canvas/test/webgl/conformance/glsl/misc/shader-with-glcolor.vert.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/misc/shader-with-gles-1.frag.html
+++ b/content/canvas/test/webgl/conformance/glsl/misc/shader-with-gles-1.frag.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="fragmentShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/misc/shader-with-gles-symbol.frag.html
+++ b/content/canvas/test/webgl/conformance/glsl/misc/shader-with-gles-symbol.frag.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="fragmentShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/misc/shader-with-glprojectionmatrix.vert.html
+++ b/content/canvas/test/webgl/conformance/glsl/misc/shader-with-glprojectionmatrix.vert.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/misc/shader-with-hex-int-constant-macro.html
+++ b/content/canvas/test/webgl/conformance/glsl/misc/shader-with-hex-int-constant-macro.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/misc/shader-with-implicit-vec3-to-vec4-cast.vert.html
+++ b/content/canvas/test/webgl/conformance/glsl/misc/shader-with-implicit-vec3-to-vec4-cast.vert.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/misc/shader-with-include.vert.html
+++ b/content/canvas/test/webgl/conformance/glsl/misc/shader-with-include.vert.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/misc/shader-with-int-return-value.frag.html
+++ b/content/canvas/test/webgl/conformance/glsl/misc/shader-with-int-return-value.frag.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="fragmentShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/misc/shader-with-invalid-identifier.frag.html
+++ b/content/canvas/test/webgl/conformance/glsl/misc/shader-with-invalid-identifier.frag.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="fragmentShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/misc/shader-with-ivec2-return-value.frag.html
+++ b/content/canvas/test/webgl/conformance/glsl/misc/shader-with-ivec2-return-value.frag.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="fragmentShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/misc/shader-with-ivec3-return-value.frag.html
+++ b/content/canvas/test/webgl/conformance/glsl/misc/shader-with-ivec3-return-value.frag.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="fragmentShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/misc/shader-with-ivec4-return-value.frag.html
+++ b/content/canvas/test/webgl/conformance/glsl/misc/shader-with-ivec4-return-value.frag.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="fragmentShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/misc/shader-with-limited-indexing.frag.html
+++ b/content/canvas/test/webgl/conformance/glsl/misc/shader-with-limited-indexing.frag.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/misc/shader-with-line-directive.html
+++ b/content/canvas/test/webgl/conformance/glsl/misc/shader-with-line-directive.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/desktop-gl-constants.js" type="text/javascript"></script>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
--- a/content/canvas/test/webgl/conformance/glsl/misc/shader-with-long-line.html
+++ b/content/canvas/test/webgl/conformance/glsl/misc/shader-with-long-line.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/desktop-gl-constants.js" type="text/javascript"></script>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
--- a/content/canvas/test/webgl/conformance/glsl/misc/shader-with-non-ascii-error.frag.html
+++ b/content/canvas/test/webgl/conformance/glsl/misc/shader-with-non-ascii-error.frag.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="fragmentShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/misc/shader-with-precision.frag.html
+++ b/content/canvas/test/webgl/conformance/glsl/misc/shader-with-precision.frag.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="fragmentShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/misc/shader-with-quoted-error.frag.html
+++ b/content/canvas/test/webgl/conformance/glsl/misc/shader-with-quoted-error.frag.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="fragmentShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/misc/shader-with-undefined-preprocessor-symbol.frag.html
+++ b/content/canvas/test/webgl/conformance/glsl/misc/shader-with-undefined-preprocessor-symbol.frag.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="fragmentShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/misc/shader-with-uniform-in-loop-condition.vert.html
+++ b/content/canvas/test/webgl/conformance/glsl/misc/shader-with-uniform-in-loop-condition.vert.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/misc/shader-with-vec2-return-value.frag.html
+++ b/content/canvas/test/webgl/conformance/glsl/misc/shader-with-vec2-return-value.frag.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="fragmentShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/misc/shader-with-vec3-return-value.frag.html
+++ b/content/canvas/test/webgl/conformance/glsl/misc/shader-with-vec3-return-value.frag.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="fragmentShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/misc/shader-with-vec4-return-value.frag.html
+++ b/content/canvas/test/webgl/conformance/glsl/misc/shader-with-vec4-return-value.frag.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="fragmentShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/misc/shader-with-vec4-vec3-vec4-conditional.html
+++ b/content/canvas/test/webgl/conformance/glsl/misc/shader-with-vec4-vec3-vec4-conditional.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="fragmentShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/misc/shader-with-version-100.frag.html
+++ b/content/canvas/test/webgl/conformance/glsl/misc/shader-with-version-100.frag.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="fragmentShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/misc/shader-with-version-100.vert.html
+++ b/content/canvas/test/webgl/conformance/glsl/misc/shader-with-version-100.vert.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/misc/shader-with-version-120.vert.html
+++ b/content/canvas/test/webgl/conformance/glsl/misc/shader-with-version-120.vert.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/misc/shader-with-version-130.vert.html
+++ b/content/canvas/test/webgl/conformance/glsl/misc/shader-with-version-130.vert.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/misc/shader-with-webgl-identifier.vert.html
+++ b/content/canvas/test/webgl/conformance/glsl/misc/shader-with-webgl-identifier.vert.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/misc/shader-without-precision.frag.html
+++ b/content/canvas/test/webgl/conformance/glsl/misc/shader-without-precision.frag.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="fragmentShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/misc/shared.html
+++ b/content/canvas/test/webgl/conformance/glsl/misc/shared.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="sharedVertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/misc/struct-nesting-exceeds-maximum.html
+++ b/content/canvas/test/webgl/conformance/glsl/misc/struct-nesting-exceeds-maximum.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/misc/struct-nesting-under-maximum.html
+++ b/content/canvas/test/webgl/conformance/glsl/misc/struct-nesting-under-maximum.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/misc/uniform-location-length-limits.html
+++ b/content/canvas/test/webgl/conformance/glsl/misc/uniform-location-length-limits.html
@@ -1,14 +1,15 @@
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL uniform location length tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test.js"> </script>
 <script src="../../resources/webgl-test-utils.js"> </script>
 </head>
 <body>
 <canvas id="example" width="50" height="50">
 There is supposed to be an example drawing here, but it's not important.
 </canvas>
@@ -55,17 +56,17 @@ void main() {
 }
 </script>
 <script>
 if (window.initNonKhronosFramework) {
     window.initNonKhronosFramework(false);
 }
 
 var wtu = WebGLTestUtils;
-var gl = wtu.create3DContext(document.getElementById("example"));
+var gl = wtu.create3DContext("example");
 
 debug("Test uniform location underneath the length limit");
 var program = wtu.loadProgramFromScript(gl, "goodVertexShader", "fragmentShader");
 shouldBe('gl.getProgramParameter(program, gl.LINK_STATUS)', 'true');
 var uniformLoc = gl.getUniformLocation(program, "identifier128CharactersLong_0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789.identifier64CharactersLong_0123456789012345678901234567890123456.identifier62CharactersLong_01234567890123456789012345678901234");
 shouldBeNonNull('uniformLoc');
 wtu.glErrorShouldBe(gl, gl.NONE);
 
--- a/content/canvas/test/webgl/conformance/glsl/reserved/_webgl_field.vert.html
+++ b/content/canvas/test/webgl/conformance/glsl/reserved/_webgl_field.vert.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/reserved/_webgl_function.vert.html
+++ b/content/canvas/test/webgl/conformance/glsl/reserved/_webgl_function.vert.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/reserved/_webgl_struct.vert.html
+++ b/content/canvas/test/webgl/conformance/glsl/reserved/_webgl_struct.vert.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/reserved/_webgl_variable.vert.html
+++ b/content/canvas/test/webgl/conformance/glsl/reserved/_webgl_variable.vert.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/reserved/webgl_field.vert.html
+++ b/content/canvas/test/webgl/conformance/glsl/reserved/webgl_field.vert.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/reserved/webgl_function.vert.html
+++ b/content/canvas/test/webgl/conformance/glsl/reserved/webgl_function.vert.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/reserved/webgl_struct.vert.html
+++ b/content/canvas/test/webgl/conformance/glsl/reserved/webgl_struct.vert.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/reserved/webgl_variable.vert.html
+++ b/content/canvas/test/webgl/conformance/glsl/reserved/webgl_variable.vert.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
 -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL GLSL Conformance Tests</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test-utils.js"></script>
 <script src="../../resources/glsl-conformance-test.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <script id="vertexShader" type="text/something-not-javascript">
--- a/content/canvas/test/webgl/conformance/glsl/samplers/glsl-function-texture2d-bias.html
+++ b/content/canvas/test/webgl/conformance/glsl/samplers/glsl-function-texture2d-bias.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
  -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL texture2D GLSL conformance test.</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test.js"> </script>
 <script src="../../resources/webgl-test-utils.js"> </script>
 </head>
 <body>
 <canvas id="example" width="256" height="256" style="width: 16px; height: 16px;"></canvas>
 <div id="description"></div>
 <div id="console"></div>
@@ -21,17 +22,17 @@ found in the LICENSE file.
 attribute vec4 vPosition;
 attribute vec2 texCoord0;
 varying vec2 texCoord;
 void main() {
     gl_Position = vPosition;
     texCoord = texCoord0;
 }
 </script>
-<script id="fshader2d" type="x-shader/x-vertex">
+<script id="fshader2d" type="x-shader/x-fragment">
 precision mediump float;
 uniform sampler2D tex;
 uniform float bias;
 varying vec2 texCoord;
 void main() {
     gl_FragData[0] = texture2D(tex, texCoord, bias);
 }
 </script>
@@ -41,20 +42,17 @@ description("tests GLSL texture2D functi
 var wtu = WebGLTestUtils;
 var canvas = document.getElementById("example");
 
 shouldBe("canvas.width", "256");
 shouldBe("canvas.height", "256");
 
 var gl = wtu.create3DContext(canvas);
 var program = wtu.setupProgram(
-    gl,
-    [wtu.loadShaderFromScript(gl, 'vshader2d', gl.VERTEX_SHADER),
-     wtu.loadShaderFromScript(gl, 'fshader2d', gl.FRAGMENT_SHADER)],
-    ['vPosition', 'texCoord0'], [0, 1]);
+    gl, ['vshader2d', 'fshader2d'], ['vPosition', 'texCoord0'], [0, 1]);
 wtu.setupUnitQuad(gl, 0, 1);
 
 var colors = [
   {name: 'red', color:[255, 0, 0, 255]},
   {name: 'green', color:[0, 255, 0, 255]},
   {name: 'blue', color:[0, 0, 255, 255]},
   {name: 'yellow', color:[255, 255, 0, 255]},
   {name: 'magenta', color:[255, 0, 255, 255]},
--- a/content/canvas/test/webgl/conformance/glsl/samplers/glsl-function-texture2dlod.html
+++ b/content/canvas/test/webgl/conformance/glsl/samplers/glsl-function-texture2dlod.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
  -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL texture2D GLSL conformance test.</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test.js"> </script>
 <script src="../../resources/webgl-test-utils.js"> </script>
 </head>
 <body>
 <canvas id="example" width="256" height="256" style="width: 16px; height: 16px;"></canvas>
 <div id="description"></div>
 <div id="console"></div>
@@ -41,20 +42,17 @@ description("tests GLSL texture2DLod fun
 var wtu = WebGLTestUtils;
 var canvas = document.getElementById("example");
 
 shouldBe("canvas.width", "256");
 shouldBe("canvas.height", "256");
 
 var gl = wtu.create3DContext(canvas);
 var program = wtu.setupProgram(
-    gl,
-    [wtu.loadShaderFromScript(gl, 'vshader2d', gl.VERTEX_SHADER),
-     wtu.loadShaderFromScript(gl, 'fshader2d', gl.FRAGMENT_SHADER)],
-    ['vPosition', 'texCoord0'], [0, 1]);
+    gl, ['vshader2d', 'fshader2d'], ['vPosition', 'texCoord0'], [0, 1]);
 wtu.setupUnitQuad(gl, 0, 1);
 
 var colors = [
   {name: 'red', color:[255, 0, 0, 255]},
   {name: 'green', color:[0, 255, 0, 255]},
   {name: 'blue', color:[0, 0, 255, 255]},
   {name: 'yellow', color:[255, 255, 0, 255]},
   {name: 'magenta', color:[255, 0, 255, 255]},
--- a/content/canvas/test/webgl/conformance/glsl/samplers/glsl-function-texture2dproj.html
+++ b/content/canvas/test/webgl/conformance/glsl/samplers/glsl-function-texture2dproj.html
@@ -4,16 +4,17 @@ Use of this source code is governed by a
 found in the LICENSE file.
  -->
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL texture2D GLSL conformance test.</title>
 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
 <script src="../../../resources/js-test-pre.js"></script>
 <script src="../../resources/webgl-test.js"> </script>
 <script src="../../resources/webgl-test-utils.js"> </script>
 </head>
 <body>
 <canvas id="example" width="32" height="32"></canvas>
 <div id="description"></div>
 <div id="console"></div>
@@ -52,19 +53,17 @@ varying vec2 texCoord;
 void main() {
     gl_FragData[0] = texture2DProj(tex, vec4(texCoord, 123.0, divisor));
 }
 </script>
 <script>
 description("tests GLSL texture2DProj function with");
 
 var wtu = WebGLTestUtils;
-var canvas = document.getElementById("example");
-
-var gl = wtu.create3DContext(canvas, {antialias: false});
+var gl = wtu.create3DContext("example", {antialias: false});
 
 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);
 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);
@@ -80,20 +79,18 @@ ctx.fillRect(0, 0, 8, 8);
 ctx.fillRect(8, 8, 8, 8);
 
 gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, c);
 
 for (var ss = 0; ss < 2; ++ss) {
   debug("");
   debug(ss ? "testing vec4 version" : "testing vec3 version");
   var program = wtu.setupProgram(
-	  gl,
-	  [wtu.loadShaderFromScript(gl, 'vshader' + ss, gl.VERTEX_SHADER),
-	   wtu.loadShaderFromScript(gl, 'fshader' + ss, gl.FRAGMENT_SHADER)],
-	  ['vPosition', 'texCoord0'], [0, 1]);
+	  gl, ['vshader' + ss, 'fshader' + ss],
+      ['vPosition', 'texCoord0'], [0, 1]);
   gl.useProgram(program);
   var loc = gl.getUniformLocation(program, "divisor");
 
   for (var ii = 0; ii < 3; ++ii) {
 	var denominator = Math.pow(2, ii);
 	gl.uniform1f(loc, 1 / denominator);
 	wtu.drawQuad(gl);
 	var size = 16 / denominator;
--- a/content/canvas/test/webgl/conformance/limits/gl-max-texture-dimensions.html
+++ b/content/canvas/test/webgl/conformance/limits/gl-max-texture-dimensions.html
@@ -35,18 +35,17 @@ varying vec2 texCoord;
 void main()
 {
     gl_FragColor = textureCube(tex, normalize(vec3(texCoord, 1)));
 }
 </script>
 <script>
 description(document.title);
 var wtu = WebGLTestUtils;
-var canvas = document.getElementById("example");
-var gl = wtu.create3DContext(canvas);
+var gl = wtu.create3DContext("example");
 var program = wtu.setupTexturedQuad(gl);
 
 // Note: It seems like a reasonable assuption that a 1xN texture size should
 // work. Even 1 by 128k is only 512k
 var maxSize = gl.getParameter(gl.MAX_TEXTURE_SIZE);
 debug("advertised max size: " + maxSize);
 var testSize = Math.min(maxSize, 128 * 1024);
 var pixels = new Uint8Array(testSize * 4);
@@ -75,20 +74,17 @@ gl.texImage2D(
     pixels);
 gl.generateMipmap(gl.TEXTURE_2D);
 
 wtu.drawQuad(gl);
 wtu.checkCanvas(gl, [0, 255, 128, 255],
                 "Should be 0, 255, 128, 255");
 
 var program = wtu.setupProgram(
-    gl,
-    [wtu.loadShaderFromScript(gl, 'vshader', gl.VERTEX_SHADER),
-     wtu.loadShaderFromScript(gl, 'fshader', gl.FRAGMENT_SHADER)],
-    ['vPosition', 'texCoord0'], [0, 1]);
+    gl, ['vshader', 'fshader'], ['vPosition', 'texCoord0'], [0, 1]);
 
 glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors.");
 
 // NOTE: We can't easily test cube maps because they require width == height
 // and we might not have enough memory for maxSize by maxSize texture.
 
 successfullyParsed = true;
 
--- a/content/canvas/test/webgl/conformance/limits/gl-min-attribs.html
+++ b/content/canvas/test/webgl/conformance/limits/gl-min-attribs.html
@@ -40,24 +40,22 @@ varying vec4 color;
 void main()
 {
     gl_FragColor = color;
 }
 </script>
 <script>
 description(document.title);
 var wtu = WebGLTestUtils;
-var canvas = document.getElementById("example");
-var gl = wtu.create3DContext(canvas);
+var gl = wtu.create3DContext("example");
 var program = wtu.setupTexturedQuad(gl);
 
 var program = wtu.setupProgram(
     gl,
-    [wtu.loadShaderFromScript(gl, 'vshader', gl.VERTEX_SHADER),
-     wtu.loadShaderFromScript(gl, 'fshader', gl.FRAGMENT_SHADER)],
+    ['vshader', 'fshader'],
     ['vPosition', 'v0', 'v1', 'v2', 'v3', 'v4', 'v5', 'v6'],
     [0, 1, 2, 3, 4, 5, 6, 7]);
 
 for (var ii = 0; ii < 7; ++ii) {
   var v = (ii + 1) / 28;
   var vertexObject = gl.createBuffer();
   gl.bindBuffer(gl.ARRAY_BUFFER, vertexObject);
   gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([
@@ -68,17 +66,17 @@ for (var ii = 0; ii < 7; ++ii) {
       v, v/2, v/4, v/8,
       v, v/2, v/4, v/8]), gl.STATIC_DRAW);
   gl.enableVertexAttribArray(ii + 1);
   gl.vertexAttribPointer(ii + 1, 4, gl.FLOAT, false, 0, 0);
 }
 
 wtu.drawQuad(gl);
 glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors from setup.");
-wtu.checkCanvasRect(gl, 0, 0, canvas.width, canvas.height, [255, 127, 64, 32], "Should render 255,127,64,32 (+/-1)", 1);
+wtu.checkCanvasRect(gl, 0, 0, gl.canvas.width, gl.canvas.height, [255, 127, 64, 32], "Should render 255,127,64,32 (+/-1)", 1);
 
 successfullyParsed = true;
 
 </script>
 </body>
 <script src="../../resources/js-test-post.js"></script>
 
 </body>
--- a/content/canvas/test/webgl/conformance/limits/gl-min-textures.html
+++ b/content/canvas/test/webgl/conformance/limits/gl-min-textures.html
@@ -36,26 +36,22 @@ void main()
       c += texture2D(uni[ii], vec2(0.5, 0.5));
     }
     gl_FragColor = c;
 }
 </script>
 <script>
 description(document.title);
 var wtu = WebGLTestUtils;
-var canvas = document.getElementById("example");
-var gl = wtu.create3DContext(canvas);
+var gl = wtu.create3DContext("example");
 var program = wtu.setupTexturedQuad(gl);
 
 //------------------------------------------------------------------------------
 var program = wtu.setupProgram(
-    gl,
-    [wtu.loadShaderFromScript(gl, 'vshader', gl.VERTEX_SHADER),
-     wtu.loadShaderFromScript(gl, 'fshader', gl.FRAGMENT_SHADER)],
-    ['vPosition'], [0]);
+    gl, ['vshader', 'fshader'], ['vPosition'], [0]);
 
 for (var ii = 0; ii < 8; ++ii) {
   var loc = gl.getUniformLocation(program, "uni[" + ii + "]");
   gl.activeTexture(gl.TEXTURE0 + ii);
   var tex = gl.createTexture();
   wtu.fillTexture(gl, tex, 1, 1, [32, 16, 8, ii * 9], 0);
   gl.uniform1i(loc, ii);
 }
--- a/content/canvas/test/webgl/conformance/limits/gl-min-uniforms.html
+++ b/content/canvas/test/webgl/conformance/limits/gl-min-uniforms.html
@@ -60,52 +60,43 @@ void main()
        c += uni[ii];
     }
     gl_FragColor = vec4(c.r, c.g, c.b, c.a / 120.0);
 }
 </script>
 <script>
 description(document.title);
 var wtu = WebGLTestUtils;
-var canvas = document.getElementById("example");
-var gl = wtu.create3DContext(canvas);
+var gl = wtu.create3DContext("example");
 var program = wtu.setupTexturedQuad(gl);
 
 //------------------------------------------------------------------------------
-var program = wtu.setupProgram(
-    gl,
-    [wtu.loadShaderFromScript(gl, 'vshader', gl.VERTEX_SHADER),
-     wtu.loadShaderFromScript(gl, 'fshader', gl.FRAGMENT_SHADER)],
-    ['vPosition'], [0]);
+var program = wtu.setupProgram(gl, ['vshader', 'fshader'], ['vPosition'], [0]);
 
 for (var ii = 0; ii < 128; ++ii) {
   var loc = gl.getUniformLocation(program, "uni[" + ii + "]");
   gl.uniform4f(loc, 2/256, 2/512, 2/1024, ii/8128);
 }
 
 wtu.drawQuad(gl);
 glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors from setup.");
-wtu.checkCanvasRect(gl, 0, 0, canvas.width, canvas.height, [255, 127, 64, 255], "Should render 255,127,64,32 (+/-1)", 1);
+wtu.checkCanvasRect(gl, 0, 0, gl.canvas.width, gl.canvas.height, [255, 127, 64, 255], "Should render 255,127,64,32 (+/-1)", 1);
 
 //------------------------------------------------------------------------------
-var program = wtu.setupProgram(
-    gl,
-    [wtu.loadShaderFromScript(gl, 'vshader2', gl.VERTEX_SHADER),
-     wtu.loadShaderFromScript(gl, 'fshader2', gl.FRAGMENT_SHADER)],
-    ['vPosition'], [0]);
+var program = wtu.setupProgram(gl, ['vshader2', 'fshader2'], ['vPosition'], [0]);
 
 for (var ii = 0; ii < 16; ++ii) {
   var loc = gl.getUniformLocation(program, "uni[" + ii + "]");
   gl.uniform4f(loc, 16/2048, 16/1024, 16/512, ii);
 }
 
 glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors from setup.");
 wtu.drawQuad(gl);
 glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors from setup.");
-wtu.checkCanvasRect(gl, 0, 0, canvas.width, canvas.height, [32, 64, 127, 255], "Should render 32,64,127,255 (+/-1)", 1);
+wtu.checkCanvasRect(gl, 0, 0, gl.canvas.width, gl.canvas.height, [32, 64, 127, 255], "Should render 32,64,127,255 (+/-1)", 1);
 
 successfullyParsed = true;
 
 </script>
 <script src="../../resources/js-test-post.js"></script>
 
 </body>
 </html>
--- a/content/canvas/test/webgl/conformance/misc/delayed-drawing.html
+++ b/content/canvas/test/webgl/conformance/misc/delayed-drawing.html
@@ -15,18 +15,17 @@ found in the LICENSE file.
 </head>
 <body>
 <canvas id="example" width="4" height="4" style="width: 40px; height: 30px;"></canvas>
 <div id="description"></div>
 <div id="console"></div>
 <script>
 description(document.title);
 var wtu = WebGLTestUtils;
-var canvas = document.getElementById("example");
-var gl = wtu.create3DContext(canvas);
+var gl = wtu.create3DContext("example");
 var program = wtu.setupTexturedQuad(gl);
 
 glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors from setup.");
 
 var tex = gl.createTexture();
 wtu.fillTexture(gl, tex, 5, 3, [0, 192, 128, 255]);
 
 var loc = gl.getUniformLocation(program, "tex");
--- a/content/canvas/test/webgl/conformance/misc/functions-returning-strings.html
+++ b/content/canvas/test/webgl/conformance/misc/functions-returning-strings.html
@@ -7,16 +7,17 @@ found in the LICENSE file.
 <html>
 <head>
 <meta charset="utf-8">
 <title>WebGL Conformance Tests</title>
 <link rel="stylesheet" href="../../resources/js-test-style.css"/>
 <script src="../../resources/desktop-gl-constants.js" type="text/javascript"></script>
 <script src="../../resources/js-test-pre.js"></script>
 <script src="../resources/webgl-test.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
 </head>
 <body>
 <div id="description"></div>
 <div id="console"></div>
 <canvas id="canvas" width="2" height="2"> </canvas>
 <script>
 description("Test that functions returning strings really do return strings (and not e.g. null)");
 debug("");
@@ -34,22 +35,23 @@ function shouldReturnString(_a)
      _av = eval(_a);
   } catch (e) {
      exception = e;
   }
 
   if (exception)
     testFailed(_a + ' should return a string. Threw exception ' + exception);
   else if (typeof _av == "string")
-    testPassed(_a + ' returns a string: "' + _av + '"');
+    testPassed(_a + ' returns a string');
   else
     testFailed(_a + ' should return a string.  Returns: "' + _av + '"');
 }
 
-var gl = create3DContext(document.getElementById("canvas"));
+var wtu = WebGLTestUtils;
+var gl = wtu.create3DContext("canvas");
 if (!gl) {
   testFailed("context does not exist");
 } else {
   var vs = gl.createShader(gl.VERTEX_SHADER);
   shouldReturnString("gl.getShaderSource(vs)");
   shouldReturnString("gl.getShaderInfoLog(vs)");
   gl.shaderSource(vs, validVertexShaderString);
   gl.compileShader(vs);
@@ -66,19 +68,28 @@ if (!gl) {
 
   var prog = gl.createProgram();
   shouldReturnString("gl.getProgramInfoLog(prog)");
   gl.attachShader(prog, vs);
   gl.attachShader(prog, fs);
   gl.linkProgram(prog);
   shouldReturnString("gl.getProgramInfoLog(prog)");
 
+  // Make sure different numbers of extensions doesn't result in
+  // different test output.
   var exts = gl.getSupportedExtensions();
+  var allPassed = true;
   for (i in exts) {
-    shouldReturnString("gl.getSupportedExtensions()[" + i + "]");
+    if (typeof i != "string") {
+      shouldReturnString("gl.getSupportedExtensions()[" + i + "]");
+      allPassed = false;
+    }
+  }
+  if (allPassed) {
+    testPassed('getSupportedExtensions() returns an array of strings');
   }
 
   shouldReturnString("gl.getParameter(gl.VENDOR)");
   shouldReturnString("gl.getParameter(gl.RENDERER)");
   shouldReturnString("gl.getParameter(gl.VERSION)");
   shouldReturnString("gl.getParameter(gl.SHADING_LANGUAGE_VERSION)");
 }
 
--- a/content/canvas/test/webgl/conformance/misc/instanceof-test.html
+++ b/content/canvas/test/webgl/conformance/misc/instanceof-test.html
@@ -34,30 +34,26 @@ void main()
     gl_FragColor = color;
 }
 </script>
 <script>
 var wtu = WebGLTestUtils;
 description(document.title);
 debug("Tests that instanceof works on WebGL objects.");
 debug("");
-var gl = create3DContext(document.getElementById("canvas"));
+var gl = wtu.create3DContext("canvas");
 shouldBeTrue('gl instanceof WebGLRenderingContext');
 shouldBeTrue('gl.createBuffer() instanceof WebGLBuffer');
 shouldBeTrue('gl.createFramebuffer() instanceof WebGLFramebuffer');
 shouldBeTrue('gl.createProgram() instanceof WebGLProgram');
 shouldBeTrue('gl.createRenderbuffer() instanceof WebGLRenderbuffer');
 shouldBeTrue('gl.createShader(gl.VERTEX_SHADER) instanceof WebGLShader');
 shouldBeTrue('gl.createTexture() instanceof WebGLTexture');
 
-var program = wtu.setupProgram(
-    gl,
-    [wtu.loadShaderFromScript(gl, 'vshader', gl.VERTEX_SHADER),
-     wtu.loadShaderFromScript(gl, 'fshader', gl.FRAGMENT_SHADER)],
-    ['vPosition'], [0]);
+var program = wtu.setupProgram(gl, ['vshader', 'fshader'], ['vPosition'], [0]);
 
 shouldBeTrue('gl.getUniformLocation(program, "color") instanceof WebGLUniformLocation');
 shouldBeTrue('gl.getActiveAttrib(program, 0) instanceof WebGLActiveInfo');
 shouldBeTrue('gl.getActiveUniform(program, 0) instanceof WebGLActiveInfo');
 
 debug("");
 debug("Tests that those WebGL objects can not be constructed through new operator");
 debug("");
@@ -67,26 +63,26 @@ function shouldThrowWithNew(objectType, 
     try {
         new objectType;
         testFailed('new ' + objectName + ' did not throw');
     } catch (e) {
         testPassed('new ' + objectName + ' threw an error');
     }
 }
 
-shouldThrowWithNew(WebGLRenderingContext, 'WebGLRenderingContext');
-shouldThrowWithNew(WebGLActiveInfo, 'WebGLActiveInfo');
-shouldThrowWithNew(WebGLBuffer, 'WebGLBuffer');
-shouldThrowWithNew(WebGLFramebuffer, 'WebGLFramebuffer');
-shouldThrowWithNew(WebGLProgram, 'WebGLProgram');
-shouldThrowWithNew(WebGLRenderbuffer, 'WebGLRenderbuffer');
-shouldThrowWithNew(WebGLShader, 'WebGLShader');
-shouldThrowWithNew(WebGLTexture, 'WebGLTexture');
-shouldThrowWithNew(WebGLUniformLocation, 'WebGLUniformLocation');
-shouldThrowWithNew(WebGLShaderPrecisionFormat, 'WebGLShaderPrecisionFormat');
+shouldThrowWithNew(window.WebGLRenderingContext, 'WebGLRenderingContext');
+shouldThrowWithNew(window.WebGLActiveInfo, 'WebGLActiveInfo');
+shouldThrowWithNew(window.WebGLBuffer, 'WebGLBuffer');
+shouldThrowWithNew(window.WebGLFramebuffer, 'WebGLFramebuffer');
+shouldThrowWithNew(window.WebGLProgram, 'WebGLProgram');
+shouldThrowWithNew(window.WebGLRenderbuffer, 'WebGLRenderbuffer');
+shouldThrowWithNew(window.WebGLShader, 'WebGLShader');
+shouldThrowWithNew(window.WebGLTexture, 'WebGLTexture');
+shouldThrowWithNew(window.WebGLUniformLocation, 'WebGLUniformLocation');
+shouldThrowWithNew(window.WebGLShaderPrecisionFormat, 'WebGLShaderPrecisionFormat');
 
 successfullyParsed = true;
 </script>
 <script src="../../resources/js-test-post.js"></script>
 
 </body>
 </html>
 
--- a/content/canvas/test/webgl/conformance/misc/is-object.html
+++ b/content/canvas/test/webgl/conformance/misc/is-object.html
@@ -22,18 +22,17 @@ var framebuffer;
 var program;
 var renderbuffer;
 var shader;
 var texture;
 
 description("Tests 'is' calls against non-bound and deleted objects");
 
 wtu = WebGLTestUtils;
-canvas = document.getElementById("canvas");
-gl = wtu.create3DContext(canvas);
+gl = wtu.create3DContext("canvas");
 shouldGenerateGLError = wtu.shouldGenerateGLError;
 
 shouldGenerateGLError(gl, gl.NO_ERROR, "buffer = gl.createBuffer()");
 shouldBeFalse("gl.isBuffer(buffer)");
 shouldGenerateGLError(gl, gl.NO_ERROR, "gl.bindBuffer(gl.ARRAY_BUFFER, buffer)");
 shouldBeTrue("gl.isBuffer(buffer)");
 debug("");