blob: 2b710cd521b5e0b065c31986f8c9fb31feae74fc [file] [log] [blame]
This tests the constructor for the MediaStreamEvent DOM class.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS new MediaStreamEvent('eventType').bubbles is false
PASS new MediaStreamEvent('eventType').cancelable is false
PASS new MediaStreamEvent('eventType').stream is null
PASS new MediaStreamEvent('eventType', { bubbles: false }).bubbles is false
PASS new MediaStreamEvent('eventType', { bubbles: true }).bubbles is true
PASS new MediaStreamEvent('eventType', { cancelable: false }).cancelable is false
PASS new MediaStreamEvent('eventType', { cancelable: true }).cancelable is true
PASS new MediaStreamEvent('eventType', { stream: mediaStream }).stream is mediaStream
PASS new MediaStreamEvent('eventType', { stream: testObject }).stream threw exception TypeError: Type error.
PASS new MediaStreamEvent('eventType', { stream: document }).stream threw exception TypeError: Type error.
PASS new MediaStreamEvent('eventType', { stream: undefined }).stream is null
PASS new MediaStreamEvent('eventType', { stream: null }).stream is null
PASS new MediaStreamEvent('eventType', { stream: false }).stream threw exception TypeError: Type error.
PASS new MediaStreamEvent('eventType', { stream: true }).stream threw exception TypeError: Type error.
PASS new MediaStreamEvent('eventType', { stream: '' }).stream threw exception TypeError: Type error.
PASS new MediaStreamEvent('eventType', { stream: 'chocolate' }).stream threw exception TypeError: Type error.
PASS new MediaStreamEvent('eventType', { stream: 12345 }).stream threw exception TypeError: Type error.
PASS new MediaStreamEvent('eventType', { stream: 18446744073709551615 }).stream threw exception TypeError: Type error.
PASS new MediaStreamEvent('eventType', { stream: NaN }).stream threw exception TypeError: Type error.
PASS new MediaStreamEvent('eventType', { stream: {valueOf: function () { return mediaStream; } } }).stream threw exception TypeError: Type error.
PASS new MediaStreamEvent('eventType', { get stream() { return 123; } }).stream threw exception TypeError: Type error.
PASS new MediaStreamEvent('eventType', { get stream() { throw 'MediaStreamEvent Error'; } }) threw exception MediaStreamEvent Error.
PASS new MediaStreamEvent('eventType', { bubbles: true, cancelable: true, stream: mediaStream }).bubbles is true
PASS new MediaStreamEvent('eventType', { bubbles: true, cancelable: true, stream: mediaStream }).cancelable is true
PASS new MediaStreamEvent('eventType', { bubbles: true, cancelable: true, stream: mediaStream }).stream is mediaStream
PASS successfullyParsed is true
TEST COMPLETE