4 <script type="text/javascript">
7 document.getElementById("result").innerHTML += message + "<br>";
12 if (window.layoutTestController) {
13 layoutTestController.grantDesktopNotificationPermission("file://");
14 layoutTestController.dumpAsText();
17 if (!window.webkitNotifications) {
18 log("FAIL: No webkitNotifications interface!");
21 var N = window.webkitNotifications.createNotification("http://localhost/my_icon.png", "New E-mail", "Meet me tonight at 8!");
22 N.addEventListener("close", function() { log("PASS: addEventListener(close) callback #1 invoked"); });
23 N.onclose = function() { log("PASS: onclose attribute event callback invoked."); }
24 N.addEventListener("close", function() { log("PASS: addEventListener(close) capture callback #1 invoked"); }, true );
25 N.addEventListener("close", function() { log("PASS: addEventListener(close) capture callback #2 invoked"); }, true );
26 N.addEventListener("close", function() { log("PASS: addEventListener(close) callback #3 invoked"); });
33 <p>Sending notifications with permission...</p>
34 <div id="result"></div>
36 <script type="text/javascript">