<!DOCTYPE html><!-- webkit-test-runner [ language=jp,fr,es-EN,en ] -->
<html>
    <head>
        <script src=../../media-resources/video-test.js></script>
        <script>
            if (window.testRunner) {
                testRunner.dumpAsText();
                testRunner.waitUntilDone();
            }

            function start() {
                video = document.getElementById('video');
                waitForEvent('canplaythrough', canplaythrough);
                video.src = "../resources/hls/audio-tracks.m3u8";
            }

            function canplaythrough() {
                testExpected("video.audioTracks.length", 3);
                testExpected("video.audioTracks[0].enabled", false);
                testExpected("video.audioTracks[1].enabled", true);
                testExpected("video.audioTracks[2].enabled", false);
                endTest();
            }
        </script>
    </head>
    <body onload="start()">
        <video id="video"></video>
    </body>
</html>
