зеркало из https://github.com/mozilla/gecko-dev.git
27 строки
804 B
HTML
27 строки
804 B
HTML
|
<html>
|
||
|
<head>
|
||
|
<title>WebMIDI Listener Test</title>
|
||
|
<script type="application/javascript" 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(false);
|
||
|
// Request access without sysex.
|
||
|
try {
|
||
|
await navigator.requestMIDIAccess({ "sysex": false });
|
||
|
ok(false, "MIDI Access Request Deny failed");
|
||
|
SimpleTest.finish();
|
||
|
} catch {
|
||
|
ok(true, "MIDI Access Request Deny successful!");
|
||
|
SimpleTest.finish();
|
||
|
}
|
||
|
}
|
||
|
</script>
|
||
|
</body>
|
||
|
</html>
|