event-onerror-default-manual.https.html (1057B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <title>Notification.onerror (permission=default)</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 if (Notification.permission != "default") { 10 alert("TEST NOT RUN. Change your browser settings so that the notification" 11 + " settings for this origin are completely cleared/removed, (so your" 12 + " browser default settings are used for this origin), and then reload" 13 + " this page.") 14 } else { 15 async_test(function (t) { 16 t.step(function () { 17 var notification = new Notification("New Email Received") 18 notification.onerror = function(e) { 19 assert_equals(Object.prototype.toString.call(e), "[object Event]") 20 assert_equals(e.type, "error") 21 Notification.requestPermission() 22 t.done() 23 } 24 }) 25 }) 26 } 27 </script>