Bug 1262542 - WebExtension notifications seem to fail on Nightly, r?kmag
MozReview-Commit-ID: 4NaB9xHKFqq
--- a/toolkit/components/extensions/schemas/notifications.json
+++ b/toolkit/components/extensions/schemas/notifications.json
@@ -181,16 +181,17 @@
"functions": [
{
"name": "create",
"type": "function",
"description": "Creates and displays a notification.",
"async": "callback",
"parameters": [
{
+ "optional": true,
"type": "string",
"name": "notificationId",
"description": "Identifier of the notification. If it is empty, this method generates an id. If it matches an existing notification, this method first clears that notification before proceeding with the create operation."
},
{
"$ref": "CreateNotificationOptions",
"name": "options",
"description": "Contents of the notification."
--- a/toolkit/components/extensions/test/mochitest/test_ext_notifications.html
+++ b/toolkit/components/extensions/test/mochitest/test_ext_notifications.html
@@ -15,17 +15,17 @@
add_task(function* test_notification() {
function backgroundScript() {
let opts = {
type: "basic",
title: "Testing Notification",
message: "Carry on",
};
- browser.notifications.create("", opts).then(id => {
+ browser.notifications.create(opts).then(id => {
browser.test.sendMessage("running", id);
browser.test.notifyPass("background test passed");
});
}
let extension = ExtensionTestUtils.loadExtension({
manifest: {
permissions: ["notifications"],