blob: e00ad825d53cf705445f2794ff249381b27f225d [file] [edit]
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
</head>
<body>
<video id="video" controls autoplay=""></video>
<script>
promise_test(async () => {
internals?.setPageMediaVolume(0.01);
const context = new AudioContext();
const oscillator = context.createOscillator();
const streamDestination = context.createMediaStreamDestination();
oscillator.connect(streamDestination);
oscillator.start();
video.srcObject = streamDestination.stream;
await video.play();
await new Promise(resolve => setTimeout(resolve, 100));
internals?.deleteAudioUnit();
internals?.setPageMediaVolume(0);
await new Promise(resolve => setTimeout(resolve, 100));
}, "Delete a running audio unit without stopping it");
</script>
</body>
</html>