blob: 14b53a0c2302ee780b915aa807aa68159f9f3759 [file] [log] [blame]
This tests the constructor for the ProgressEvent DOM class.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS new ProgressEvent('eventType').bubbles is false
PASS new ProgressEvent('eventType').cancelable is false
PASS new ProgressEvent('eventType').lengthComputable is false
PASS new ProgressEvent('eventType').loaded is 0
PASS new ProgressEvent('eventType').total is 0
PASS new ProgressEvent('eventType', { bubbles: false }).bubbles is false
PASS new ProgressEvent('eventType', { bubbles: true }).bubbles is true
PASS new ProgressEvent('eventType', { cancelable: false }).cancelable is false
PASS new ProgressEvent('eventType', { cancelable: true }).cancelable is true
PASS new ProgressEvent('eventType', { lengthComputable: false }).lengthComputable is false
PASS new ProgressEvent('eventType', { lengthComputable: true }).lengthComputable is true
PASS new ProgressEvent('eventType', { loaded: 0 }).loaded is 0
PASS new ProgressEvent('eventType', { loaded: 1 }).loaded is 1
PASS new ProgressEvent('eventType', { loaded: 9007199254740990 }).loaded is 9007199254740990
PASS new ProgressEvent('eventType', { loaded: 9007199254740991 }).loaded is 9007199254740991
PASS new ProgressEvent('eventType', { loaded: 18446744073709551615 }).loaded is 0
PASS new ProgressEvent('eventType', { loaded: 12345678901234567890 }).loaded is 12345678901234567890
PASS new ProgressEvent('eventType', { loaded: -1 }).loaded is 18446744073709551615
PASS new ProgressEvent('eventType', { loaded: NaN }).loaded is 0
PASS new ProgressEvent('eventType', { loaded: 123.45 }).loaded is 123
PASS new ProgressEvent('eventType', { loaded: undefined }).loaded is 0
PASS new ProgressEvent('eventType', { loaded: null }).loaded is 0
PASS new ProgressEvent('eventType', { loaded: '' }).loaded is 0
PASS new ProgressEvent('eventType', { loaded: '12345' }).loaded is 12345
PASS new ProgressEvent('eventType', { loaded: '12345a' }).loaded is 0
PASS new ProgressEvent('eventType', { loaded: 'abc' }).loaded is 0
PASS new ProgressEvent('eventType', { loaded: [] }).loaded is 0
PASS new ProgressEvent('eventType', { loaded: [12345] }).loaded is 12345
PASS new ProgressEvent('eventType', { loaded: [12345, 67890] }).loaded is 0
PASS new ProgressEvent('eventType', { loaded: {} }).loaded is 0
PASS new ProgressEvent('eventType', { loaded: {moe: 12345} }).loaded is 0
PASS new ProgressEvent('eventType', { loaded: {valueOf: function () { return 12345; }} }).loaded is 12345
PASS new ProgressEvent('eventType', { total: 0 }).total is 0
PASS new ProgressEvent('eventType', { total: 1 }).total is 1
PASS new ProgressEvent('eventType', { total: 9007199254740990 }).total is 9007199254740990
PASS new ProgressEvent('eventType', { total: 9007199254740991 }).total is 9007199254740991
PASS new ProgressEvent('eventType', { total: 18446744073709551615 }).total is 0
PASS new ProgressEvent('eventType', { total: 12345678901234567890 }).total is 12345678901234567890
PASS new ProgressEvent('eventType', { total: -1 }).total is 18446744073709551615
PASS new ProgressEvent('eventType', { total: NaN }).total is 0
PASS new ProgressEvent('eventType', { total: 123.45 }).total is 123
PASS new ProgressEvent('eventType', { total: undefined }).total is 0
PASS new ProgressEvent('eventType', { total: null }).total is 0
PASS new ProgressEvent('eventType', { total: '' }).total is 0
PASS new ProgressEvent('eventType', { total: '12345' }).total is 12345
PASS new ProgressEvent('eventType', { total: '12345a' }).total is 0
PASS new ProgressEvent('eventType', { total: 'abc' }).total is 0
PASS new ProgressEvent('eventType', { total: [] }).total is 0
PASS new ProgressEvent('eventType', { total: [12345] }).total is 12345
PASS new ProgressEvent('eventType', { total: [12345, 67890] }).total is 0
PASS new ProgressEvent('eventType', { total: {} }).total is 0
PASS new ProgressEvent('eventType', { total: {moe: 12345} }).total is 0
PASS new ProgressEvent('eventType', { total: {valueOf: function () { return 12345; }} }).total is 12345
PASS new ProgressEvent('eventType', { bubbles: true, cancelable: true, lengthComputable: true, loaded: 12345, total: 12345 }).bubbles is true
PASS new ProgressEvent('eventType', { bubbles: true, cancelable: true, lengthComputable: true, loaded: 12345, total: 12345 }).cancelable is true
PASS new ProgressEvent('eventType', { bubbles: true, cancelable: true, lengthComputable: true, loaded: 12345, total: 12345 }).lengthComputable is true
PASS new ProgressEvent('eventType', { bubbles: true, cancelable: true, lengthComputable: true, loaded: 12345, total: 12345 }).loaded is 12345
PASS new ProgressEvent('eventType', { bubbles: true, cancelable: true, lengthComputable: true, loaded: 12345, total: 12345 }).total is 12345
PASS successfullyParsed is true
TEST COMPLETE