Running new Notification() show the notification regardless of whether the security origin has permission to do so. It should instead be calling the onerror() callback.
<rdar://problem/11315405>
Created attachment 138738 [details] Patch
Comment on attachment 138738 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=138738&action=review > Source/WebCore/ChangeLog:18 > + (WebCore::Notification::dispatchErrorEvent): The default constructor of ErrorEvent doesn't > + create the proper event object. Create it using Event::create(). Is there a test showing that this was wrong?
(In reply to comment #3) > (From update of attachment 138738 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=138738&action=review > > > Source/WebCore/ChangeLog:18 > > + (WebCore::Notification::dispatchErrorEvent): The default constructor of ErrorEvent doesn't > > + create the proper event object. Create it using Event::create(). > > Is there a test showing that this was wrong? No. The only tests available are of the legacy API, which threw an exception when creating the notification, so there was no situation in which the error event got dispatched. The new behavior based on the latest draft of the spec utilizes this event. There are a series of tasks already in bugzilla for bringing the notifications tests up to date once support for notifications is available on the mac.
Committed r115166: <http://trac.webkit.org/changeset/115166>