blob: 6f3dc38127aa720c0bac8c758b50ead8b6812fa8 [file] [log] [blame]
Test that cues are being matched properly by :past and :future pseudo classes.
EVENT(canplaythrough)
EVENT(seeked)
EXPECTED (getComputedStyle(cueNode).color == 'rgb(128, 128, 128)') OK
EXPECTED (getComputedStyle(cueNode).color == 'rgb(128, 128, 128)') OK
EXPECTED (getComputedStyle(cueNode).color == 'rgb(128, 128, 128)') OK
EXPECTED (getComputedStyle(cueNode).color == 'rgb(128, 128, 128)') OK
EXPECTED (getComputedStyle(cueNode).color == 'rgb(128, 128, 128)') OK
RUN(video.currentTime = 0.3)
EVENT(seeked)
EXPECTED (getComputedStyle(cueNode).color == 'rgb(0, 255, 0)') OK
EXPECTED (getComputedStyle(cueNode).color == 'rgb(128, 128, 128)') OK
EXPECTED (getComputedStyle(cueNode).color == 'rgb(128, 128, 128)') OK
EXPECTED (getComputedStyle(cueNode).color == 'rgb(128, 128, 128)') OK
EXPECTED (getComputedStyle(cueNode).color == 'rgb(128, 128, 128)') OK
RUN(video.currentTime = 0.5)
EVENT(seeked)
EXPECTED (getComputedStyle(cueNode).color == 'rgb(0, 255, 0)') OK
EXPECTED (getComputedStyle(cueNode).color == 'rgb(0, 255, 0)') OK
EXPECTED (getComputedStyle(cueNode).color == 'rgb(128, 128, 128)') OK
EXPECTED (getComputedStyle(cueNode).color == 'rgb(128, 128, 128)') OK
EXPECTED (getComputedStyle(cueNode).color == 'rgb(128, 128, 128)') OK
RUN(video.currentTime = 0.7)
EVENT(seeked)
EXPECTED (getComputedStyle(cueNode).color == 'rgb(0, 255, 0)') OK
EXPECTED (getComputedStyle(cueNode).color == 'rgb(0, 255, 0)') OK
EXPECTED (getComputedStyle(cueNode).color == 'rgb(0, 255, 0)') OK
EXPECTED (getComputedStyle(cueNode).color == 'rgb(128, 128, 128)') OK
EXPECTED (getComputedStyle(cueNode).color == 'rgb(0, 255, 0)') OK
RUN(video.currentTime = 0.9)
EVENT(seeked)
EXPECTED (getComputedStyle(cueNode).color == 'rgb(0, 255, 0)') OK
EXPECTED (getComputedStyle(cueNode).color == 'rgb(0, 255, 0)') OK
EXPECTED (getComputedStyle(cueNode).color == 'rgb(0, 255, 0)') OK
EXPECTED (getComputedStyle(cueNode).color == 'rgb(0, 255, 0)') OK
EXPECTED (getComputedStyle(cueNode).color == 'rgb(0, 255, 0)') OK
END OF TEST