blob: 5f484dcc6f0c5bd343cd41d680c795fb0ae3cbd9 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript">
function log(message)
{
document.getElementById("result").innerHTML += message + "<br>";
}
function runTests()
{
if (window.layoutTestController) {
layoutTestController.grantDesktopNotificationPermission("file://");
layoutTestController.dumpAsText();
layoutTestController.waitUntilDone();
}
if (!window.webkitNotifications) {
log("FAIL: No webkitNotifications interface!");
}
var N = window.webkitNotifications.createNotification("", "New E-mail", "Meet me tonight at 8!");
N.ondisplay = function() { log("PASS: display event invoked."); N.cancel(); }
N.onclose = function() { log("PASS: close event invoked."); layoutTestController.notifyDone(); }
N.show();
}
</script>
</head>
<body>
<p>Sending notifications with permission...</p>
<div id="result"></div>
<script type="text/javascript">
runTests();
</script>
</body>
</html>