<!DOCTYPE html>
<html>
    <head>
        <video id="video" autoplay controls></video>
        <script src="../../resources/testharness.js"></script>
        <script src="../../resources/testharnessreport.js"></script>
        <script>
promise_test(async () => {
    let stream = await navigator.mediaDevices.getUserMedia({ video : true });
    video.srcObject = stream;

    await video.play();

    video.srcObject.ontrackadded = () => {
        if (window.internals)
            assert_true(internals.shouldAudioTrackPlay(video.audioTracks[0]));
    };

    let stream2 = await navigator.mediaDevices.getUserMedia({ audio : true });
    video.srcObject.addTrack(stream2.getAudioTracks()[0]);
    await new Promise(resolve => setTimeout(resolve, 50));
}, "Add an audio track while playing video");

promise_test(async () => {
    let stream = await navigator.mediaDevices.getUserMedia({ audio : true });
    video.srcObject = stream.clone();

    await video.play();

    video.srcObject.ontrackadded = () => {
        if (window.internals)
            assert_true(internals.shouldAudioTrackPlay(video.audioTracks[1]));
    };

    video.srcObject.addTrack(stream.getAudioTracks()[0]);
    await new Promise(resolve => setTimeout(resolve, 50));
}, "Add an audio track while playing audio");
        </script>
    </head>
</html>
