OLD | NEW |
| (Empty) |
1 Test that directionality is set correctly on cues. | |
2 | |
3 ** RTL cues alternate with LTR cues ** | |
4 EVENT(canplaythrough) | |
5 EVENT(seeked) | |
6 | |
7 ** Jump to next cue ** | |
8 EXPECTED (video.currentTime == '0.25') OK | |
9 EXPECTED (testTrack.track.activeCues.length == '1') OK | |
10 EXPECTED (testTrack.track.activeCues[0].text == 'تجربة') OK | |
11 EXPECTED (testCueDisplayBox.innerText == 'تجربة') OK | |
12 | |
13 ** The position should be default and CSS direction set to rtl ** | |
14 EXPECTED (2 * testCueDisplayBox.offsetLeft == video.videoWidth - testCueDisplayB
ox.offsetWidth == 'true') OK | |
15 EXPECTED (getComputedStyle(testCueDisplayBox).direction == 'rtl') OK | |
16 | |
17 RUN(video.currentTime = 0.75) | |
18 EVENT(seeked) | |
19 | |
20 ** Jump to next cue ** | |
21 EXPECTED (video.currentTime == '0.75') OK | |
22 EXPECTED (testTrack.track.activeCues.length == '1') OK | |
23 EXPECTED (testTrack.track.activeCues[0].text == ' 1234') OK | |
24 EXPECTED (testCueDisplayBox.innerText == ' 1234') OK | |
25 | |
26 ** The position should be default and CSS direction set to ltr ** | |
27 EXPECTED (2 * testCueDisplayBox.offsetLeft == video.videoWidth - testCueDisplayB
ox.offsetWidth == 'true') OK | |
28 EXPECTED (getComputedStyle(testCueDisplayBox).direction == 'ltr') OK | |
29 | |
30 RUN(video.currentTime = 1.25) | |
31 EVENT(seeked) | |
32 | |
33 ** Jump to next cue ** | |
34 EXPECTED (video.currentTime == '1.25') OK | |
35 EXPECTED (testTrack.track.activeCues.length == '1') OK | |
36 EXPECTED (testTrack.track.activeCues[0].text == 'تجربة LTR new line, but cue sho
uld be RTL') OK | |
37 EXPECTED (testCueDisplayBox.innerText == 'تجربة LTR new line, but cue should be
RTL') OK | |
38 | |
39 ** The position should be default and CSS direction set to rtl ** | |
40 EXPECTED (2 * testCueDisplayBox.offsetLeft == video.videoWidth - testCueDisplayB
ox.offsetWidth == 'true') OK | |
41 EXPECTED (getComputedStyle(testCueDisplayBox).direction == 'rtl') OK | |
42 | |
43 RUN(video.currentTime = 1.75) | |
44 EVENT(seeked) | |
45 | |
46 ** Jump to next cue ** | |
47 EXPECTED (video.currentTime == '1.75') OK | |
48 EXPECTED (testTrack.track.activeCues.length == '1') OK | |
49 EXPECTED (testTrack.track.activeCues[0].text == 'LTR cue تجربة') OK | |
50 EXPECTED (testCueDisplayBox.innerText == 'LTR cue تجربة') OK | |
51 | |
52 ** The position should be default and CSS direction set to ltr ** | |
53 EXPECTED (2 * testCueDisplayBox.offsetLeft == video.videoWidth - testCueDisplayB
ox.offsetWidth == 'true') OK | |
54 EXPECTED (getComputedStyle(testCueDisplayBox).direction == 'ltr') OK | |
55 | |
56 RUN(video.currentTime = 2.25) | |
57 EVENT(seeked) | |
58 | |
59 ** Jump to next cue ** | |
60 EXPECTED (video.currentTime == '2.25') OK | |
61 EXPECTED (testTrack.track.activeCues.length == '1') OK | |
62 EXPECTED (testTrack.track.activeCues[0].text == ';1234تجربة') OK | |
63 EXPECTED (testCueDisplayBox.innerText == ';1234تجربة') OK | |
64 | |
65 ** The position should be default and CSS direction set to rtl ** | |
66 EXPECTED (2 * testCueDisplayBox.offsetLeft == video.videoWidth - testCueDisplayB
ox.offsetWidth == 'true') OK | |
67 EXPECTED (getComputedStyle(testCueDisplayBox).direction == 'rtl') OK | |
68 | |
69 RUN(video.currentTime = 2.75) | |
70 EVENT(seeked) | |
71 | |
72 ** Jump to next cue ** | |
73 EXPECTED (video.currentTime == '2.75') OK | |
74 EXPECTED (testTrack.track.activeCues.length == '1') OK | |
75 EXPECTED (testTrack.track.activeCues[0].text == ' ०१२३४५६७८९ ') OK | |
76 EXPECTED (testCueDisplayBox.innerText == ' ०१२३४५६७८९ ') OK | |
77 | |
78 ** The position should be default and CSS direction set to ltr ** | |
79 EXPECTED (2 * testCueDisplayBox.offsetLeft == video.videoWidth - testCueDisplayB
ox.offsetWidth == 'true') OK | |
80 EXPECTED (getComputedStyle(testCueDisplayBox).direction == 'ltr') OK | |
81 | |
82 RUN(video.currentTime = 3.25) | |
83 EVENT(seeked) | |
84 | |
85 ** Jump to next cue ** | |
86 EXPECTED (video.currentTime == '3.25') OK | |
87 EXPECTED (testTrack.track.activeCues.length == '1') OK | |
88 EXPECTED (testTrack.track.activeCues[0].text == '𐡘 (Imperial Aramaic number one,
U+10858) strong RTL, non-BMP') OK | |
89 EXPECTED (testCueDisplayBox.innerText == '𐡘 (Imperial Aramaic number one, U+1085
8) strong RTL, non-BMP') OK | |
90 | |
91 ** The position should be default and CSS direction set to rtl ** | |
92 EXPECTED (2 * testCueDisplayBox.offsetLeft == video.videoWidth - testCueDisplayB
ox.offsetWidth == 'true') OK | |
93 EXPECTED (getComputedStyle(testCueDisplayBox).direction == 'rtl') OK | |
94 | |
95 RUN(video.currentTime = 3.75) | |
96 EVENT(seeked) | |
97 | |
98 ** Jump to next cue ** | |
99 EXPECTED (video.currentTime == '3.75') OK | |
100 EXPECTED (testTrack.track.activeCues.length == '1') OK | |
101 EXPECTED (testTrack.track.activeCues[0].text == '𝅘𝅥 (Musical symbol quarter note,
U+1D15F) strong LTR, non-BMP') OK | |
102 EXPECTED (testCueDisplayBox.innerText == '𝅘𝅥 (Musical symbol quarter note, U+1D15
F) strong LTR, non-BMP') OK | |
103 | |
104 ** The position should be default and CSS direction set to ltr ** | |
105 EXPECTED (2 * testCueDisplayBox.offsetLeft == video.videoWidth - testCueDisplayB
ox.offsetWidth == 'true') OK | |
106 EXPECTED (getComputedStyle(testCueDisplayBox).direction == 'ltr') OK | |
107 | |
108 RUN(video.currentTime = 4.25) | |
109 EVENT(seeked) | |
110 | |
111 ** Jump to next cue ** | |
112 EXPECTED (video.currentTime == '4.25') OK | |
113 EXPECTED (testTrack.track.activeCues.length == '1') OK | |
114 EXPECTED (testTrack.track.activeCues[0].text == '𝅘𝅥تجربة') OK | |
115 EXPECTED (testCueDisplayBox.innerText == '𝅘𝅥تجربة') OK | |
116 | |
117 ** The position should be default and CSS direction set to rtl ** | |
118 EXPECTED (2 * testCueDisplayBox.offsetLeft == video.videoWidth - testCueDisplayB
ox.offsetWidth == 'true') OK | |
119 EXPECTED (getComputedStyle(testCueDisplayBox).direction == 'rtl') OK | |
120 | |
121 RUN(video.currentTime = 4.75) | |
122 EVENT(seeked) | |
123 | |
124 ** Jump to next cue ** | |
125 EXPECTED (video.currentTime == '4.75') OK | |
126 EXPECTED (testTrack.track.activeCues.length == '1') OK | |
127 EXPECTED (testTrack.track.activeCues[0].text == '1234تجربة') OK | |
128 EXPECTED (testCueDisplayBox.innerText == '1234تجربة') OK | |
129 | |
130 ** The position should be default and CSS direction set to ltr ** | |
131 EXPECTED (2 * testCueDisplayBox.offsetLeft == video.videoWidth - testCueDisplayB
ox.offsetWidth == 'true') OK | |
132 EXPECTED (getComputedStyle(testCueDisplayBox).direction == 'ltr') OK | |
133 END OF TEST | |
134 | |
OLD | NEW |