blob: e927a3387fe40580c3e762b64148cd58efcc386e [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