mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-02 07:05:24 +00:00
Bug 836624 - Remove getFaviconForPage and getFaviconDataAsDataURL in test_bookmarks_html.js. r=mak
This commit is contained in:
parent
5d9037fd83
commit
b51a5d17ce
@ -336,12 +336,16 @@ function checkItem(aExpected, aNode)
|
||||
);
|
||||
break;
|
||||
case "icon":
|
||||
let faviconURI = PlacesUtils.favicons.getFaviconForPage(
|
||||
NetUtil.newURI(aExpected.url)
|
||||
);
|
||||
let dataURL = PlacesUtils.favicons.getFaviconDataAsDataURL(faviconURI);
|
||||
// Avoid do_check_eq for console spam.
|
||||
do_check_true(dataURL == aExpected.icon);
|
||||
let deferred = Promise.defer();
|
||||
PlacesUtils.favicons.getFaviconDataForPage(
|
||||
NetUtil.newURI(aExpected.url),
|
||||
function (aURI, aDataLen, aData, aMimeType) {
|
||||
let base64Icon = "data:image/png;base64," +
|
||||
base64EncodeString(String.fromCharCode.apply(String, aData));
|
||||
do_check_true(base64Icon == aExpected.icon);
|
||||
deferred.resolve();
|
||||
});
|
||||
return deferred.promise;
|
||||
break;
|
||||
case "keyword":
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user