blob: ca24e17d887c37a516b13177f0bfd6dbec6db182 [file] [log] [blame]
This tests the constructors for all the event DOM classes that have them.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS (new Event('eventType')).bubbles is false
PASS (new Event('eventType')).cancelable is false
PASS (new Event('eventType', { bubbles: true, cancelable: true })).bubbles is true
PASS (new Event('eventType', { bubbles: true, cancelable: true })).cancelable is true
PASS (new Event('eventType', { bubbles: true, cancelable: false })).bubbles is true
PASS (new Event('eventType', { bubbles: true, cancelable: false })).cancelable is false
PASS (new Event('eventType', { bubbles: true, cancelable: undefined })).bubbles is true
PASS (new Event('eventType', { bubbles: true, cancelable: undefined })).cancelable is false
PASS (new Event('eventType', { bubbles: true, cancelable: 0 })).bubbles is true
PASS (new Event('eventType', { bubbles: true, cancelable: 0 })).cancelable is false
PASS (new Event('eventType', { bubbles: true })).bubbles is true
PASS (new Event('eventType', { bubbles: true })).cancelable is false
PASS (new Event('eventType', { })).bubbles is false
PASS (new Event('eventType', { })).cancelable is false
PASS (new Event('eventType', null)).bubbles is false
PASS (new Event('eventType', null)).cancelable is false
PASS (new Event('eventType', undefined)).bubbles is false
PASS (new Event('eventType', undefined)).cancelable is false
PASS new Event('eventType', 0) threw exception TypeError: Type error.
PASS (new Event('eventType', window)).bubbles is false
PASS (new Event('eventType', window)).cancelable is false
PASS (new Event('eventType', window)).bubbles is true
PASS (new Event('eventType', window)).cancelable is false
PASS (new Event('eventType', document)).bubbles is true
PASS (new Event('eventType', document)).cancelable is false
PASS (new Event('eventType', constructible)).bubbles is true
PASS (new Event('eventType', constructible)).cancelable is false
PASS (new Event('eventType', { bubbles: true, cancelable: true, other: true })).bubbles is true
PASS (new Event('eventType', { bubbles: true, cancelable: true, other: true })).cancelable is true
PASS (new Event('eventType', { bubbles: true, get cancelable() { return true; } })).bubbles is true
PASS (new Event('eventType', { bubbles: true, get cancelable() { return true; } })).cancelable is true
PASS (new Event('eventType', { bubbles: true, get cancelable() { return false; } })).bubbles is true
PASS (new Event('eventType', { bubbles: true, get cancelable() { return false; } })).cancelable is false
PASS new Event('eventType', { bubbles: true, get cancelable() { throw 'Custom Error'; } }) threw exception Custom Error.
PASS successfullyParsed is true
TEST COMPLETE