Bug 897811 - fix uses of browser.pagethumbnails.capturing_disabled to reflect the pref controls if it is *disabled* rather than enabled. r/a=gavin
☠☠ backed out by 3318c44609da ☠ ☠
authorMark Hammond <mhammond@skippinet.com.au>
Thu, 08 Aug 2013 10:20:53 +1000
changeset 153675 58e2271ca9d0d15951a28c756f68359352491adc
parent 153674 40f91a85e10d8b7f6c7d8bfa8c7efbd68b7f3969
child 153676 3318c44609da7dec7d67ed5d2cb4621fefab33b5
push id2859
push userakeybl@mozilla.com
push dateMon, 16 Sep 2013 19:14:59 +0000
treeherdermozilla-beta@87d3c51cd2bf [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs897811
milestone25.0a2
Bug 897811 - fix uses of browser.pagethumbnails.capturing_disabled to reflect the pref controls if it is *disabled* rather than enabled. r/a=gavin
content/base/test/test_ipc_messagemanager_blob.html
content/media/webspeech/synth/ipc/test/test_ipc.html
dom/browser-element/mochitest/browserElementTestHelpers.js
dom/devicestorage/ipc/test_ipc.html
layout/tools/reftest/reftest-cmdline.js
testing/profiles/prefs_general.js
toolkit/components/thumbnails/PageThumbs.jsm
--- a/content/base/test/test_ipc_messagemanager_blob.html
+++ b/content/base/test/test_ipc_messagemanager_blob.html
@@ -91,15 +91,15 @@
     addEventListener("load", function() {
       info("Got load event.");
 
       SpecialPowers.addPermission("browser", true, document);
       SpecialPowers.pushPrefEnv({
         "set": [
           ["dom.ipc.browser_frames.oop_by_default", true],
           ["dom.mozBrowserFramesEnabled", true],
-          ["browser.pagethumbnails.capturing_disabled", false]
+          ["browser.pagethumbnails.capturing_disabled", true]
         ]
       }, runTests);
     });
   </script>
 </body>
 </html>
--- a/content/media/webspeech/synth/ipc/test/test_ipc.html
+++ b/content/media/webspeech/synth/ipc/test/test_ipc.html
@@ -176,16 +176,16 @@
       SpecialPowers.addPermission("browser", true, document);
       SpecialPowers.pushPrefEnv({
         "set": [
           // TODO: remove this as part of bug 820712
           ["network.disable.ipc.security", true],
 
           ["dom.ipc.browser_frames.oop_by_default", true],
           ["dom.mozBrowserFramesEnabled", true],
-          ["browser.pagethumbnails.capturing_disabled", false]
+          ["browser.pagethumbnails.capturing_disabled", true]
         ]
       }, runTests);
     });
 
   </script>
 </body>
 </html>
--- a/dom/browser-element/mochitest/browserElementTestHelpers.js
+++ b/dom/browser-element/mochitest/browserElementTestHelpers.js
@@ -201,17 +201,17 @@ function expectMozbrowserEvent(iframe, e
     iframe.removeEventListener('mozbrowser' + eventName, handler);
     deferred.resolve(e);
   });
   return deferred.promise;
 }
 
 // Set some prefs:
 //
-//  * browser.pagethumbnails.capturing_disabled: false
+//  * browser.pagethumbnails.capturing_disabled: true
 //
 //    Disable tab view; it seriously messes us up.
 //
 //  * dom.ipc.browser_frames.oop_by_default
 //
 //    Enable or disable OOP-by-default depending on the test's filename.  You
 //    can still force OOP on or off with <iframe mozbrowser remote=true/false>,
 //    at least until bug 756376 lands.
@@ -239,17 +239,17 @@ function expectMozbrowserEvent(iframe, e
 //    Disable mixed active content blocking, so that tests can confirm that mixed
 //    content results in a broken security state.
 
 (function() {
   var oop = location.pathname.indexOf('_inproc_') == -1;
 
   browserElementTestHelpers.lockTestReady();
   SpecialPowers.setBoolPref("network.disable.ipc.security", true);
-  SpecialPowers.pushPrefEnv({set: [["browser.pagethumbnails.capturing_disabled", false],
+  SpecialPowers.pushPrefEnv({set: [["browser.pagethumbnails.capturing_disabled", true],
                                    ["dom.ipc.browser_frames.oop_by_default", oop],
                                    ["dom.ipc.tabs.disabled", false],
                                    ["security.mixed_content.block_active_content", false]]},
                             browserElementTestHelpers.unlockTestReady.bind(browserElementTestHelpers));
 })();
 
 addEventListener('unload', function() {
   browserElementTestHelpers.cleanUp();
--- a/dom/devicestorage/ipc/test_ipc.html
+++ b/dom/devicestorage/ipc/test_ipc.html
@@ -153,16 +153,16 @@
           ["device.storage.testing", true],
           ["device.storage.prompt.testing", true],
 
           // TODO: remove this as part of bug 820712
           ["network.disable.ipc.security", true],
 
           ["dom.ipc.browser_frames.oop_by_default", true],
           ["dom.mozBrowserFramesEnabled", true],
-          ["browser.pagethumbnails.capturing_disabled", false]
+          ["browser.pagethumbnails.capturing_disabled", true]
         ]
       }, runTests);
     });
 
   </script>
 </body>
 </html>
--- a/layout/tools/reftest/reftest-cmdline.js
+++ b/layout/tools/reftest/reftest-cmdline.js
@@ -101,17 +101,17 @@ RefTestCmdLineHandler.prototype =
     // Make url-classifier updates so rare that they won't affect tests
     branch.setIntPref("urlclassifier.updateinterval", 172800);
     // Disable high-quality downscaling, since it makes reftests more difficult.
     branch.setBoolPref("image.high_quality_downscaling.enabled", false);
     // Checking whether two files are the same is slow on Windows.
     // Setting this pref makes tests run much faster there.
     branch.setBoolPref("security.fileuri.strict_origin_policy", false);
     // Disable the thumbnailing service
-    branch.setBoolPref("browser.pagethumbnails.capturing_disabled", false);
+    branch.setBoolPref("browser.pagethumbnails.capturing_disabled", true);
 
     var wwatch = Components.classes["@mozilla.org/embedcomp/window-watcher;1"]
                            .getService(nsIWindowWatcher);
     wwatch.openWindow(null, "chrome://reftest/content/reftest.xul", "_blank",
                       "chrome,dialog=no,all", args);
     cmdLine.preventDefault = true;
   },
 
--- a/testing/profiles/prefs_general.js
+++ b/testing/profiles/prefs_general.js
@@ -142,9 +142,9 @@ user_pref("media.webaudio.legacy.PannerN
 user_pref("media.webaudio.legacy.OscillatorNode", true);
 
 // Always use network provider for geolocation tests
 // so we bypass the OSX dialog raised by the corelocation provider
 user_pref("geo.provider.testing", true);
 
 // Background thumbnails in particular cause grief, and disabling thumbnails
 // in general can't hurt - we re-enable them when tests need them.
-user_pref("browser.pagethumbnails.capturing_disabled", false);
+user_pref("browser.pagethumbnails.capturing_disabled", true);
--- a/toolkit/components/thumbnails/PageThumbs.jsm
+++ b/toolkit/components/thumbnails/PageThumbs.jsm
@@ -448,17 +448,17 @@ this.PageThumbs = {
       this._thumbnailWidth = Math.round(width.value / 3);
       this._thumbnailHeight = Math.round(height.value / 3);
     }
     return [this._thumbnailWidth, this._thumbnailHeight];
   },
 
   _prefEnabled: function PageThumbs_prefEnabled() {
     try {
-      return Services.prefs.getBoolPref("browser.pagethumbnails.capturing_disabled");
+      return !Services.prefs.getBoolPref("browser.pagethumbnails.capturing_disabled");
     }
     catch (e) {
       return true;
     }
   },
 };
 
 this.PageThumbsStorage = {