blob: 4e19eef4f9981dd42166b43794b67c367299dbfd [file] [log] [blame]
Test that the cue is styled properly throughout its lifetime.
EVENT(canplaythrough)
EVENT(seeked)
EXPECTED (getComputedStyle(cueNode).color == 'rgb(255, 0, 0)') OK
EXPECTED (getComputedStyle(cueNode).color == 'rgb(0, 128, 0)') OK
EXPECTED (getComputedStyle(cueNode).color == 'rgb(255, 0, 0)') OK
1
RUN(video.currentTime = 0.5)
EVENT(seeked)
EXPECTED (getComputedStyle(cueNode).color == 'rgb(255, 0, 0)') OK
EXPECTED (getComputedStyle(cueNode).color == 'rgb(0, 128, 0)') OK
EXPECTED (getComputedStyle(cueNode).color == 'rgb(255, 0, 0)') OK
2
RUN(video.currentTime = 0.9)
EVENT(seeked)
EXPECTED (getComputedStyle(cueNode).color == 'rgb(255, 0, 0)') OK
EXPECTED (getComputedStyle(cueNode).color == 'rgb(0, 128, 0)') OK
EXPECTED (getComputedStyle(cueNode).color == 'rgb(255, 0, 0)') OK
3
RUN(video.currentTime = 1.3)
EVENT(seeked)
EXPECTED (getComputedStyle(cueNode).color == 'rgb(255, 0, 0)') OK
EXPECTED (getComputedStyle(cueNode).color == 'rgb(0, 128, 0)') OK
EXPECTED (getComputedStyle(cueNode).color == 'rgb(255, 0, 0)') OK
4
RUN(video.currentTime = 1.7)
EVENT(seeked)
EXPECTED (getComputedStyle(cueNode).color == 'rgb(255, 0, 0)') OK
EXPECTED (getComputedStyle(cueNode).color == 'rgb(0, 128, 0)') OK
EXPECTED (getComputedStyle(cueNode).color == 'rgb(255, 0, 0)') OK
5
RUN(video.currentTime = 2.1)
EVENT(seeked)
EXPECTED (getComputedStyle(cueNode).color == 'rgb(255, 0, 0)') OK
EXPECTED (getComputedStyle(cueNode).color == 'rgb(0, 128, 0)') OK
EXPECTED (getComputedStyle(cueNode).color == 'rgb(255, 0, 0)') OK
END OF TEST