36 lines
1.7 KiB
Plaintext
36 lines
1.7 KiB
Plaintext
This tests the constructor for the TrackEvent DOM class.
|
|
|
|
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
|
|
|
|
|
|
|
|
*** No initializer passed ***
|
|
PASS new TrackEvent('TrackEvent').bubbles is false
|
|
PASS new TrackEvent('TrackEvent').cancelable is false
|
|
PASS new TrackEvent('TrackEvent').track is null
|
|
|
|
*** Bubbles and cancelable true, track is missing ***
|
|
PASS new TrackEvent('TrackEvent', { bubbles: true, cancelable: true }).bubbles is true
|
|
PASS new TrackEvent('TrackEvent', { bubbles: true, cancelable: true }).cancelable is true
|
|
PASS new TrackEvent('TrackEvent', { bubbles: true, cancelable: true }).track is null
|
|
|
|
*** Invalid track ***
|
|
PASS new TrackEvent('TrackEvent', { track: HTMLTrackElement }) threw exception TypeError: Type error.
|
|
PASS new TrackEvent('TrackEvent', { track: 10 }) threw exception TypeError: Type error.
|
|
PASS new TrackEvent('TrackEvent', { track: 'string' }) threw exception TypeError: Type error.
|
|
PASS new TrackEvent('TrackEvent', { track: emptyObject }) threw exception TypeError: Type error.
|
|
PASS new TrackEvent('TrackEvent', { track: document }) threw exception TypeError: Type error.
|
|
|
|
*** Bubbles and cancelable true, valid track ***
|
|
PASS new TrackEvent('TrackEvent', { bubbles: true, cancelable: true, track: trackElement.track }).bubbles is true
|
|
PASS new TrackEvent('TrackEvent', { bubbles: true, cancelable: true, track: trackElement.track }).cancelable is true
|
|
PASS new TrackEvent('TrackEvent', { track: trackElement.track }).track is trackElement.track
|
|
|
|
*** Initialize 'track' with valid track object ***
|
|
PASS new TrackEvent('TrackEvent', { track: trackElement.track }).track is trackElement.track
|
|
|
|
PASS successfullyParsed is true
|
|
|
|
TEST COMPLETE
|
|
|