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 <script src="../http/tests/resources/permissions-helper.js"></script> | 5 <script src="../http/tests/resources/permissions-helper.js"></script> |
6 </head> | 6 </head> |
7 <body> | 7 <body> |
8 <script> | 8 <script> |
9 | 9 |
10 description("Test if various kinds of MIDI messages can be validated."); | 10 description("Test if various kinds of MIDI messages can be validated."); |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 shouldThrow('output.send([0x80, 0x00, 0xf4, 0x00])'); | 91 shouldThrow('output.send([0x80, 0x00, 0xf4, 0x00])'); |
92 shouldThrow('output.send([0x80, 0x00, 0x00, 0xf4])'); | 92 shouldThrow('output.send([0x80, 0x00, 0x00, 0xf4])'); |
93 shouldThrow('output.send([0xf0, 0xff, 0xf4, 0xf7])'); | 93 shouldThrow('output.send([0xf0, 0xff, 0xf4, 0xf7])'); |
94 | 94 |
95 // Invalid timestamps. | 95 // Invalid timestamps. |
96 shouldThrow('output.send([], NaN)'); | 96 shouldThrow('output.send([], NaN)'); |
97 shouldThrow('output.send([], Infinity)'); | 97 shouldThrow('output.send([], Infinity)'); |
98 shouldThrow('output.send(new Uint8Array(), NaN)'); | 98 shouldThrow('output.send(new Uint8Array(), NaN)'); |
99 shouldThrow('output.send(new Uint8Array(), Infinity)'); | 99 shouldThrow('output.send(new Uint8Array(), Infinity)'); |
100 | 100 |
| 101 if (window.SharedArrayBuffer) { |
| 102 shouldThrow('output.send(new Uint8Array(new SharedArrayBuffer(4)))'); |
| 103 shouldThrow('output.send(new Uint8Array(new SharedArrayBuffer(4), 0))'); |
| 104 } |
| 105 |
101 finishJSTest(); | 106 finishJSTest(); |
102 }).catch(function () { | 107 }).catch(function () { |
103 testFailed("requestMIDIAccess() return an error."); | 108 testFailed("requestMIDIAccess() return an error."); |
104 finishJSTest(); | 109 finishJSTest(); |
105 }); | 110 }); |
106 | 111 |
107 </script> | 112 </script> |
108 </body> | 113 </body> |
109 </html> | 114 </html> |
OLD | NEW |