blob: 934bd6fe28dd3152f3804e0329b8bc1ec71700bb [file] [log] [blame]
Tests calling initEvent() on an event while it is being dispatched and after.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS testEvent.initEvent("foo", true, false) did not throw exception.
PASS testEvent.type is "foo"
PASS testEvent.bubbles is true
PASS testEvent.cancelable is false
PASS testEvent.target is null
PASS testEvent.currentTarget is null
PASS testEvent.eventPhase is Event.NONE
* In event handler
PASS event.type is "foo"
PASS event.bubbles is true
PASS event.cancelable is false
PASS event.target is document.body
PASS event.currentTarget is document.body
PASS event.eventPhase is Event.AT_TARGET
PASS event.initEvent("bar", false, true) did not throw exception.
PASS event.type is "foo"
PASS event.bubbles is true
PASS event.cancelable is false
PASS event.target is document.body
PASS event.currentTarget is document.body
PASS event.eventPhase is Event.AT_TARGET
PASS document.body.dispatchEvent(testEvent) did not throw exception.
* After event has been dispatched
PASS testEvent.type is "foo"
PASS testEvent.bubbles is true
PASS testEvent.cancelable is false
PASS testEvent.target is document.body
PASS testEvent.currentTarget is null
PASS testEvent.eventPhase is Event.NONE
PASS testEvent.initEvent("bar", false, true) did not throw exception.
PASS testEvent.type is "bar"
PASS testEvent.bubbles is false
PASS testEvent.cancelable is true
PASS testEvent.target is null
PASS testEvent.currentTarget is null
PASS testEvent.eventPhase is Event.NONE
PASS successfullyParsed is true
TEST COMPLETE