OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script src="../resources/js-test.js"></script> | 4 <script src="../resources/js-test.js"></script> |
5 </head> | 5 </head> |
6 <body> | 6 <body> |
7 <script> | 7 <script> |
8 | 8 |
9 description("Test if various kinds of MIDI messages can be validated."); | 9 description("Test if various kinds of MIDI messages can be validated."); |
10 | 10 |
11 // FIXME: remove following workaround once testRunner in Chromium has a new inte
rface. | |
12 if (!testRunner.setMIDISysexPermission) | |
13 testRunner.setMIDISysexPermission = testRunner.setMIDISysExPermission; | |
14 | |
15 shouldBeDefined("testRunner.setMIDISysexPermission"); | 11 shouldBeDefined("testRunner.setMIDISysexPermission"); |
16 shouldBeDefined("navigator.requestMIDIAccess"); | 12 shouldBeDefined("navigator.requestMIDIAccess"); |
17 | 13 |
18 window.jsTestIsAsync = true; | 14 window.jsTestIsAsync = true; |
19 | 15 |
20 testRunner.setMIDISysexPermission(true); | 16 testRunner.setMIDISysexPermission(true); |
21 | 17 |
22 navigator.requestMIDIAccess({sysex: true}).then(function (a) { | 18 navigator.requestMIDIAccess({sysex: true}).then(function (a) { |
23 output = a.outputs()[0]; | 19 output = a.outputs()[0]; |
24 | 20 |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 shouldThrow('output.send([0xf0, 0xff, 0xf4, 0xf7])'); | 92 shouldThrow('output.send([0xf0, 0xff, 0xf4, 0xf7])'); |
97 | 93 |
98 finishJSTest(); | 94 finishJSTest(); |
99 }, function () { | 95 }, function () { |
100 testFailed("requestMIDIAccess() return an error."); | 96 testFailed("requestMIDIAccess() return an error."); |
101 }); | 97 }); |
102 | 98 |
103 </script> | 99 </script> |
104 </body> | 100 </body> |
105 </html> | 101 </html> |
OLD | NEW |