OLD | NEW |
| (Empty) |
1 Test that default positioned 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].text == 'Lorem') OK | |
7 EXPECTED (testCueDisplayBox.innerText == 'Lorem') OK | |
8 EXPECTED (2 * testCueDisplayBox.offsetLeft == video.videoWidth - testCueDisplayB
ox.offsetWidth == 'true') OK | |
9 | |
10 RUN(video.currentTime = 1.5) | |
11 EVENT(seeked) | |
12 EXPECTED (video.currentTime == '1.5') OK | |
13 EXPECTED (testTrack.track.activeCues.length == '1') OK | |
14 EXPECTED (testTrack.track.activeCues[0].text == 'ipsum') OK | |
15 EXPECTED (testCueDisplayBox.innerText == 'ipsum') OK | |
16 EXPECTED (2 * testCueDisplayBox.offsetLeft == video.videoWidth - testCueDisplayB
ox.offsetWidth == 'true') OK | |
17 | |
18 RUN(video.currentTime = 2.5) | |
19 EVENT(seeked) | |
20 EXPECTED (video.currentTime == '2.5') OK | |
21 EXPECTED (testTrack.track.activeCues.length == '1') OK | |
22 EXPECTED (testTrack.track.activeCues[0].text == 'dolor') OK | |
23 EXPECTED (testCueDisplayBox.innerText == 'dolor') OK | |
24 EXPECTED (2 * testCueDisplayBox.offsetLeft == video.videoWidth - testCueDisplayB
ox.offsetWidth == 'true') OK | |
25 | |
26 RUN(video.currentTime = 3.5) | |
27 EVENT(seeked) | |
28 EXPECTED (video.currentTime == '3.5') OK | |
29 EXPECTED (testTrack.track.activeCues.length == '1') OK | |
30 EXPECTED (testTrack.track.activeCues[0].text == 'sit') OK | |
31 EXPECTED (testCueDisplayBox.innerText == 'sit') OK | |
32 EXPECTED (2 * testCueDisplayBox.offsetLeft == video.videoWidth - testCueDisplayB
ox.offsetWidth == 'true') OK | |
33 | |
34 Test the cue display colors and font. | |
35 RUN(video.width = 320) | |
36 RUN(video.height = 240) | |
37 EXPECTED (getComputedStyle(textTrackDisplayElement(video)).fontSize == '12px') O
K | |
38 | |
39 RUN(video.width = 640) | |
40 RUN(video.height = 480) | |
41 EXPECTED (getComputedStyle(textTrackDisplayElement(video)).fontSize == '24px') O
K | |
42 | |
43 RUN(video.width = 1280) | |
44 RUN(video.height = 960) | |
45 EXPECTED (getComputedStyle(textTrackDisplayElement(video)).fontSize == '48px') O
K | |
46 | |
47 RUN(video.width = 2560) | |
48 RUN(video.height = 1440) | |
49 EXPECTED (getComputedStyle(textTrackDisplayElement(video)).fontSize == '72px') O
K | |
50 | |
51 EXPECTED (getComputedStyle(textTrackDisplayElement(video)).fontFamily == 'sans-s
erif') OK | |
52 EXPECTED (getComputedStyle(textTrackDisplayElement(video)).color == 'rgb(255, 25
5, 255)') OK | |
53 EXPECTED (getComputedStyle(textTrackDisplayElement(video, 'display').firstChild)
.backgroundColor == 'rgba(0, 0, 0, 0.796875)'), OBSERVED 'rgba(0, 0, 0, 0.8)' FA
IL | |
54 END OF TEST | |
55 | |
OLD | NEW |