blob: e33ef76a95464748a33019b8f84546a4c5c1ab2b [file] [log] [blame]
Test that caption preferences change notifications work
RUN(internals.setCaptionDisplayMode('AlwaysOn'))
RUN(internals.setCaptionsStyleSheetOverride('video::cue { color: blue; background-color: yellow; }'))
RUN(internals.settings.setShouldDisplayTrackKind('Captions', true))
EVENT(canplaythrough)
RUN(video.currentTime = .5)
EVENT(seeked)
** Track should be visible, cue should be styled appropriately. **
EXPECTED (video.textTracks[0].mode == 'showing') OK
** Remove the video from the document, add it back. **
RUN(video.parentNode.removeChild(video))
RUN(document.body.appendChild(video))
** Change caption display mode to generate a notification. **
RUN(setCaptionDisplayMode('ForcedOnly'))
** Track should not be visible. **
EXPECTED (video.textTracks[0].mode == 'disabled') OK
END OF TEST