blob: 01ff2b74b5336473eccec452456451a44e2b9734 [file] [log] [blame]
This tests that entering and leaving Picture-in-Picture toggles CSS selector.
RUN(internals.settings.setAllowsPictureInPictureMediaPlayback(true))
RUN(internals.setPictureInPictureAPITestEnabled(video, true))
RUN(video.src = findMediaFile("video", "../content/test"))
EVENT(canplaythrough)
EXPECTED (getComputedStyle(video).color == 'rgb(0, 0, 255)') OK
EVENT(enterpictureinpicture)
EXPECTED (getComputedStyle(video).color == 'rgb(0, 255, 0)') OK
EVENT(leavepictureinpicture)
EXPECTED (getComputedStyle(video).color == 'rgb(0, 0, 255)') OK
END OF TEST