blob: cd402ecd524e857868fb476e050e7c83d494faa8 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript">
function log(message)
{
document.getElementById("result").innerHTML += message + "<br>";
}
function runTests()
{
if (window.testRunner) {
testRunner.grantWebNotificationPermission("file://");
testRunner.dumpAsText();
if (testRunner.dumpNotifications)
testRunner.dumpNotifications();
testRunner.waitUntilDone();
}
if (!window.webkitNotifications) {
log("FAIL: No webkitNotifications interface!");
}
var N = window.webkitNotifications.createNotification("", "New E-mail", "Meet me tonight at 8!");
N.onclick = function() { log("PASS: click event fired."); N.cancel(); }
N.show();
if (window.testRunner) {
testRunner.simulateLegacyWebNotificationClick("New E-mail");
testRunner.notifyDone();
}
}
</script>
</head>
<body>
<p>Showing notifications.</p>
<p>To exercise manually, grant notification permissions and load this page, then click on the notification. You should see a "PASS" message.</p>
<div id="result"></div>
<script type="text/javascript">
runTests();
</script>
</body>
</html>