108 lines
4.1 KiB
Plaintext
108 lines
4.1 KiB
Plaintext
Tests that the various init*Event() functions work on an event that has already been dispatched.
|
|
|
|
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
|
|
|
|
|
|
* CompositionEvent.prototype.initCompositionEvent()
|
|
testEvent = document.createEvent(createEventString)
|
|
PASS testEvent.__proto__ is window[eventType].prototype
|
|
testEvent[initMethodName]('firstType', true, true)
|
|
PASS testEvent.type is "firstType"
|
|
PASS testEvent.bubbles is true
|
|
PASS testEvent.cancelable is true
|
|
PASS document.body.dispatchEvent(testEvent) is true
|
|
testEvent[initMethodName]('secondType', false, false)
|
|
PASS testEvent.type is "secondType"
|
|
PASS testEvent.bubbles is false
|
|
PASS testEvent.cancelable is false
|
|
PASS document.body.dispatchEvent(testEvent) is true
|
|
|
|
* HashChangeEvent.prototype.initHashChangeEvent()
|
|
testEvent = document.createEvent(createEventString)
|
|
PASS testEvent.__proto__ is window[eventType].prototype
|
|
testEvent[initMethodName]('firstType', true, true)
|
|
PASS testEvent.type is "firstType"
|
|
PASS testEvent.bubbles is true
|
|
PASS testEvent.cancelable is true
|
|
PASS document.body.dispatchEvent(testEvent) is true
|
|
testEvent[initMethodName]('secondType', false, false)
|
|
PASS testEvent.type is "secondType"
|
|
PASS testEvent.bubbles is false
|
|
PASS testEvent.cancelable is false
|
|
PASS document.body.dispatchEvent(testEvent) is true
|
|
|
|
* KeyboardEvent.prototype.initKeyboardEvent()
|
|
testEvent = document.createEvent(createEventString)
|
|
PASS testEvent.__proto__ is window[eventType].prototype
|
|
testEvent[initMethodName]('firstType', true, true)
|
|
PASS testEvent.type is "firstType"
|
|
PASS testEvent.bubbles is true
|
|
PASS testEvent.cancelable is true
|
|
PASS document.body.dispatchEvent(testEvent) is true
|
|
testEvent[initMethodName]('secondType', false, false)
|
|
PASS testEvent.type is "secondType"
|
|
PASS testEvent.bubbles is false
|
|
PASS testEvent.cancelable is false
|
|
PASS document.body.dispatchEvent(testEvent) is true
|
|
|
|
* MessageEvent.prototype.initMessageEvent()
|
|
testEvent = document.createEvent(createEventString)
|
|
PASS testEvent.__proto__ is window[eventType].prototype
|
|
testEvent[initMethodName]('firstType', true, true)
|
|
PASS testEvent.type is "firstType"
|
|
PASS testEvent.bubbles is true
|
|
PASS testEvent.cancelable is true
|
|
PASS document.body.dispatchEvent(testEvent) is true
|
|
testEvent[initMethodName]('secondType', false, false)
|
|
PASS testEvent.type is "secondType"
|
|
PASS testEvent.bubbles is false
|
|
PASS testEvent.cancelable is false
|
|
PASS document.body.dispatchEvent(testEvent) is true
|
|
|
|
* TextEvent.prototype.initTextEvent()
|
|
testEvent = document.createEvent(createEventString)
|
|
PASS testEvent.__proto__ is window[eventType].prototype
|
|
testEvent[initMethodName]('firstType', true, true)
|
|
PASS testEvent.type is "firstType"
|
|
PASS testEvent.bubbles is true
|
|
PASS testEvent.cancelable is true
|
|
PASS document.body.dispatchEvent(testEvent) is true
|
|
testEvent[initMethodName]('secondType', false, false)
|
|
PASS testEvent.type is "secondType"
|
|
PASS testEvent.bubbles is false
|
|
PASS testEvent.cancelable is false
|
|
PASS document.body.dispatchEvent(testEvent) is true
|
|
|
|
* UIEvent.prototype.initUIEvent()
|
|
testEvent = document.createEvent(createEventString)
|
|
PASS testEvent.__proto__ is window[eventType].prototype
|
|
testEvent[initMethodName]('firstType', true, true)
|
|
PASS testEvent.type is "firstType"
|
|
PASS testEvent.bubbles is true
|
|
PASS testEvent.cancelable is true
|
|
PASS document.body.dispatchEvent(testEvent) is true
|
|
testEvent[initMethodName]('secondType', false, false)
|
|
PASS testEvent.type is "secondType"
|
|
PASS testEvent.bubbles is false
|
|
PASS testEvent.cancelable is false
|
|
PASS document.body.dispatchEvent(testEvent) is true
|
|
|
|
* StorageEvent.prototype.initStorageEvent()
|
|
testEvent = document.createEvent(createEventString)
|
|
PASS testEvent.__proto__ is window[eventType].prototype
|
|
testEvent[initMethodName]('firstType', true, true)
|
|
PASS testEvent.type is "firstType"
|
|
PASS testEvent.bubbles is true
|
|
PASS testEvent.cancelable is true
|
|
PASS document.body.dispatchEvent(testEvent) is true
|
|
testEvent[initMethodName]('secondType', false, false)
|
|
PASS testEvent.type is "secondType"
|
|
PASS testEvent.bubbles is false
|
|
PASS testEvent.cancelable is false
|
|
PASS document.body.dispatchEvent(testEvent) is true
|
|
|
|
PASS successfullyParsed is true
|
|
|
|
TEST COMPLETE
|
|
|