Skip to content
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.returnValue #4305

Closed
wants to merge 2 commits into from
Closed

Add tests for Event.returnValue #4305

wants to merge 2 commits into from

Conversation

cvrebert
Copy link
Contributor

@cvrebert cvrebert commented Dec 9, 2016

Refs whatwg/dom#334
This assumes that Event.returnValue = false is spec'd as equivalent to Event.preventDefault(), with Event.returnValue = true spec'd as a no-op.

@wpt-pr-bot
Copy link
Collaborator

Notifying @Ms2ger, @ayg, @jdm, @zcorpan, and @zqzhang. (Learn how reviewing works.)

@wpt-stability-bot
Copy link

wpt-stability-bot commented Dec 9, 2016

Firefox

Testing revision 7cd5c05
Starting 10 test iterations
All results were stable

All results

/dom/events/Event-initEvent.html

Subtest Results
OK
Properties of initEvent(type, true, false) FAIL
Calling initEvent during propagation. PASS
Properties of initEvent(type, false, true) FAIL
Calling initEvent must unset the stop immediate propagation flag. PASS
Calling initEvent must unset the stop propagation flag. PASS
Calling initEvent multiple times (getting type). PASS
Calling initEvent multiple times (not getting type). PASS
Properties of initEvent(type, true, true) FAIL
Properties of initEvent(type, false, false) FAIL
Calling initEvent must not have an effect during dispatching. PASS

/dom/events/AddEventListenerOptions-passive.html

Subtest Results
OK
passive behavior of one listener should be unaffected by the presence of other listeners PASS
Equivalence of option values PASS
Supports passive option on addEventListener only PASS
returnValue should be ignored if-and-only-if the passive option is true FAIL
preventDefault should be ignored if-and-only-if the passive option is true PASS

/dom/events/Event-defaultPrevented-after-dispatch.html

Subtest Results
OK
Default prevention via returnValue FAIL
Default prevention via preventDefault PASS

/dom/events/Event-returnValue.html

Subtest Results
OK
preventDefault() should change returnValue if cancelable is true. FAIL
preventDefault() should not change returnValue if cancelable is false. FAIL
When an event is created, returnValue should be initialized to true. FAIL
returnValue=false should have no effect if cancelable is false. FAIL
initEvent should unset returnValue. FAIL
returnValue should change returnValue if cancelable is true. FAIL
initEvent should work correctly (cancelable). FAIL
returnValue=true should have no effect. FAIL
initEvent should work correctly (not cancelable). FAIL

/dom/events/EventTarget-dispatchEvent-returnvalue.html

Subtest Results
OK
Return value of EventTarget.dispatchEvent() affected by preventDefault(). FAIL
Return value of EventTarget.dispatchEvent() affected by returnValue. FAIL

/dom/events/Event-dispatch-click.html

Subtest Results
OK
event state during post-click handling FAIL
redispatch during post-click handling FAIL
disabled checkbox still has activation behavior PASS
pick the first with activation behavior <a href> FAIL
disconnected radio should be checked FAIL
disconnected form should not submit PASS
basic with wrong event class PASS
disabled checkbox still has activation behavior, part 2 FAIL
pick the first with activation behavior <input type=checkbox> FAIL
disconnected checkbox should be checked FAIL
look at parents when event bubbles PASS
look at parents only when event bubbles FAIL
basic with click() PASS
basic with dispatchEvent() PASS

/dom/events/Event-defaultPrevented.html

Subtest Results
OK
returnValue should not change defaultPrevented if cancelable is false. PASS
returnValue should change defaultPrevented if cancelable is true. PASS
When an event is created, defaultPrevented should be initialized to false. PASS
preventDefault() should not change defaultPrevented if cancelable is false. PASS
preventDefault() should change defaultPrevented if cancelable is true. PASS
initEvent should work correctly (cancelable). PASS
initEvent should unset defaultPrevented. PASS
initEvent should work correctly (not cancelable). PASS

/dom/events/Event-constructors.html

Subtest Results
OK
Event constructors 11 PASS
Event constructors 10 PASS
Event constructors PASS
Event constructors 3 FAIL
Event constructors 2 FAIL
Event constructors 1 PASS
Event constructors 7 PASS
Event constructors 6 PASS
Event constructors 5 PASS
Event constructors 4 PASS
Event constructors 9 PASS
Event constructors 8 PASS
Event constructors 12 PASS

@wpt-stability-bot
Copy link

wpt-stability-bot commented Dec 9, 2016

Chrome

Testing revision 7cd5c05
Starting 10 test iterations
All results were stable

All results

/dom/events/Event-initEvent.html

Subtest Results
OK
Properties of initEvent(type, true, false) PASS
Calling initEvent during propagation. PASS
Properties of initEvent(type, false, true) PASS
Calling initEvent must unset the stop immediate propagation flag. PASS
Calling initEvent must unset the stop propagation flag. PASS
Calling initEvent multiple times (getting type). PASS
Calling initEvent multiple times (not getting type). PASS
Properties of initEvent(type, true, true) PASS
Properties of initEvent(type, false, false) PASS
Calling initEvent must not have an effect during dispatching. PASS

/dom/events/AddEventListenerOptions-passive.html

Subtest Results
ERROR
passive behavior of one listener should be unaffected by the presence of other listeners FAIL
Equivalence of option values PASS
Supports passive option on addEventListener only PASS
returnValue should be ignored if-and-only-if the passive option is true FAIL
preventDefault should be ignored if-and-only-if the passive option is true PASS

/dom/events/Event-defaultPrevented-after-dispatch.html

Subtest Results
OK
Default prevention via returnValue PASS
Default prevention via preventDefault PASS

/dom/events/Event-returnValue.html

Subtest Results
OK
preventDefault() should change returnValue if cancelable is true. FAIL
preventDefault() should not change returnValue if cancelable is false. PASS
When an event is created, returnValue should be initialized to true. PASS
returnValue=false should have no effect if cancelable is false. FAIL
initEvent should unset returnValue. PASS
returnValue should change returnValue if cancelable is true. FAIL
initEvent should work correctly (cancelable). PASS
returnValue=true should have no effect. FAIL
initEvent should work correctly (not cancelable). PASS

/dom/events/EventTarget-dispatchEvent-returnvalue.html

Subtest Results
OK
Return value of EventTarget.dispatchEvent() affected by preventDefault(). PASS
Return value of EventTarget.dispatchEvent() affected by returnValue. PASS

/dom/events/Event-dispatch-click.html

Subtest Results
OK
event state during post-click handling PASS
redispatch during post-click handling PASS
disabled checkbox still has activation behavior PASS
pick the first with activation behavior <a href> PASS
disconnected radio should be checked PASS
disconnected form should not submit FAIL
basic with wrong event class PASS
disabled checkbox still has activation behavior, part 2 PASS
pick the first with activation behavior <input type=checkbox> FAIL
disconnected checkbox should be checked PASS
look at parents when event bubbles FAIL
look at parents only when event bubbles PASS
basic with click() PASS
basic with dispatchEvent() PASS

/dom/events/Event-defaultPrevented.html

Subtest Results
OK
returnValue should not change defaultPrevented if cancelable is false. FAIL
returnValue should change defaultPrevented if cancelable is true. PASS
When an event is created, defaultPrevented should be initialized to false. PASS
preventDefault() should not change defaultPrevented if cancelable is false. PASS
preventDefault() should change defaultPrevented if cancelable is true. PASS
initEvent should work correctly (cancelable). PASS
initEvent should unset defaultPrevented. PASS
initEvent should work correctly (not cancelable). PASS

/dom/events/Event-constructors.html

Subtest Results
OK
Event constructors 11 PASS
Event constructors 10 PASS
Event constructors PASS
Event constructors 3 PASS
Event constructors 2 PASS
Event constructors 1 PASS
Event constructors 7 PASS
Event constructors 6 PASS
Event constructors 5 PASS
Event constructors 4 PASS
Event constructors 9 PASS
Event constructors 8 PASS
Event constructors 12 PASS

@miketaylr
Copy link
Member

I cherry-picked these two commits (fixing up the comma fix into the first) into #4790, so let's close this one and continue review in #4790.

@miketaylr miketaylr closed this Feb 17, 2017
@miketaylr miketaylr deleted the returnValue branch February 17, 2017 22:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants