Bug 897811 - Fix uses of browser.pagethumbnails.capturing_disabled to reflect the pref controls if it is *disabled* rather than enabled. r+a=gavin
authorMark Hammond <mhammond@skippinet.com.au>
Thu, 08 Aug 2013 09:52:01 +1000
changeset 153682 e0ea75b634078fe06b2d062fe84bfc2110137eeb
parent 153681 cbb6544f9769b3b712b6903f1490c2c1965424ca
child 153683 381b423ec65b7f775b0f62d854f6765823c9794c
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
toolkit/components/thumbnails/test/head.js
--- 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 = {
--- a/toolkit/components/thumbnails/test/head.js
+++ b/toolkit/components/thumbnails/test/head.js
@@ -6,17 +6,17 @@ Cu.import("resource://gre/modules/PageTh
 Cu.import("resource:///modules/sessionstore/SessionStore.jsm", tmp);
 Cu.import("resource://gre/modules/FileUtils.jsm", tmp);
 Cu.import("resource://gre/modules/osfile.jsm", tmp);
 let {PageThumbs, PageThumbsStorage, SessionStore, FileUtils, OS} = tmp;
 
 Cu.import("resource://gre/modules/PlacesUtils.jsm");
 
 let oldEnabledPref = Services.prefs.getBoolPref("browser.pagethumbnails.capturing_disabled");
-Services.prefs.setBoolPref("browser.pagethumbnails.capturing_disabled", true);
+Services.prefs.setBoolPref("browser.pagethumbnails.capturing_disabled", false);
 
 registerCleanupFunction(function () {
   while (gBrowser.tabs.length > 1)
     gBrowser.removeTab(gBrowser.tabs[1]);
   Services.prefs.setBoolPref("browser.pagethumbnails.capturing_disabled", oldEnabledPref)
 });
 
 /**