Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quellcode-Bibliothek test_eme_special_key_system.html   Interaktion und
PortierbarkeitHTML

 

 products/Sources/formale Sprachen/C/Firefox/dom/media/test/test_eme_special_key_system.html


<!DOCTYPE html>
<html>
<head>
  <title>Test Encrypted Media Extensions - Special key system</title>
  <script src="/tests/SimpleTest/SimpleTest.js"></script>
  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
</head>
<body>
<pre id="test">
<script class="testbody" type="text/javascript">
function requestProtectionQueryKeySystemAccess() {
  const kKeySystemOptions = [
    {
      initDataTypes: ["cenc"],
      videoCapabilities: [{ contentType: 'video/mp4; codecs="avc1.4d4015"' }],
    },
  ];
  const kClearKeyWithProtectionQuery =
    "org.mozilla.clearkey_with_protection_query";
  return navigator.requestMediaKeySystemAccess(
    kClearKeyWithProtectionQuery,
    kKeySystemOptions
  );
}
// Tests that org.mozilla.clearkey_with_protection_query cannot be accessed from JS if not preffed on.
add_task(async function protectionQueryKeySystemShouldBeHidden() {
  try {
    // Should throw since special key systems are not enabled.
    await requestProtectionQueryKeySystemAccess();
    ok(
      false,
      "Test should have thrown by default because media.clearkey.test-key-systems.enabled should not be set"
    );
  } catch (e) {
    is(e.name, "NotSupportedError", "Should get not supported error");
    is(
      e.message,
      "Key system is unsupported",
      "Should get message that key system is unsupported"
    );
  }
});

// Tests that org.mozilla.clearkey_with_protection_query can be accessed from JS if preffed on.
add_task(async function protectionQueryKeySystemShouldBeExposed() {
  await SpecialPowers.pushPrefEnv({
    set: [["media.clearkey.test-key-systems.enabled", true]],
  });
  try {
    // Should not throw since special key systems are enabled.
    let access = await requestProtectionQueryKeySystemAccess();
    ok(
      access,
      "Should get access to protection query key system when preffed on"
    );
  } catch (e) {
    ok(false, "Test should not have thrown and key system should be available");
  }
});
</script>
</pre>
</body>
</html>

Messung V0.5 in Prozent
C=83 H=100 G=91

¤ Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.0.20Bemerkung:  (Wie Sie bei der Firma Beratungs- und Dienstleistungen beauftragen können 2026-09-28) ¤

*Bot Zugriff






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik

Statistik
#Sources=1126864
#Domains=2039723