blob: 71d126559fb0c9498aca8c45bd52a86b98424ad5 [file] [log] [blame]
Tests navigator.requestMIDIAccess.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS PermissionsHelper.setPermission is defined.
PASS requestMIDIAccess() succeeded with access [object MIDIAccess].
PASS access.sysexEnabled is defined.
PASS access.sysexEnabled is false
PASS access.inputs.size is 1
PASS access.outputs.size is 1
for (var input of inputs.values())
PASS is "MockInputID-0"
PASS input.manufacturer is "MockInputManufacturer"
PASS is "MockInputName"
PASS input.version is "MockInputVersion"
PASS input.state is "connected"
PASS input.type is "input"
for (var input of inputs.keys())
PASS inputKey is "MockInputID-0"
for (var input of inputs.entries())
PASS entry[0] is inputKey
PASS entry[1] is input
for (var input of inputs)
PASS entry[0] is inputKey
PASS entry[1] is input
PASS inputs.has('MockInputID-0') is true
PASS inputs.has('MockOutputID-0') is false
PASS inputs.get('MockInputID-0') is input
PASS inputs.get('MockOutputID-0') is undefined.
PASS forEachInput is input
PASS forEachInputKey is inputKey
PASS forEachMap is inputs
for (var output of outputs.values())
PASS is "MockOutputID-0"
PASS output.manufacturer is "MockOutputManufacturer"
PASS is "MockOutputName"
PASS output.version is "MockOutputVersion"
PASS output.state is "connected"
PASS output.type is "output"
for (var output of outputs.keys())
PASS outputKey is "MockOutputID-0"
for (var output of outputs.entries())
PASS entry[0] is outputKey
PASS entry[1] is output
for (var output of outputs)
PASS entry[0] is outputKey
PASS entry[1] is output
PASS outputs.has('MockOutputID-0') is true
PASS outputs.has('MockInputID-0') is false
PASS outputs.get('MockOutputID-0') is output
PASS outputs.get('MockInputID-0') is undefined.
PASS forEachOutput is output
PASS forEachOutputKey is outputKey
PASS forEachMap is outputs
PASS a note on message is sent without timestamp
PASS a note on message is sent with timestamp
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..
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)..
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..
PASS successfullyParsed is true