blob: 97608c3e7981402daf0d725c36b70940e723f136 [file] [log] [blame]
Tests support for 'passive' member in AddEventListenerOptions.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
document.body.addEventListener('test', passiveListenerFunction, { 'passive': true })
document.body.dispatchEvent(testEvent1)
PASS listenerCallCount is 1
PASS testEvent1.defaultPrevented is false
document.body.addEventListener('test', activeListenerFunction, { })
document.body.dispatchEvent(testEvent2)
PASS listenerCallCount is 2
PASS testEvent2.defaultPrevented is true
document.body.addEventListener('test', activeListenerFunction, { 'passive': false })
document.body.dispatchEvent(testEvent2)
PASS listenerCallCount is 2
PASS testEvent2.defaultPrevented is true
PASS successfullyParsed is true
TEST COMPLETE