Bug 707570: Use Services.prefs instead of gPrefService in browser_bug435325.js. r=bz
authorSteffen Wilberg <steffen.wilberg@web.de>
Thu, 29 Dec 2011 10:42:57 +0100
changeset 83483 66b79f9ae14f7da0e2115d7b6a7dcab750cfdda6
parent 83482 92efb7a05df58dd1ad85a36a92bb08fa301a3ecf
child 83486 2c661ddfed0d5e873037faf17429171c2528decd
push id4446
push usersteffen.wilberg@web.de
push dateThu, 29 Dec 2011 10:13:45 +0000
treeherdermozilla-inbound@66b79f9ae14f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbz
bugs707570, 435325
milestone12.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 707570: Use Services.prefs instead of gPrefService in browser_bug435325.js. r=bz
docshell/test/browser/browser_bug435325.js
--- a/docshell/test/browser/browser_bug435325.js
+++ b/docshell/test/browser/browser_bug435325.js
@@ -7,18 +7,18 @@
 function test() {
   waitForExplicitFinish();
 
   gBrowser.selectedTab = gBrowser.addTab();
   window.addEventListener("DOMContentLoaded", checkPage, false);
 
   // Go offline and disable the cache, then try to load the test URL.
   Services.io.offline = true;
-  gPrefService.setBoolPref("browser.cache.disk.enable", false);
-  gPrefService.setBoolPref("browser.cache.memory.enable", false);
+  Services.prefs.setBoolPref("browser.cache.disk.enable", false);
+  Services.prefs.setBoolPref("browser.cache.memory.enable", false);
   content.location = "http://example.com/";
 }
 
 function checkPage() {
   if(content.location == "about:blank") {
     info("got about:blank, which is expected once, so return");
     return;
   }
@@ -37,13 +37,13 @@ function checkPage() {
   ok(!Services.io.offline, "After clicking the Try Again button, we're back "
    +" online. This depends on Components.interfaces.nsIDOMWindowUtils being "
    +"available from untrusted content (bug 435325).");
 
   finish();
 }
 
 registerCleanupFunction(function() {
-  gPrefService.setBoolPref("browser.cache.disk.enable", true);
-  gPrefService.setBoolPref("browser.cache.memory.enable", true);
+  Services.prefs.setBoolPref("browser.cache.disk.enable", true);
+  Services.prefs.setBoolPref("browser.cache.memory.enable", true);
   Services.io.offline = false;
   gBrowser.removeCurrentTab();
 });