<!DOCTYPE html><!-- webkit-test-runner [ CaptureAudioInGPUProcessEnabled=true CaptureVideoInGPUProcessEnabled=true MuteCameraOnMicrophoneInterruptionEnabled=true ] -->
<html>
<head>
    <meta charset="utf-8">
    <title>Video capture source interruption based on audio interruption</title>
    <script src="../../resources/testharness.js"></script>
    <script src="../../resources/testharnessreport.js"></script>
 </head>
<body>
    <script>
    promise_test(async (test) => {
        const stream = await navigator.mediaDevices.getUserMedia({audio: true, video: true});
        const track = stream.getVideoTracks()[0];
        if (!window.testRunner)
            return;

        let promise = new Promise((resolve, reject) => { track.onmute = resolve; setTimeout(() => reject("no mute"), 5000) });
        testRunner.setMockCaptureDevicesInterrupted(false, true);
        await promise;

        assert_true(track.muted, "track is muted");

        promise = new Promise((resolve, reject) => { track.onunmute = resolve; setTimeout(() => reject("no unmute"), 5000) });
        testRunner.setMockCaptureDevicesInterrupted(false, false);
        await promise;

        assert_false(track.muted, "track is not muted");

        track.stop();
    }, "Mute/unmute video track if audio gets interrupted");
    </script>
</body>
</html>
