blob: 0e260ff85c308b4dc6b5427c50d66ab59cef684d [file] [log] [blame]
Tests 'manual' caption mode.
RUN(internals.setUserPreferredLanguages(['en']))
RUN(internals.setPrimaryAudioTrackLanguageOverride('fr'))
RUN(internals.setCaptionDisplayMode('manual'))
EVENT(canplaythrough)
** Forced tracks should be in .textTracks as well as in the menu
EXPECTED (video.textTracks.length == '9') OK
EXPECTED (trackMenuItems.length == '11') OK
** 'forced' should be in the title of a forced track menu item
Track menu:
0: "Off", checked
1: "Auto (Recommended)"
2: "English Closed Captions CC"
3: "English Subtitles"
4: "English Subtitles Forced"
5: "French Subtitles"
6: "French Subtitles Forced"
7: "German Subtitles"
8: "German Subtitles Forced"
9: "Spanish Subtitles"
10: "Spanish Subtitles Forced"
** No track should be enabled by default
EXPECTED (video.textTracks[0].language == 'en') OK
EXPECTED (video.textTracks[0].kind == 'subtitles') OK
EXPECTED (video.textTracks[0].mode == 'disabled') OK
EXPECTED (video.textTracks[1].language == 'en') OK
EXPECTED (video.textTracks[1].kind == 'forced') OK
EXPECTED (video.textTracks[1].mode == 'disabled') OK
EXPECTED (video.textTracks[2].language == 'fr') OK
EXPECTED (video.textTracks[2].kind == 'subtitles') OK
EXPECTED (video.textTracks[2].mode == 'disabled') OK
EXPECTED (video.textTracks[3].language == 'fr') OK
EXPECTED (video.textTracks[3].kind == 'forced') OK
EXPECTED (video.textTracks[3].mode == 'disabled') OK
EXPECTED (video.textTracks[4].language == 'es') OK
EXPECTED (video.textTracks[4].kind == 'subtitles') OK
EXPECTED (video.textTracks[4].mode == 'disabled') OK
EXPECTED (video.textTracks[5].language == 'es') OK
EXPECTED (video.textTracks[5].kind == 'forced') OK
EXPECTED (video.textTracks[5].mode == 'disabled') OK
EXPECTED (video.textTracks[6].language == 'de') OK
EXPECTED (video.textTracks[6].kind == 'subtitles') OK
EXPECTED (video.textTracks[6].mode == 'disabled') OK
EXPECTED (video.textTracks[7].language == 'de') OK
EXPECTED (video.textTracks[7].kind == 'forced') OK
EXPECTED (video.textTracks[7].mode == 'disabled') OK
EXPECTED (video.textTracks[8].language == 'en') OK
EXPECTED (video.textTracks[8].kind == 'captions') OK
EXPECTED (video.textTracks[8].mode == 'disabled') OK
END OF TEST