Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/dom/midi/tests/   (Browser von der Mozilla Stiftung Version 136.0.1©)  Datei vom 10.2.2025 mit Größe 2 kB image not shown  

Quelle  test_midi_message_event.html   Sprache: HTML

 
 products/Sources/formale Sprachen/C/Firefox/dom/midi/tests/test_midi_message_event.html


<html>

<head>
  <title>WebMIDI MIDIMessageEvent Test</title>
  <script src="/tests/SimpleTest/SimpleTest.js"></script>
  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
  <script type="application/javascript" src="MIDITestUtils.js"></script>
</head>

<body>
  <script class="testbody" type="application/javascript">
    add_task(async () => {
      await MIDITestUtils.permissionSetup(true);

      is(new MIDIMessageEvent('eventType').bubbles, false, "bubbles field is false by default");
      is(new MIDIMessageEvent('eventType').cancelable, false, "cancelable field is false by default");
      isDeeply(new MIDIMessageEvent('eventType').data, [], "The default message is empty");

      is(new MIDIMessageEvent('eventType', { bubbles: false }).bubbles, false, "bubbles is passed");
      is(new MIDIMessageEvent('eventType', { bubbles: true }).bubbles, true, "bubbles is passed");

      is(new MIDIMessageEvent('eventType', { cancelable: false }).cancelable, false, "cancelable is passed");
      is(new MIDIMessageEvent('eventType', { cancelable: true }).cancelable, true, "cancelable is passed");

      var data = new Uint8Array(16);
      isDeeply(new MIDIMessageEvent('eventType', { data }).data, data, "data is passed");

      // All initializers are passed.
      data = new Uint8Array(3);
      is(new MIDIMessageEvent('eventType', { bubbles: true, cancelable: true, data }).bubbles, true, "all initializers are passed");
      is(new MIDIMessageEvent('eventType', { bubbles: true, cancelable: true, data }).cancelable, true, "all initializers are passed");
      isDeeply(new MIDIMessageEvent('eventType', { bubbles: true, cancelable: true, data }).data, data, "all initializers are passed");

      if (window.SharedArrayBuffer) {
        data = new Uint8Array(new SharedArrayBuffer(3));
        SimpleTest.doesThrow(() => { new MIDIMessageEvent('eventType', { data }); }, "shared array buffers are rejected");
      } else {
        todo(false, 'SharedArrayBuffer is unavailable.');
      }
    });
  </script>
</body>

</html>

Messung V0.5
C=82 H=100 G=91

¤ Dauer der Verarbeitung: 0.9 Sekunden  (vorverarbeitet)  ¤

*© 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 und die Messung sind noch experimentell.