check-status-for-hdcp.js (994B)
1 function runTest(config, qualifier) 2 { 3 function checkStatusForMinHdcpVersionPolicy(hdcpVersion) 4 { 5 return navigator.requestMediaKeySystemAccess(config.keysystem, getSimpleConfiguration()) 6 .then(function(access) { 7 return access.createMediaKeys(); 8 }) 9 .then(function(mediaKeys) { 10 // As HDCP policy depends on the hardware running this test, 11 // don't bother checking the result returned as it may or 12 // may not be supported. This simply verifies that 13 // getStatusForPolicy() exists and doesn't blow up. 14 return mediaKeys.getStatusForPolicy({minHdcpVersion: hdcpVersion}); 15 }); 16 } 17 18 promise_test( 19 () => checkStatusForMinHdcpVersionPolicy(''), 20 testnamePrefix(qualifier, config.keysystem) + 21 ' support for empty HDCP version.'); 22 23 promise_test( 24 () => checkStatusForMinHdcpVersionPolicy('1.0'), 25 testnamePrefix(qualifier, config.keysystem) + ' support for HDCP 1.0.'); 26 }