chromium/content/test/data/midi/subscribe_all.html

<html>
<script>
// A smoke test to call requestMIDIAccess From ContentBrowserTest.
// We cannot check result since it relies on the availability of system level
// MIDI on the test runner.
var error_message = "";
navigator.requestMIDIAccess().then(
  a => {
    a.inputs.forEach(i => i.onmidimessage = console.log);
    document.title = "pass";
  },
  e => {
    error_message = e.message;
    document.title = "fail";
  });
</script>
</html>