1 Tests navigator.requestMIDIAccess.
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
6 PASS requestMIDIAccess() succeeded with access [object MIDIAccess].
7 PASS access.sysexEnabled is defined.
8 PASS access.sysexEnabled is false
9 PASS access.inputs.size is 1
10 PASS access.outputs.size is 1
11 for (var input of inputs.values())
12 PASS input.id is "MockInputID"
13 PASS input.manufacturer is "MockInputManufacturer"
14 PASS input.name is "MockInputName"
15 PASS input.version is "MockInputVersion"
16 PASS input.state is "connected"
17 PASS input.type is "input"
18 for (var input of inputs.keys())
19 PASS inputKey is "MockInputID"
20 for (var input of inputs.entries())
21 PASS entry[0] is inputKey
22 PASS entry[1] is input
23 for (var input of inputs)
24 PASS entry[0] is inputKey
25 PASS entry[1] is input
26 PASS inputs.has('MockInputID') is true
27 PASS inputs.has('MockOutputID') is false
28 PASS inputs.get('MockInputID') is input
29 PASS inputs.get('MockOutputID') is undefined.
31 PASS forEachInput is input
32 PASS forEachInputKey is inputKey
33 PASS forEachMap is inputs
34 for (var output of outputs.values())
35 PASS output.id is "MockOutputID"
36 PASS output.manufacturer is "MockOutputManufacturer"
37 PASS output.name is "MockOutputName"
38 PASS output.version is "MockOutputVersion"
39 PASS output.state is "connected"
40 PASS output.type is "output"
41 for (var output of outputs.keys())
42 PASS outputKey is "MockOutputID"
43 for (var output of outputs.entries())
44 PASS entry[0] is outputKey
45 PASS entry[1] is output
46 for (var output of outputs)
47 PASS entry[0] is outputKey
48 PASS entry[1] is output
49 PASS outputs.has('MockOutputID') is true
50 PASS outputs.has('MockInputID') is false
51 PASS outputs.get('MockOutputID') is output
52 PASS outputs.get('MockInputID') is undefined.
54 PASS forEachOutput is output
55 PASS forEachOutputKey is outputKey
56 PASS forEachMap is outputs
57 PASS a note on message is sent without timestamp
58 PASS a note on message is sent with timestamp
59 PASS output.send([0xfff, 0x45, 0x7f]) threw exception TypeError: Failed to execute 'send' on 'MIDIOutput': The value at index 0 (4095) is greater than 0xFF..
60 PASS output.send([0xf0, 0x45, 0xf7]) threw exception InvalidAccessError: Failed to execute 'send' on 'MIDIOutput': System exclusive message is not allowed at index 0 (240)..
61 PASS requestMIDIAccess() was correctly blocked for System Exclusive access with error SecurityError: An attempt was made to break through the security policy of the user agent..
62 PASS successfullyParsed is true