| OLD | NEW |
| 1 if (self.importScripts) { |
| 2 importScripts('../../../resources/js-test.js'); |
| 3 importScripts('notification-worker.js'); |
| 4 } |
| 5 |
| 1 function runTest() | 6 function runTest() |
| 2 { | 7 { |
| 3 var notification = new Notification("Notification", { | 8 var notification = new Notification("Notification", { |
| 4 tag: "my-notification" | 9 tag: "my-notification" |
| 5 }); | 10 }); |
| 6 | 11 |
| 7 notification.addEventListener("show", function() { | 12 notification.addEventListener("show", function() { |
| 8 testPassed("notification.onshow() has been called."); | 13 testPassed("notification.onshow() has been called."); |
| 9 var updatedNotification = new Notification("Notification 2", { | 14 var updatedNotification = new Notification("Notification 2", { |
| 10 tag: "my-notification" | 15 tag: "my-notification" |
| 11 }); | 16 }); |
| 12 | 17 |
| 13 updatedNotification.addEventListener("show", function() { | 18 updatedNotification.addEventListener("show", function() { |
| 14 testPassed("updatedNotification.onshow() has been called."); | 19 testPassed("updatedNotification.onshow() has been called."); |
| 15 if (window.testRunner) | 20 finishJSTest(); |
| 16 testRunner.notifyDone(); | |
| 17 }); | 21 }); |
| 18 }); | 22 }); |
| 19 } | 23 } |
| OLD | NEW |