OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <head> |
| 4 <script type="text/javascript"> |
| 5 function log(message) |
| 6 { |
| 7 document.getElementById("result").innerHTML += message + "<br>"; |
| 8 } |
| 9 |
| 10 function runTests() |
| 11 { |
| 12 if (window.testRunner) { |
| 13 testRunner.grantWebNotificationPermission("file://"); |
| 14 testRunner.dumpAsText(); |
| 15 if (testRunner.dumpNotifications) |
| 16 testRunner.dumpNotifications(); |
| 17 } |
| 18 |
| 19 if (!window.webkitNotifications) { |
| 20 log("FAIL: No webkitNotifications interface!"); |
| 21 } |
| 22 |
| 23 var M = window.webkitNotifications.createNotification("", "New E-mai
l", "Meet me tonight at 8!"); |
| 24 M.replaceId = "NewMail"; |
| 25 M.show(); |
| 26 var other = window.webkitNotifications.createNotification("", "Alarm
", "It's time to wake up!"); |
| 27 other.show(); |
| 28 var N = window.webkitNotifications.createNotification("", "New reply
", "Correction, 8:15"); |
| 29 N.replaceId = "NewMail"; |
| 30 N.show(); |
| 31 } |
| 32 </script> |
| 33 </head> |
| 34 <body> |
| 35 <p>Showing notifications with replace ID...</p> |
| 36 <div id="result"></div> |
| 37 <script type="text/javascript"> |
| 38 runTests(); |
| 39 </script> |
| 40 </body> |
| 41 </html> |
OLD | NEW |