1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/content/media/test/test_VideoPlaybackQuality_disabled.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,33 @@ 1.4 +<!DOCTYPE HTML> 1.5 +<html> 1.6 +<head> 1.7 + <title>Test basic functionality of VideoPlaybackQuality</title> 1.8 + <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> 1.9 + <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> 1.10 +</head> 1.11 +<body> 1.12 +<pre id="test"> 1.13 +<script class="testbody" type="text/javascript"> 1.14 + 1.15 +SimpleTest.waitForExplicitFinish(); 1.16 + 1.17 +function test() { 1.18 + var video = document.createElement("video"); 1.19 + ok(!video.getVideoPlaybackQuality, "getVideoPlaybackQuality should be hidden behind a pref"); 1.20 + var accessThrows = false; 1.21 + try { 1.22 + video.getVideoPlaybackQuality(); 1.23 + } catch (e) { 1.24 + accessThrows = true; 1.25 + } 1.26 + ok(accessThrows, "getVideoPlaybackQuality should be hidden behind a pref"); 1.27 + SimpleTest.finish(); 1.28 +} 1.29 + 1.30 +addLoadEvent(function() { 1.31 + SpecialPowers.pushPrefEnv({"set": [["media.mediasource.enabled", false]]}, test); 1.32 +}); 1.33 +</script> 1.34 +</pre> 1.35 +</body> 1.36 +</html>