summaryrefslogtreecommitdiffstats
path: root/browser/base/content/test/alerts/browser_notification_close.js
diff options
context:
space:
mode:
Diffstat (limited to 'browser/base/content/test/alerts/browser_notification_close.js')
-rw-r--r--browser/base/content/test/alerts/browser_notification_close.js25
1 files changed, 10 insertions, 15 deletions
diff --git a/browser/base/content/test/alerts/browser_notification_close.js b/browser/base/content/test/alerts/browser_notification_close.js
index 7568f1cc2d..3fd50bed5b 100644
--- a/browser/base/content/test/alerts/browser_notification_close.js
+++ b/browser/base/content/test/alerts/browser_notification_close.js
@@ -21,17 +21,16 @@ add_task(async function test_notificationClose() {
Services.prefs.setBoolPref("alerts.showFavicons", true);
await PlacesTestUtils.addVisits(notificationURI);
- let faviconURI = await new Promise(resolve => {
- let uri = makeURI(
- "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAADElEQVQI12P4//8/AAX+Av7czFnnAAAAAElFTkSuQmCC"
- );
- PlacesUtils.favicons.setAndFetchFaviconForPage(
+ let dataURL = makeURI(
+ "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAADElEQVQI12P4//8/AAX+Av7czFnnAAAAAElFTkSuQmCC"
+ );
+ await new Promise(resolve => {
+ PlacesUtils.favicons.setFaviconForPage(
notificationURI,
- uri,
- true,
- PlacesUtils.favicons.FAVICON_LOAD_NON_PRIVATE,
- uriResult => resolve(uriResult),
- Services.scriptSecurityManager.getSystemPrincipal()
+ dataURL,
+ dataURL,
+ null,
+ resolve
);
});
@@ -67,11 +66,7 @@ add_task(async function test_notificationClose() {
"Body text of notification should be present"
);
let alertIcon = alertWindow.document.getElementById("alertIcon");
- is(
- alertIcon.src,
- faviconURI.spec,
- "Icon of notification should be present"
- );
+ is(alertIcon.src, dataURL.spec, "Icon of notification should be present");
let alertCloseButton = alertWindow.document.querySelector(".close-icon");
is(alertCloseButton.localName, "toolbarbutton", "close button found");