blob: ad26d264aa4bd90692748da2297e060f26d443f7 [file] [log] [blame]
This tests the constructor for the BeforeLoadEvent DOM class.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS new BeforeLoadEvent('eventType').bubbles is false
PASS new BeforeLoadEvent('eventType').cancelable is false
PASS new BeforeLoadEvent('eventType').url is ""
PASS new BeforeLoadEvent('eventType', { bubbles: false }).bubbles is false
PASS new BeforeLoadEvent('eventType', { bubbles: true }).bubbles is true
PASS new BeforeLoadEvent('eventType', { cancelable: false }).cancelable is false
PASS new BeforeLoadEvent('eventType', { cancelable: true }).cancelable is true
PASS new BeforeLoadEvent('eventType', { url: 'doremi' }).url is "doremi"
PASS new BeforeLoadEvent('eventType', { url: '' }).url is ""
PASS new BeforeLoadEvent('eventType', { url: undefined }).url is ""
PASS new BeforeLoadEvent('eventType', { url: null }).url is "null"
PASS new BeforeLoadEvent('eventType', { url: false }).url is "false"
PASS new BeforeLoadEvent('eventType', { url: true }).url is "true"
PASS new BeforeLoadEvent('eventType', { url: 12345 }).url is "12345"
PASS new BeforeLoadEvent('eventType', { url: 18446744073709551615 }).url is "18446744073709552000"
PASS new BeforeLoadEvent('eventType', { url: NaN }).url is "NaN"
PASS new BeforeLoadEvent('eventType', { url: [] }).url is ""
PASS new BeforeLoadEvent('eventType', { url: [1, 2, 3] }).url is "1,2,3"
PASS new BeforeLoadEvent('eventType', { url: {doremi: 12345} }).url is "[object Object]"
PASS new BeforeLoadEvent('eventType', { url: {valueOf: function () { return 'doremi'; } } }).url is "[object Object]"
PASS new BeforeLoadEvent('eventType', { bubbles: true, cancelable: true, url: 'doremi' }).bubbles is true
PASS new BeforeLoadEvent('eventType', { bubbles: true, cancelable: true, url: 'doremi' }).cancelable is true
PASS new BeforeLoadEvent('eventType', { bubbles: true, cancelable: true, url: 'doremi' }).url is 'doremi'
PASS successfullyParsed is true
TEST COMPLETE