1 if (self.importScripts) {
2 importScripts('/resources/testharness.js');
3 importScripts('worker-helpers.js');
6 async_test(function(test) {
7 if (Notification.permission != 'granted') {
8 assert_unreached('No permission has been granted for displaying notifications.');
12 var notification = new Notification('My Notification');
13 notification.addEventListener('show', function() {
17 notification.addEventListener('close', function() {
21 notification.addEventListener('error', function() {
22 assert_unreached('The error event should not be thrown.');
25 }, 'Closing a notification should fire the onclose() event.');
27 if (isDedicatedOrSharedWorker())