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 notification.addEventListener("show", function() { | 9 notification.addEventListener("show", function() { |
5 testPassed("notification.onshow() has been called."); | 10 testPassed("notification.onshow() has been called."); |
6 notification.close(); | 11 notification.close(); |
7 }); | 12 }); |
8 | 13 |
9 notification.addEventListener("close", function() { | 14 notification.addEventListener("close", function() { |
10 testPassed("notification.onclose() has been called."); | 15 testPassed("notification.onclose() has been called."); |
11 if (window.testRunner) | 16 finishJSTest(); |
12 testRunner.notifyDone(); | |
13 }); | 17 }); |
14 } | 18 } |
OLD | NEW |