summaryrefslogtreecommitdiffstats
path: root/android_webview/tools/WebViewShell/test/blink-apis/webmidi/requestmidiaccess-permission-denied.html
blob: aabd8c1d37b765f9f6e3dc545b0376352518e03b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<!DOCTYPE html>
<html>
  <script src="../../resources/js-test.js"></script>
  <body>
    <script type="text/javascript">
      description("Test navigator.requestMIDIAccess API in WebView");
      window.jsTestIsAsync = true;

      function onMIDIError(errorMessage) {
        testPassed('requestMIDIAccess error, reason: ' + errorMessage);
        finishJSTest();
      }

      function onMIDISuccess(stream) {
        testFail('access was granted but should not have been.');
        finishJSTest();
      }

      navigator.requestMIDIAccess({sysex:true}).then(
          onMIDISuccess, onMIDIError);
    </script>
  </body>
</html>