Bug 792036 - More manual fixes requested by Andrew. r=mccr8
authorBobby Holley <bobbyholley@gmail.com>
Mon, 24 Sep 2012 14:46:29 +0200
changeset 108018 633082d3e5468cb48d0e61dfb4e84c4b29dfa9ac
parent 108017 1f7c4fae49c0d80075e7b0380c4b841a5ed30ab0
child 108019 e307925e4f29e92b4e5bb102e6e630da2d4aefaf
push id82
push usershu@rfrn.org
push dateFri, 05 Oct 2012 13:20:22 +0000
reviewersmccr8
bugs792036
milestone18.0a1
Bug 792036 - More manual fixes requested by Andrew. r=mccr8
docshell/test/navigation/NavigationUtils.js
dom/tests/mochitest/geolocation/test_mozsettings.html
dom/tests/mochitest/geolocation/test_mozsettingsWatch.html
toolkit/components/passwordmgr/test/test_prompt_async.html
--- a/docshell/test/navigation/NavigationUtils.js
+++ b/docshell/test/navigation/NavigationUtils.js
@@ -95,18 +95,17 @@ function isInaccessible(wnd, message) {
 
 ///////////////////////////////////////////////////////////////////////////
 // Functions that require UniversalXPConnect privilege
 ///////////////////////////////////////////////////////////////////////////
 
 function xpcEnumerateContentWindows(callback) {
 
   var Ci = SpecialPowers.Ci;
-  var ww = SpecialPowers.wrap(SpecialPowers.Components)
-                        .classes["@mozilla.org/embedcomp/window-watcher;1"]
+  var ww = SpecialPowers.Cc["@mozilla.org/embedcomp/window-watcher;1"]
                         .getService(Ci.nsIWindowWatcher);
   var enumerator = ww.getWindowEnumerator();
 
   var contentWindows = [];
 
   while (enumerator.hasMoreElements()) {
     var win = enumerator.getNext();
     if (/ChromeWindow/.exec(win)) {
--- a/dom/tests/mochitest/geolocation/test_mozsettings.html
+++ b/dom/tests/mochitest/geolocation/test_mozsettings.html
@@ -32,20 +32,19 @@ function toggleGeolocationSetting(value,
   }
 }
 
 SimpleTest.waitForExplicitFinish();
 resume_geolocationProvider();
 force_prompt(true);
 
 
-var comp = SpecialPowers.wrap(SpecialPowers.Components);
 SpecialPowers.setBoolPref("dom.mozSettings.enabled", true);
 SpecialPowers.addPermission("settings", true, document);
-comp.utils.import("resource://gre/modules/SettingsChangeNotifier.jsm");
+SpecialPowers.Cu.import("resource://gre/modules/SettingsChangeNotifier.jsm");
 
 toggleGeolocationSetting(false, function() {
     ok(true, "turned off geolocation via mozSettings");
     setTimeout(function() {
 	navigator.geolocation.getCurrentPosition(successCallbackAfterMozsetting, failureCallbackAfterMozsetting);
       }, 500); // need to wait a bit for all of these async callbacks to finish
   });
 
--- a/dom/tests/mochitest/geolocation/test_mozsettingsWatch.html
+++ b/dom/tests/mochitest/geolocation/test_mozsettingsWatch.html
@@ -32,20 +32,19 @@ function toggleGeolocationSetting(value,
   }
 }
 
 SimpleTest.waitForExplicitFinish();
 resume_geolocationProvider();
 force_prompt(true);
 
 
-var comp = SpecialPowers.wrap(SpecialPowers.Components);
 SpecialPowers.setBoolPref("dom.mozSettings.enabled", true);
 SpecialPowers.addPermission("settings", true, document);
-comp.utils.import("resource://gre/modules/SettingsChangeNotifier.jsm");
+SpecialPowers.Cu.import("resource://gre/modules/SettingsChangeNotifier.jsm");
 
 toggleGeolocationSetting(false, function() {
     ok(true, "turned off geolocation via mozSettings");
     setTimeout(function() {
 	navigator.geolocation.watchPosition(successCallbackAfterMozsetting, failureCallbackAfterMozsetting);
       }, 500); // need to wait a bit for all of these async callbacks to finish
   });
 
--- a/toolkit/components/passwordmgr/test/test_prompt_async.html
+++ b/toolkit/components/passwordmgr/test/test_prompt_async.html
@@ -75,22 +75,20 @@
                 var login = SpecialPowers.Cc["@mozilla.org/login-manager/loginInfo;1"]
                                          .createInstance(Ci.nsILoginInfo);
                 login.init(host, null, realm, user, pass, "", "");
                 pwmgr.addLogin(login);
                 logins.push(login);
             }
 
             //need to allow for arbitrary network servers defined in PAC instead of a hardcoded moz-proxy.
-            var ios = SpecialPowers.wrap(SpecialPowers.Components)
-                                   .classes["@mozilla.org/network/io-service;1"]
+            var ios = SpecialPowers.Cc["@mozilla.org/network/io-service;1"]
                                    .getService(SpecialPowers.Ci.nsIIOService);
 
-            var pps = SpecialPowers.wrap(SpecialPowers.Components)
-                                   .classes["@mozilla.org/network/protocol-proxy-service;1"]
+            var pps = SpecialPowers.Cc["@mozilla.org/network/protocol-proxy-service;1"]
                                    .getService();
 
             var uri = ios.newURI("http://example.com", null, null);
             var pi = pps.resolve(uri, 0);
             var mozproxy = "moz-proxy://" + pi.host + ":" + pi.port;
 
             addLogin(mozproxy, "proxy_realm",
                      "proxy_user", "proxy_pass");