blob: 584047b88939dc38bbc56e45d484036999bee12e [file] [log] [blame]
Test tab with <video> moving to background when playback is not allowed in background.
RUN(internals.setMediaSessionRestrictions('videoaudio', 'BackgroundTabPlaybackRestricted'))
EVENT(canplaythrough)
RUN(video.play())
EVENT(playing)
** Simulate switching the tab to background, video should pause.
RUN(testRunner.setPageVisibility('hidden'))
** 100ms timer fired...
EXPECTED (video.paused == 'true') OK
** Simulate switch back to foreground, video should remain paused.
RUN(internals.applicationWillEnterForeground())
** 100ms timer fired...
EXPECTED (video.paused == 'true') OK
END OF TEST