blob: cc56cf6721a6268b5aa5952844f53ead5baf1b2d [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();
}
if (!window.webkitNotifications) {
log("FAIL: No webkitNotifications interface!");
}
var M = window.webkitNotifications.createNotification("", "New E-mail", "Meet me tonight at 8!");
M.replaceId = "NewMail";
M.show();
var other = window.webkitNotifications.createNotification("", "Alarm", "It's time to wake up!");
other.show();
var N = window.webkitNotifications.createNotification("", "New reply", "Correction, 8:15");
N.replaceId = "NewMail";
N.show();
}
</script>
</head>
<body>
<p>Showing notifications with replace ID...</p>
<div id="result"></div>
<script type="text/javascript">
runTests();
</script>
</body>
</html>