From 3529fbf9a437c027d5305479b21fe1f0b07656dd Mon Sep 17 00:00:00 2001 From: Bobby Holley Date: Wed, 27 Mar 2013 18:27:25 -0700 Subject: [PATCH] Bug 790732 - Fix two more toolkit tests. r=me Not sure why these didn't appear on earlier try runs, but they're trivial. --- toolkit/components/passwordmgr/test/test_prompt.html | 12 +++++------- .../satchel/test/test_form_autocomplete.html | 2 +- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/toolkit/components/passwordmgr/test/test_prompt.html b/toolkit/components/passwordmgr/test/test_prompt.html index bc1f8424987b..31f85d153b8b 100644 --- a/toolkit/components/passwordmgr/test/test_prompt.html +++ b/toolkit/components/passwordmgr/test/test_prompt.html @@ -138,7 +138,7 @@ var resolveCallback = { const interfaces = [Ci.nsIProtocolProxyCallback, Ci.nsISupports]; if (!interfaces.some( function(v) { return iid.equals(v) } )) - throw Components.results.NS_ERROR_NO_INTERFACE; + throw SpecialPowers.Cr.NS_ERROR_NO_INTERFACE; return this; }, @@ -160,12 +160,10 @@ var resolveCallback = { function startup() { //need to allow for arbitrary network servers defined in PAC instead of a hardcoded moz-proxy. - var ios = SpecialPowers.wrap(Components). - classes["@mozilla.org/network/io-service;1"]. - getService(Components.interfaces.nsIIOService); + var ios = SpecialPowers.Cc["@mozilla.org/network/io-service;1"]. + getService(SpecialPowers.Ci.nsIIOService); - var pps = SpecialPowers.wrap(Components). - classes["@mozilla.org/network/protocol-proxy-service;1"].getService(); + var pps = SpecialPowers.Cc["@mozilla.org/network/protocol-proxy-service;1"].getService(); var uri = ios.newURI("http://example.com", null, null); pps.asyncResolve(uri, 0, resolveCallback); @@ -183,7 +181,7 @@ var storageObserver = { Ci.nsISupports, Ci.nsISupportsWeakReference]; if (!interfaces.some( function(v) { return iid.equals(v) } )) - throw SpecialPowers.Components.results.NS_ERROR_NO_INTERFACE; + throw SpecialPowers.Cr.NS_ERROR_NO_INTERFACE; return this; }, diff --git a/toolkit/components/satchel/test/test_form_autocomplete.html b/toolkit/components/satchel/test/test_form_autocomplete.html index e18b860cf0a1..03142d3529c7 100644 --- a/toolkit/components/satchel/test/test_form_autocomplete.html +++ b/toolkit/components/satchel/test/test_form_autocomplete.html @@ -122,7 +122,7 @@ const shiftModifier = Event.SHIFT_MASK; // Get the form history service var fh = SpecialPowers.Cc["@mozilla.org/satchel/form-history;1"]. - getService(Components.interfaces.nsIFormHistory2); + getService(SpecialPowers.Ci.nsIFormHistory2); ok(fh != null, "got form history service"); fh.removeAllEntries();