blob: b1053f9041aa65c7a55ee63be299e1773d952223 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<title>video-isplayingtoautomotiveheadunit</title>
<script src="video-test.js"></script>
<script src="media-file.js"></script>
<script>
window.addEventListener('load', async event => {
findMediaElement();
run('video.src = findMediaFile("video", "content/test")');
await waitFor(video, 'canplaythrough');
runWithKeyDown('video.play()');
await waitFor(video, 'playing');
run('internals.setMediaSessionRestrictions("videoaudio", "suspendedunderlockplaybackrestricted")')
run('internals.applicationDidEnterBackground(true)');
await waitFor(video, 'pause');
run('internals.applicationWillEnterForeground(true)');
await waitFor(video, 'playing');
run('internals.setIsPlayingToAutomotiveHeadUnit(true)');
run('internals.applicationDidEnterBackground(true)');
testExpected('video.paused', false);
endTest();
});
</script>
</head>
<body>
<video controls></video>
</body>
</html>