blob: 6f42467f2debc205c9f9aae96f1e6de7fc83756e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
Tests that multiple toggles of the closed captions button still display captions
EVENT(canplaythrough)
** Caption button should be visible and enabled.
EXPECTED (captionsButtonCoordinates[0] > '0') OK
EXPECTED (captionsButtonCoordinates[1] > '0') OK
EXPECTED (captionsButtonElement.disabled == 'false') OK
** The captions track should be listed in textTracks, but not yet loaded. **
EXPECTED (video.textTracks.length == '1') OK
EXPECTED (video.textTracks[0].mode == 'hidden') OK
No text track cue with display id '-webkit-media-text-track-display' is currently visible
No text track cue with display id '-webkit-media-text-track-display' is currently visible
No text track cue with display id '-webkit-media-text-track-display' is currently visible
** Captions track should become visible after button is clicked **
*** Click the CC button.
EXPECTED (displayElement.innerText == 'First') OK
EXPECTED (displayElement.innerText == 'Second') OK
EXPECTED (displayElement.innerText == 'Third') OK
** Captions should not be visible after button is clicked again **
*** Click the CC button.
No text track cue with display id '-webkit-media-text-track-display' is currently visible
No text track cue with display id '-webkit-media-text-track-display' is currently visible
No text track cue with display id '-webkit-media-text-track-display' is currently visible
** Captions should become visible after button is clicked again **
*** Click the CC button.
EXPECTED (displayElement.innerText == 'First') OK
EXPECTED (displayElement.innerText == 'Second') OK
EXPECTED (displayElement.innerText == 'Third') OK
END OF TEST
|