blob: 4cfc768e95adc37251fa4c3e0eb133e4fe7504de [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'))
EXPECTED (video.paused == 'true') OK
** Simulate switch back to foreground, video should remain paused.
RUN(internals.applicationWillEnterForeground())
EXPECTED (video.paused == 'true') OK
END OF TEST