From ef65000d8e0f9faff63e907a9cd9acde75ff3eeb Mon Sep 17 00:00:00 2001 From: Ehsan Akhgari Date: Thu, 22 Jan 2009 11:35:30 +0330 Subject: [PATCH] Bug 468700 - Having "Ask me Everytime" enabled for Cookies during Private Browsing is unusable (test fix); r,sr=bzbarsky --- extensions/cookie/test/unit/test_bug468700.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/extensions/cookie/test/unit/test_bug468700.js b/extensions/cookie/test/unit/test_bug468700.js index 2cdeae9d6d0..d4b97a96e6e 100644 --- a/extensions/cookie/test/unit/test_bug468700.js +++ b/extensions/cookie/test/unit/test_bug468700.js @@ -8,7 +8,10 @@ function run_test() { var cm = Cc["@mozilla.org/cookiemanager;1"].getService(Ci.nsICookieManager2); var ios = Cc["@mozilla.org/network/io-service;1"].getService(Ci.nsIIOService); var prefs = Cc["@mozilla.org/preferences-service;1"].getService(Ci.nsIPrefBranch); - var pb = Cc["@mozilla.org/privatebrowsing;1"].getService(Ci.nsIPrivateBrowsingService); + var pb = null; + try { + pb = Cc["@mozilla.org/privatebrowsing;1"].getService(Ci.nsIPrivateBrowsingService); + } catch (e) {} var spec = "http://foo.bar/baz"; var uri = ios.newURI(spec, null, null);