OLD | NEW |
1 Tests that the addTextTrack() only accepts known 'kind' values. | 1 Tests that the addTextTrack() only accepts known 'kind' values. |
2 | 2 |
3 ++ Test invalid 'kind'. | 3 ++ Test invalid 'kind'. |
4 EXPECTED (video.textTracks.length == '0') OK | 4 EXPECTED (video.textTracks.length == '0') OK |
5 TEST(video.addTextTrack('kaptions')) THROWS(DOMException.SYNTAX_ERR: Failed to e
xecute 'addTextTrack' on 'HTMLMediaElement': The 'kind' provided ('kaptions') is
invalid.) OK | 5 TEST(video.addTextTrack('kaptions')) THROWS("TypeError: Failed to execute 'addTe
xtTrack' on 'HTMLMediaElement': parameter 1 ('kaptions') is not a valid enum val
ue.") OK |
6 EXPECTED (video.textTracks.length == '0') OK | 6 EXPECTED (video.textTracks.length == '0') OK |
7 | 7 |
8 ++ Test all valid 'kind' keywords. | 8 ++ Test all valid 'kind' keywords. |
9 RUN(video.addTextTrack('subtitles')) | 9 RUN(video.addTextTrack('subtitles')) |
10 EXPECTED (video.textTracks.length == '1') OK | 10 EXPECTED (video.textTracks.length == '1') OK |
11 RUN(video.addTextTrack('captions')) | 11 RUN(video.addTextTrack('captions')) |
12 EXPECTED (video.textTracks.length == '2') OK | 12 EXPECTED (video.textTracks.length == '2') OK |
13 RUN(video.addTextTrack('descriptions')) | 13 RUN(video.addTextTrack('descriptions')) |
14 EXPECTED (video.textTracks.length == '3') OK | 14 EXPECTED (video.textTracks.length == '3') OK |
15 RUN(video.addTextTrack('chapters')) | 15 RUN(video.addTextTrack('chapters')) |
16 EXPECTED (video.textTracks.length == '4') OK | 16 EXPECTED (video.textTracks.length == '4') OK |
17 RUN(video.addTextTrack('metadata')) | 17 RUN(video.addTextTrack('metadata')) |
18 EXPECTED (video.textTracks.length == '5') OK | 18 EXPECTED (video.textTracks.length == '5') OK |
19 | 19 |
20 END OF TEST | 20 END OF TEST |
21 | 21 |
OLD | NEW |