blob: f04b501d1aa4d7f8b9ef57bc6d42eb4e5057a35d [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<title>audio-session-deactivated-when-suspended</title>
<script src="../../../media/video-test.js"></script>
<script src="../../../media/media-file.js"></script>
<script>
window.addEventListener('load', async event => {
run('internals.settings.setShouldDeactivateAudioSession(true)');
run('video = document.querySelector("video")');
run('video.src = findMediaFile("video", "../../../media/content/test")');
runWithKeyDown('video.play()');
await waitFor(video, 'playing');
testExpected('internals.audioSessionActive()', true);
run('internals.processWillSuspend()');
testExpected('internals.audioSessionActive()', false);
run('internals.processDidResume()');
testExpected('internals.audioSessionActive()', true);
endTest();
});
</script>
</head>
<body>
<video controls></video>
</body>
</html>