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 |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 shouldThrow('output.send([0xf0, 0xf0, 0xf7])'); | 84 shouldThrow('output.send([0xf0, 0xf0, 0xf7])'); |
85 shouldThrow('output.send([0xf0, 0xff, 0xf7, 0xf7])'); | 85 shouldThrow('output.send([0xf0, 0xff, 0xf7, 0xf7])'); |
86 | 86 |
87 // Reserved status bytes. | 87 // Reserved status bytes. |
88 shouldThrow('output.send([0xf4, 0x80, 0x00, 0x00])'); | 88 shouldThrow('output.send([0xf4, 0x80, 0x00, 0x00])'); |
89 shouldThrow('output.send([0x80, 0xf4, 0x00, 0x00])'); | 89 shouldThrow('output.send([0x80, 0xf4, 0x00, 0x00])'); |
90 shouldThrow('output.send([0x80, 0x00, 0xf4, 0x00])'); | 90 shouldThrow('output.send([0x80, 0x00, 0xf4, 0x00])'); |
91 shouldThrow('output.send([0x80, 0x00, 0x00, 0xf4])'); | 91 shouldThrow('output.send([0x80, 0x00, 0x00, 0xf4])'); |
92 shouldThrow('output.send([0xf0, 0xff, 0xf4, 0xf7])'); | 92 shouldThrow('output.send([0xf0, 0xff, 0xf4, 0xf7])'); |
93 | 93 |
| 94 // Invalid timestamps. |
| 95 shouldThrow('output.send([], NaN)'); |
| 96 shouldThrow('output.send([], Infinity)'); |
| 97 shouldThrow('output.send(new Uint8Array(), NaN)'); |
| 98 shouldThrow('output.send(new Uint8Array(), Infinity)'); |
| 99 |
94 finishJSTest(); | 100 finishJSTest(); |
95 }, function () { | 101 }, function () { |
96 testFailed("requestMIDIAccess() return an error."); | 102 testFailed("requestMIDIAccess() return an error."); |
97 }); | 103 }); |
98 | 104 |
99 </script> | 105 </script> |
100 </body> | 106 </body> |
101 </html> | 107 </html> |
OLD | NEW |