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() {
15 testRunner.simulateWebNotificationClick('My Notification');
18 notification.addEventListener('click', function() {
22 notification.addEventListener('error', function() {
23 assert_unreached('The error event should not be thrown.');
26 }, 'Simulating a click on the notification should fire the onclick() event.');
28 if (isDedicatedOrSharedWorker())