-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add tests for Event.srcElement and Event.returnValue #10258
Conversation
Build PASSEDStarted: 2018-03-30 21:40:02 View more information about this build on: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems there is some duplication, but generally seems fine.
dom/interfaces.html
Outdated
@@ -8,6 +8,7 @@ | |||
|
|||
<h1>DOM IDL tests</h1> | |||
<div id=log></div> | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe not touch this?
See whatwg/dom#625 for details.
795381e
to
17ca4be
Compare
Addressed my own nit. |
Unfortunately the web depends on these. They are intentionally defined in such a way to not offer capabilities beyond the non-historical API for events. Tests: web-platform-tests/wpt#10258. Fixes whatwg#625.
Unfortunately the web depends on these. They are intentionally defined in such a way to not offer capabilities beyond the non-historical API for events. Tests: web-platform-tests/wpt#10258. Fixes whatwg#625 and fixes whatwg#627.
Hmm, these tests cause harness failures due to not wrapping the listeners appropriately. |
See whatwg/dom#625 for details.
17ca4be
to
22ee639
Compare
Fixed that. |
Unfortunately the web depends on these. They are intentionally defined in such a way to not offer capabilities beyond the non-historical API for events. Tests: web-platform-tests/wpt#10258. Fixes #625 and fixes #627.
https://bugs.webkit.org/show_bug.cgi?id=184415 Reviewed by Darin Adler. LayoutTests/imported/w3c: Import test coverage from web-platform-tests/wpt#10258. * web-platform-tests/dom/events/AddEventListenerOptions-passive-expected.txt: * web-platform-tests/dom/events/AddEventListenerOptions-passive.html: * web-platform-tests/dom/events/Event-constructors.html: * web-platform-tests/dom/events/Event-defaultPrevented-after-dispatch-expected.txt: * web-platform-tests/dom/events/Event-defaultPrevented-after-dispatch.html: * web-platform-tests/dom/events/Event-defaultPrevented-expected.txt: * web-platform-tests/dom/events/Event-defaultPrevented.html: * web-platform-tests/dom/events/Event-dispatch-click.html: * web-platform-tests/dom/events/Event-dispatch-detached-click.html: * web-platform-tests/dom/events/Event-dispatch-other-document.html: * web-platform-tests/dom/events/Event-initEvent.html: * web-platform-tests/dom/events/Event-returnValue-expected.txt: Added. * web-platform-tests/dom/events/Event-returnValue.html: Added. * web-platform-tests/dom/events/EventListener-handleEvent.html: * web-platform-tests/dom/events/EventTarget-dispatchEvent-returnvalue-expected.txt: * web-platform-tests/dom/events/EventTarget-dispatchEvent-returnvalue.html: * web-platform-tests/dom/events/w3c-import.log: * web-platform-tests/dom/interfaces-expected.txt: * web-platform-tests/interfaces/dom.idl: Source/WebCore: Update Event.returnValue setter to match the latest DOM specification after: - whatwg/dom#626 In particular, the returnValue setter is now a no-op if the new flag value is true. If the input flag value is false, it only sets the 'canceled' flag if the event is cancelable and the event’s in passive listener flag is unset. Test: imported/w3c/web-platform-tests/dom/events/Event-returnValue.html * dom/Event.cpp: (WebCore::Event::setLegacyReturnValue): (WebCore::Event::setCanceledFlagIfPossible): (WebCore::Event::preventDefault): * dom/Event.h: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@230664 268f45cc-cd09-0410-ab3c-d52691b4dbfc
srcElement and returnValue were specified in [1] and have WPTs in [2]. cancelBubble is documented in [3] and has a WPT which passes in all browsers in [4]. [1] whatwg/dom#407 [2] web-platform-tests/wpt#10258 [3] https://developer.mozilla.org/en-US/docs/Web/API/Event/cancelBubble [4] https://wpt.fyi/results/dom/events/Event-cancelBubble.html Fixed: 692695 Change-Id: Ia7113a9996a0e272829a3e81bf751412444e9ba8 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2610947 Reviewed-by: Mason Freed <masonfreed@chromium.org> Commit-Queue: Joey Arhar <jarhar@chromium.org> Cr-Commit-Position: refs/heads/master@{#840397}
srcElement and returnValue were specified in [1] and have WPTs in [2]. cancelBubble is documented in [3] and has a WPT which passes in all browsers in [4]. [1] whatwg/dom#407 [2] web-platform-tests/wpt#10258 [3] https://developer.mozilla.org/en-US/docs/Web/API/Event/cancelBubble [4] https://wpt.fyi/results/dom/events/Event-cancelBubble.html Fixed: 692695 Change-Id: Ia7113a9996a0e272829a3e81bf751412444e9ba8 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2610947 Reviewed-by: Mason Freed <masonfreed@chromium.org> Commit-Queue: Joey Arhar <jarhar@chromium.org> Cr-Commit-Position: refs/heads/master@{#840397} GitOrigin-RevId: 3de46b6619a24531b2277b243ac39484a8ca5505
(these tests were already r+'d in #4790, but splitting them out from the
window.event
stuff so they can land independent of that).r? @annevk