diff options
Diffstat (limited to 'apps/system/test/integration/atoms/notification.js')
-rw-r--r-- | apps/system/test/integration/atoms/notification.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/apps/system/test/integration/atoms/notification.js b/apps/system/test/integration/atoms/notification.js new file mode 100644 index 0000000..cf3e44f --- /dev/null +++ b/apps/system/test/integration/atoms/notification.js @@ -0,0 +1,15 @@ +(function notification(text, desc) { + window.addEventListener('mozChromeEvent', function(e) { + var detail = e.detail; + if (detail.type === 'desktop-notification') { + marionetteScriptFinished(JSON.stringify(detail)); + } + }); + + var notify = window.navigator.mozNotification; + var notification = notify.createNotification( + text, desc + ); + + notification.show(); +}.apply(this, arguments)); |