Render text tracks
[WebKit-https.git] / LayoutTests / media / track / track-cue-rendering-expected.txt
1 Test that TextTrack's cues are rendered correctly.
2 EVENT(canplaythrough)
3 EVENT(seeked)
4 EXPECTED (video.currentTime == '0.5') OK
5 EXPECTED (testTrack.track.activeCues.length == '1') OK
6 EXPECTED (testTrack.track.activeCues[0].getCueAsSource() == 'Lorem') OK
7 EXPECTED (textTrackDisplayElement(video).innerText == 'Lorem') OK
8
9 RUN(video.currentTime = 1.5)
10 EVENT(seeked)
11 EXPECTED (video.currentTime == '1.5') OK
12 EXPECTED (testTrack.track.activeCues.length == '1') OK
13 EXPECTED (testTrack.track.activeCues[0].getCueAsSource() == 'ipsum') OK
14 EXPECTED (textTrackDisplayElement(video).innerText == 'ipsum') OK
15
16 RUN(video.currentTime = 2.5)
17 EVENT(seeked)
18 EXPECTED (video.currentTime == '2.5') OK
19 EXPECTED (testTrack.track.activeCues.length == '1') OK
20 EXPECTED (testTrack.track.activeCues[0].getCueAsSource() == 'dolor') OK
21 EXPECTED (textTrackDisplayElement(video).innerText == 'dolor') OK
22
23 RUN(video.currentTime = 3.5)
24 EVENT(seeked)
25 EXPECTED (video.currentTime == '3.5') OK
26 EXPECTED (testTrack.track.activeCues.length == '1') OK
27 EXPECTED (testTrack.track.activeCues[0].getCueAsSource() == 'sit') OK
28 EXPECTED (textTrackDisplayElement(video).innerText == 'sit') OK
29
30 Test that the cue display font size is resized as the video element resizes.
31 RUN(video.width = 320)
32 RUN(video.height = 240)
33 EXPECTED (getComputedStyle(textTrackDisplayElement(video)).fontSize == '16px') OK
34
35 RUN(video.width = 640)
36 RUN(video.height = 480)
37 EXPECTED (getComputedStyle(textTrackDisplayElement(video)).fontSize == '19px') OK
38
39 RUN(video.width = 1280)
40 RUN(video.height = 960)
41 EXPECTED (getComputedStyle(textTrackDisplayElement(video)).fontSize == '38px') OK
42
43 RUN(video.width = 2560)
44 RUN(video.height = 1440)
45 EXPECTED (getComputedStyle(textTrackDisplayElement(video)).fontSize == '58px') OK
46 END OF TEST
47