Bug 649088 - Use default favicon consistent with rest of browser; f=raymond, r=sdwilsh

This commit is contained in:
Tim Taubert 2011-05-31 22:00:01 +02:00
parent 8bc234098b
commit b1643fe520
3 changed files with 6 additions and 5 deletions

View File

@ -2032,7 +2032,7 @@ let GroupItems = {
if (UI.shouldLoadFavIcon(xulTab.linkedBrowser))
iconUrl = UI.getFavIconUrlForTab(xulTab);
else
iconUrl = Utils.defaultFaviconURL;
iconUrl = gFavIconService.defaultFavicon.spec;
return iconUrl;
},

View File

@ -490,8 +490,6 @@ Subscribable.prototype = {
// Class: Utils
// Singelton with common utility functions.
let Utils = {
defaultFaviconURL: "chrome://mozapps/skin/places/defaultFavicon.png",
// ----------
// Function: toString
// Prints [Utils] for debug use

View File

@ -1,6 +1,9 @@
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
const fi = Cc["@mozilla.org/browser/favicon-service;1"].
getService(Ci.nsIFaviconService);
let newTab;
function test() {
@ -27,7 +30,7 @@ function onTabViewWindowLoaded() {
is($icon.data("xulTab"), newTab,
"The app tab icon has the right tab reference")
// check to see whether it's showing the default one or not.
is($icon.attr("src"), contentWindow.Utils.defaultFaviconURL,
is($icon.attr("src"), fi.defaultFavicon.spec,
"The icon is showing the default fav icon for blank tab");
let errorHandler = function(event) {
@ -37,7 +40,7 @@ function onTabViewWindowLoaded() {
// fired, a delay is used here to avoid the test code run before the browser
// code.
executeSoon(function() {
is($icon.attr("src"), contentWindow.Utils.defaultFaviconURL,
is($icon.attr("src"), fi.defaultFavicon.spec,
"The icon is showing the default fav icon");
// clean up