blob: 9a456e341e4c96344979c5f583d7a36a4f2d9f3a [file] [log] [blame]
This tests the constructor for the PopStateEvent DOM class.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS new PopStateEvent('eventType').bubbles is false
PASS new PopStateEvent('eventType').cancelable is false
PASS new PopStateEvent('eventType').state is null
PASS new PopStateEvent('eventType', { bubbles: false }).bubbles is false
PASS new PopStateEvent('eventType', { bubbles: true }).bubbles is true
PASS new PopStateEvent('eventType', { cancelable: false }).cancelable is false
PASS new PopStateEvent('eventType', { cancelable: true }).cancelable is true
PASS new PopStateEvent('eventType', { state: object1 }).state is object1
PASS new PopStateEvent('eventType', { state: document }).state is document
PASS new PopStateEvent('eventType', { state: undefined }).state is null
PASS new PopStateEvent('eventType', { state: null }).state is null
PASS new PopStateEvent('eventType', { state: false }).state is false
PASS new PopStateEvent('eventType', { state: true }).state is true
PASS new PopStateEvent('eventType', { state: '' }).state is ""
PASS new PopStateEvent('eventType', { state: 'doremi' }).state is "doremi"
PASS new PopStateEvent('eventType', { state: 12345 }).state is 12345
PASS new PopStateEvent('eventType', { state: 18446744073709551615 }).state is 18446744073709552000
PASS new PopStateEvent('eventType', { state: NaN }).state is NaN
PASS new PopStateEvent('eventType', { state: {valueOf: function () { return object2; } } }).state == object2 is false
PASS new PopStateEvent('eventType', { get state() { return 123; } }).state is 123
PASS new PopStateEvent('eventType', { get state() { throw 'PopState Error'; } }) threw exception PopState Error.
PASS new PopStateEvent('eventType', { bubbles: true, cancelable: true, state: object3 }).bubbles is true
PASS new PopStateEvent('eventType', { bubbles: true, cancelable: true, state: object3 }).cancelable is true
PASS new PopStateEvent('eventType', { bubbles: true, cancelable: true, state: object3 }).state is object3
PASS successfullyParsed is true
TEST COMPLETE