blob: 072c3d2ab053a8237ff4a6feb56a3039610d1825 [file] [log] [blame]
Tests that the addTextTrack() only accepts known 'kind' values.
++ Test invalid 'kind'.
EXPECTED (video.textTracks.length == '0') OK
TEST(video.addTextTrack('kaptions')) THROWS('TypeError: Type error') OK
EXPECTED (video.textTracks.length == '0') OK
++ Test all valid 'kind' keywords.
RUN(video.addTextTrack('subtitles'))
EXPECTED (video.textTracks.length == '1') OK
RUN(video.addTextTrack('captions'))
EXPECTED (video.textTracks.length == '2') OK
RUN(video.addTextTrack('descriptions'))
EXPECTED (video.textTracks.length == '3') OK
RUN(video.addTextTrack('chapters'))
EXPECTED (video.textTracks.length == '4') OK
RUN(video.addTextTrack('metadata'))
EXPECTED (video.textTracks.length == '5') OK
END OF TEST