OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <script src="../../resources/js-test.js"></script> | 3 <script src="../../resources/js-test.js"></script> |
4 <body> | 4 <body> |
5 <script type="text/javascript"> | 5 <script type="text/javascript"> |
6 description("Test navigator.requestMIDIAccess API in WebView"); | 6 description("Test navigator.requestMIDIAccess API in WebView"); |
7 window.jsTestIsAsync = true; | 7 window.jsTestIsAsync = true; |
8 | 8 |
9 function onMIDIError(errorMessage) { | 9 function onMIDIError(errorMessage) { |
10 testPassed('requestMIDIAccess error, reason: ' + errorMessage); | 10 testPassed('requestMIDIAccess error, reason: ' + errorMessage); |
11 finishJSTest(); | 11 finishJSTest(); |
12 } | 12 } |
13 | 13 |
14 function onMIDISuccess(stream) { | 14 function onMIDISuccess(stream) { |
15 testFail('access was granted but should not have been.'); | 15 testFail('access was granted but should not have been.'); |
16 finishJSTest(); | 16 finishJSTest(); |
17 } | 17 } |
18 | 18 |
19 navigator.requestMIDIAccess({sysex:true}).then( | 19 navigator.requestMIDIAccess({sysex:true}).then( |
20 onMIDISuccess, onMIDIError); | 20 onMIDISuccess, onMIDIError); |
21 </script> | 21 </script> |
22 </body> | 22 </body> |
23 </html> | 23 </html> |
OLD | NEW |