The options dictionary in Notification constructor should not accept event listeners
authorjonlee@apple.com <jonlee@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 10 Sep 2012 18:08:25 +0000 (18:08 +0000)
committerjonlee@apple.com <jonlee@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 10 Sep 2012 18:08:25 +0000 (18:08 +0000)
commit47ba545d2e906e387da866f5355ff4b5e0c413e4
tree9d9f9cddb1018cb72c6d38505552fbe3f8af2dc4
parent5ede0552e4719f996fef03c5019ae4d1c680b427
The options dictionary in Notification constructor should not accept event listeners
https://bugs.webkit.org/show_bug.cgi?id=95538
<rdar://problem/12213901>

Reviewed by Alexey Proskuryakov.

Source/WebCore:

The latest spec only allows setting the event listeners after the notification has been created.

Test: http/tests/notifications/events-in-dictionary.html

* Modules/notifications/Notification.cpp:
(WebCore::Notification::create): Do not look for the event handlers in the options dictionary.

LayoutTests:

Make sure the onshow handler added in the options dictionary does not get called.

* http/tests/notifications/events-in-dictionary-expected.txt: Added.
* http/tests/notifications/events-in-dictionary.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@128080 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/http/tests/notifications/events-in-dictionary-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/notifications/events-in-dictionary.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/Modules/notifications/Notification.cpp