| <script src="/resources/js-test-pre.js"></script> |
| <script src="/resources/notifications-test-pre.js"></script> |
| testRunner.waitUntilDone(); |
| description("This test looks for the dispatch of the event handlers."); |
| debug("Granting permission to " + testURL); |
| testRunner.grantWebNotificationPermission(testURL); |
| shouldBeEqualToString("Notification.permission", "granted"); |
| var n = new Notification("title"); |
| testPassed("onshow event handler was called"); |
| testRunner.simulateWebNotificationClick(this); |
| testPassed("onclick event handler was called"); |
| testPassed("onclose event handler was called"); |
| testFailed("onerror event handler should not be called"); |