<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
    <head>
        <script src="../../resources/js-test-pre.js"></script>
        <script src="./resources/getUserMedia-helper.js"></script>
    </head>
    <body>
        <p id="description"></p>
        <div id="console"></div>
        <script>
            description("Test adding and removing null and undefined tracks.");

            var stream;

            function gotStream(s) {
                stream = s;

                debug("<br>Calling addTrack with null and undefined parameters");
                shouldThrow("stream.addTrack(null);");
                shouldThrow("stream.addTrack(undefined);");

                debug("<br>Calling removeTrack with null and undefined parameters");
                shouldThrow("stream.removeTrack(null);");
                shouldThrow("stream.removeTrack(undefined);");

                finishJSTest();
            }

            getUserMedia("allow", {audio:true, video:true}, gotStream);

            window.jsTestIsAsync = true;
            window.successfullyParsed = true;
        </script>
        <script src="../../resources/js-test-post.js"></script>
    </body>
</html>
