diff --git a/browser/base/content/test/browser_discovery.js b/browser/base/content/test/browser_discovery.js index 83db9bcbe62d..8f3e494869c0 100644 --- a/browser/base/content/test/browser_discovery.js +++ b/browser/base/content/test/browser_discovery.js @@ -36,7 +36,7 @@ var iconDiscoveryTests = [ function runIconDiscoveryTest() { var test = iconDiscoveryTests[0]; var head = doc().getElementById("linkparent"); - var hasSrc = gProxyFavIcon.hasAttribute("src"); + var hasSrc = gBrowser.getIcon() != null; if (test.pass) ok(hasSrc, test.text); else @@ -50,7 +50,7 @@ function runIconDiscoveryTest() { function iconDiscovery() { setHandlerFunc(runIconDiscoveryTest); if (iconDiscoveryTests.length) { - gProxyFavIcon.removeAttribute("src"); + gBrowser.setIcon(gBrowser.selectedTab, null); var test = iconDiscoveryTests[0]; var head = doc().getElementById("linkparent"); diff --git a/browser/components/sidebar/src/nsSidebar.js b/browser/components/sidebar/src/nsSidebar.js index bdce28cebfde..fa8a7756afe7 100644 --- a/browser/components/sidebar/src/nsSidebar.js +++ b/browser/components/sidebar/src/nsSidebar.js @@ -197,7 +197,7 @@ function (aDescriptionURL) if (browser.shouldLoadFavIcon(browser.selectedBrowser .contentDocument .documentURIObject)) - iconURL = win.gProxyFavIcon.getAttribute("src"); + iconURL = win.gBrowser.getIcon(); if (!this.validateSearchEngine(aDescriptionURL, iconURL)) return; diff --git a/extensions/cookie/test/browser_test_favicon.js b/extensions/cookie/test/browser_test_favicon.js index cae1720ce044..76579fd5f07e 100644 --- a/extensions/cookie/test/browser_test_favicon.js +++ b/extensions/cookie/test/browser_test_favicon.js @@ -5,29 +5,23 @@ function test() { waitForExplicitFinish(); - var prefs = Components.classes["@mozilla.org/preferences-service;1"] - .getService(Components.interfaces.nsIPrefBranch); - prefs.setIntPref("network.cookie.cookieBehavior", 1); + Services.prefs.setIntPref("network.cookie.cookieBehavior", 1); - var os = Components.classes["@mozilla.org/observer-service;1"] - .getService(Components.interfaces.nsIObserverService); - os.addObserver(function (theSubject, theTopic, theData) { + Services.obs.addObserver(function (theSubject, theTopic, theData) { var uri = theSubject.QueryInterface(Components.interfaces.nsIURI); var domain = uri.host; if (domain == "example.org") { ok(true, "foreign favicon cookie was blocked"); - var prefs = Components.classes["@mozilla.org/preferences-service;1"] - .getService(Components.interfaces.nsIPrefBranch); - prefs.setIntPref("network.cookie.cookieBehavior", 0); + Services.prefs.setIntPref("network.cookie.cookieBehavior", 0); - os.removeObserver(arguments.callee, "cookie-rejected"); + Services.obs.removeObserver(arguments.callee, "cookie-rejected"); finish(); } }, "cookie-rejected", false); // kick off a favicon load - PageProxySetIcon("http://example.org/tests/extensions/cookie/test/damonbowling.jpg"); + gBrowser.setIcon(gBrowser.selectedTab, "http://example.org/tests/extensions/cookie/test/damonbowling.jpg"); }