haikuwebkit/LayoutTests/media/remote-control-command-is-u...

18 lines
416 B
Plaintext

Test that a remote control command is treated as a user gesture.
RUN(internals.setMediaElementRestrictions(video, "RequireUserGestureForVideoRateChange"))
* set video.src
EVENT(loadedmetadata)
* video.play() should fail
RUN(handlePromise(video.play()))
EXPECTED (video.paused == 'true') OK
* Send a play command, it should succeed.
RUN(internals.postRemoteControlCommand('play'))
EVENT(timeupdate)
END OF TEST