event-onerror-denied-manual.https.html (970B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <title>Notification.onerror (permission=denied)</title> 4 <link rel="author" title="Apple Inc." href="http://www.apple.com/"> 5 <script src="/resources/testharness.js"></script> 6 <script src="/resources/testharnessreport.js"></script> 7 <script> 8 setup({ explicit_timeout: true }) 9 Notification.requestPermission() 10 if (Notification.permission != "denied") { 11 alert("TEST NOT RUN. Change your browser settings so that notifications" 12 + " for this origin are blocked, and then reload this page.") 13 } else { 14 async_test(function (t) { 15 t.step(function () { 16 var notification = new Notification("New Email Received") 17 notification.onerror = function(e) { 18 assert_equals(Object.prototype.toString.call(e), "[object Event]") 19 assert_equals(e.type, "error") 20 Notification.requestPermission() 21 t.done() 22 } 23 }) 24 }) 25 } 26 </script>