Skip to content

Commit 07b3286

Browse files
saschanazmoz-wptsync-bot
authored andcommitted
Part 3: Make string attributes non-nullable
Differential Revision: https://phabricator.services.mozilla.com/D273237 bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=2000862 gecko-commit: 72ca96b3163817d954c505370c5166d6283bf5de gecko-reviewers: smaug, webidl
1 parent 6c7eeb9 commit 07b3286

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

notifications/constructor-basic.https.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,12 @@
4343
);
4444
}
4545
}, "constructing a notification with a NotificationOptions dictionary correctly sets and reflects the silent attribute.");
46+
47+
test(() => {
48+
const notification = new Notification("a");
49+
assert_equals(notification.lang, "", "lang should default to an empty string");
50+
assert_equals(notification.body, "", "body should default to an empty string");
51+
assert_equals(notification.tag, "", "tag should default to an empty string");
52+
assert_equals(notification.icon, "", "icon should default to an empty string");
53+
}, "String options should default to empty strings");
4654
</script>

0 commit comments

Comments
 (0)