Bug 950416 - Set the background-blend-mode pref in test_background_blend_mode.html so it works whether or not it's already enabled, r=roc
authorHoria Iosif Olaru <olaru@adobe.com>
Fri, 10 Jan 2014 03:29:39 +0200
changeset 163045 1979dd1a55d3d4a8b79bd16cdb837564de4de20b
parent 163044 bcc2c29c1e16ef9d75adb626ae60ec17599e155f
child 163046 d5d5fb7cb4696d186349ba834e00dcb3ecd06bc0
push id25979
push usercbook@mozilla.com
push dateMon, 13 Jan 2014 11:46:02 +0000
treeherdermozilla-central@ea6657f1d682 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc
bugs950416
milestone29.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 950416 - Set the background-blend-mode pref in test_background_blend_mode.html so it works whether or not it's already enabled, r=roc
layout/style/test/test_background_blend_mode.html
--- a/layout/style/test/test_background_blend_mode.html
+++ b/layout/style/test/test_background_blend_mode.html
@@ -14,17 +14,17 @@
 <pre id="test">
 <script type="application/javascript">
 
 /** Test for miscellaneous computed style issues **/
 
 var frame_container = document.getElementById("display");
 var noframe_container = document.getElementById("content");
 
-(function test_bug_841601() {
+function test_bug_841601() {
   // Test handling of background-blend-mode
   var p = document.createElement("p");
   var cs = getComputedStyle(p, "");
 
   frame_container.appendChild(p);
   is(cs.backgroundBlendMode, "normal",
      "default value of background-blend-mode");
 
@@ -39,13 +39,20 @@ var noframe_container = document.getElem
      "set normal blendmode twice");
 
   p.setAttribute("style", "background-blend-mode: normal, multiply, screen, overlay, darken, lighten, color-dodge, color-burn, hard-light, soft-light, difference, exclusion, hue, saturation, color, luminosity");
   cs = getComputedStyle(p, "");
   is(cs.backgroundBlendMode, "normal, multiply, screen, overlay, darken, lighten, color-dodge, color-burn, hard-light, soft-light, difference, exclusion, hue, saturation, color, luminosity",
      "set all blendmodes");
 
   p.parentNode.removeChild(p);
-})();
+
+  SimpleTest.finish();
+}
+
+SimpleTest.waitForExplicitFinish();
+SpecialPowers.pushPrefEnv({ "set": [["layout.css.background-blend-mode.enabled", true]] },
+                          test_bug_841601);
+
 </script>
 </pre>
 </body>
 </html>