Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/testing/web-platform/tests/fenced-frame/   (Browser von der Mozilla Stiftung Version 136.0.1©)  Datei vom 10.2.2025 mit Größe 1 kB image not shown  

Quelle  hid.https.html   Sprache: HTML

 
 products/Sources/formale Sprachen/C/Firefox/testing/web-platform/tests/fenced-frame/hid.https.html


<!DOCTYPE html>
<title>Test of Web Bluetooth API</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<script src="resources/utils.js"></script>
<script src="/common/utils.js"></script>
<script src="/common/dispatcher/dispatcher.js"></script>
<script src="/resources/testdriver-actions.js"></script>

<body>

<script>
promise_test(async () => {
  const frame = attachFencedFrameContext();
  await multiClick(10, 10, frame.element);
  const result = await frame.execute(async () => {
    try {
      await navigator.hid.getDevices();
      return 'HID getDevice succeeded';
    } catch(e) {
      if (e.name == 'SecurityError' &&
          e.message.includes(
          'Access to the feature "hid" is disallowed by permissions policy.')) {
        return 'HID getDevice failed';
      } else {
        return `HID getDevice failed with unknown error - ${e.name}: ${e.message}`;
      }
    }
  });
  assert_equals(result, 'HID getDevice failed',
                'HID getDevice must fail in a fenced frame.');
}, 'HID getDevice must fail in a fenced frame');
</script>

</body>

100%


¤ Dauer der Verarbeitung: 0.5 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

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 ist noch experimentell.