summaryrefslogtreecommitdiffstats
path: root/dom/midi/tests/test_midi_permission_allow.html
blob: 84578cfeae0d34d4d2d2ca02a69133966f39115b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<html>
  <head>
    <title>WebMIDI Listener Test</title>
    <script src="/tests/SimpleTest/SimpleTest.js"></script>
    <script type="application/javascript" src="MIDITestUtils.js"></script>
  </head>

  <body onload="runTests()">
    <script class="testbody" type="application/javascript">
     SimpleTest.waitForExplicitFinish();

     async function runTests() {
       await MIDITestUtils.permissionSetup(true);
       // Request access without sysex.
       try {
         await navigator.requestMIDIAccess({ "sysex": false })
         ok(true, "MIDI Access Request successful");
         SimpleTest.finish();
       } catch (ex) {
         ok(false, "MIDI Access Request Failed!");
         SimpleTest.finish();
       }
     }
    </script>
  </body>
</html>