Bug 1262542 - WebExtension notifications seem to fail on Nightly, r?kmag draft
authorbsilverberg <bsilverberg@mozilla.com>
Wed, 06 Apr 2016 15:00:36 -0400
changeset 348154 51300344a2c4323dc9f51a9de4d5884dce9c76d0
parent 347336 43360777775c3049b405168c2b303941cd74b9de
child 517791 1bf999d430211f44746c2134df665fa583fe169f
push id14759
push userbmo:bob.silverberg@gmail.com
push dateWed, 06 Apr 2016 19:03:02 +0000
reviewerskmag
bugs1262542
milestone48.0a1
Bug 1262542 - WebExtension notifications seem to fail on Nightly, r?kmag MozReview-Commit-ID: 4NaB9xHKFqq
toolkit/components/extensions/schemas/notifications.json
toolkit/components/extensions/test/mochitest/test_ext_notifications.html
--- 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"],