1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/content/media/test/test_webvtt_disabled.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,35 @@ 1.4 +<!DOCTYPE HTML> 1.5 +<html> 1.6 +<!-- 1.7 +https://bugzilla.mozilla.org/show_bug.cgi?id=833386 1.8 +--> 1.9 +<head> 1.10 + <meta charset='utf-8'> 1.11 + <title>Test for Bug 833386 - TextTrackList Pref Off</title> 1.12 + <script type="text/javascript" src="/MochiKit/MochiKit.js"></script> 1.13 + <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> 1.14 + <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> 1.15 +</head> 1.16 +<body> 1.17 +<p id="display"></p> 1.18 +<div id="content" style="display: none"> 1.19 +</div> 1.20 +<pre id="test"> 1.21 +<script class="testbody" type="text/javascript"> 1.22 +SimpleTest.waitForExplicitFinish(); 1.23 +SpecialPowers.pushPrefEnv({"set": [["media.webvtt.enabled", false]]}, 1.24 + function() { 1.25 + var video = document.createElement("video"); 1.26 + is(video.textTracks, undefined, "HTMLMediaElement::TextTracks() function should be unavailable."); 1.27 + is(video.addTextTrack, undefined, "HTMLMediaElement::AddTextTrack() function should be unavailable."); 1.28 + is(typeof TextTrackList, "undefined", "TextTrackList should not be available."); 1.29 + is(typeof TextTrack, "undefined", "TextTrack should not be available."); 1.30 + is(typeof VTTCue, "undefined", "VTTCue should not be available."); 1.31 + is(typeof TextTrackCueList, "undefined", "TextTrackCueList should not be available."); 1.32 + SimpleTest.finish(); 1.33 + } 1.34 +); 1.35 +</script> 1.36 +</pre> 1.37 +</body> 1.38 +</html>