blob: 3941443e99124acf31657640879c5a2c9c62e581 [file] [log] [blame]
Tests that the user preferences for track kind are honored.
**Set preferences so subtitles and descriptions load, but captions do not
RUN(internals.settings.setShouldDisplayTrackKind('Subtitles', true))
EXPECTED (internals.settings.shouldDisplayTrackKind('Subtitles') == 'true') OK
RUN(internals.settings.setShouldDisplayTrackKind('Captions', false))
EXPECTED (internals.settings.shouldDisplayTrackKind('Captions') == 'false') OK
RUN(internals.settings.setShouldDisplayTrackKind('TextDescriptions', true))
EXPECTED (internals.settings.shouldDisplayTrackKind('TextDescriptions') == 'true') OK
**Create track elements dynamically so they aren't processed by the media element until after preferences have been configured.
- creating 'subtitles' track.
- creating 'captions' track.
- creating 'descriptions' track.
EVENT(load)
EXPECTED (track.readyState == '2') OK
EXPECTED (track.kind != 'captions') OK
EVENT(load)
EXPECTED (track.readyState == '2') OK
EXPECTED (track.kind != 'captions') OK
END OF TEST