33 lines
1.1 KiB
HTML
33 lines
1.1 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<script src="video-test.js"></script>
|
|
<script src="media-file.js"></script>
|
|
<script>
|
|
if (window.testRunner) {
|
|
testRunner.dumpAsText();
|
|
testRunner.waitUntilDone();
|
|
}
|
|
|
|
function start() {
|
|
if (window.internals)
|
|
internals.setUserPreferredAudioCharacteristic('public.accessibility.describes-video');
|
|
findMediaElement();
|
|
video = document.getElementById('video');
|
|
waitForEvent('canplaythrough', canplaythrough);
|
|
video.src = findMediaFile('video', 'content/audio-describes-video');
|
|
}
|
|
|
|
function canplaythrough() {
|
|
testExpected('video.audioTracks.length', 2);
|
|
testExpected('video.audioTracks[0].enabled', false);
|
|
testExpected('video.audioTracks[1].enabled', true);
|
|
endTest();
|
|
}
|
|
</script>
|
|
</head>
|
|
<body onload="start()">
|
|
<video id="video"></video>
|
|
</body>
|
|
</html>
|