OLD | NEW |
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> | 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <link rel="stylesheet" href="../fast/js/resources/js-test-style.css"> | 4 <link rel="stylesheet" href="../fast/js/resources/js-test-style.css"> |
5 <script src="../fast/js/resources/js-test-pre.js"></script> | 5 <script src="../fast/js/resources/js-test-pre.js"></script> |
6 </head> | 6 </head> |
7 <body> | 7 <body> |
8 <p id="description"></p> | 8 <p id="description"></p> |
9 <div id="console"></div> | 9 <div id="console"></div> |
10 <script> | 10 <script> |
(...skipping 27 matching lines...) Expand all Loading... |
38 | 38 |
39 if (output.id == "MockOutputID" && | 39 if (output.id == "MockOutputID" && |
40 output.manufacturer == "MockOutputManufacturer" && | 40 output.manufacturer == "MockOutputManufacturer" && |
41 output.name == "MockOutputName" && | 41 output.name == "MockOutputName" && |
42 output.version == "MockOutputVersion") { | 42 output.version == "MockOutputVersion") { |
43 testPassed('output attributes are correct'); | 43 testPassed('output attributes are correct'); |
44 } else { | 44 } else { |
45 testFailed('output attributes are not correct'); | 45 testFailed('output attributes are not correct'); |
46 } | 46 } |
47 | 47 |
| 48 // Test sending of MIDI data with a Uint8Array. |
| 49 var typedArrayData = new Uint8Array([0x90, 0x45, 0x7f]); |
| 50 output.send(typedArrayData); |
| 51 |
| 52 // Test sending of MIDI data with a regular Array. |
| 53 output.send([0x90, 0x45, 0x7f]); |
| 54 |
| 55 // Test sending of MIDI data with a regular Array giving an explicit timesta
mp. |
| 56 output.send([0x90, 0x45, 0x7f], performance.now()); |
| 57 |
48 // Now test System Exclusive access - our test mock should not allow this ty
pe of access. | 58 // Now test System Exclusive access - our test mock should not allow this ty
pe of access. |
49 try { | 59 try { |
50 navigator.requestMIDIAccess( { sysex: true } ).then(successCallback2, er
rorCallback2); | 60 navigator.requestMIDIAccess( { sysex: true } ).then(successCallback2, er
rorCallback2); |
51 testPassed('navigator.requestMIDIAccess() did not throw exception.'); | 61 testPassed('navigator.requestMIDIAccess() did not throw exception.'); |
52 } catch(e) { | 62 } catch(e) { |
53 testFailed('navigator.requestMIDIAccess() should not throw exception.'); | 63 testFailed('navigator.requestMIDIAccess() should not throw exception.'); |
54 finishJSTest(); | 64 finishJSTest(); |
55 } | 65 } |
56 } | 66 } |
57 | 67 |
(...skipping 22 matching lines...) Expand all Loading... |
80 testFailed('navigator.requestMIDIAccess() should not throw exception.'); | 90 testFailed('navigator.requestMIDIAccess() should not throw exception.'); |
81 finishJSTest(); | 91 finishJSTest(); |
82 } | 92 } |
83 | 93 |
84 window.successfullyParsed = true; | 94 window.successfullyParsed = true; |
85 | 95 |
86 </script> | 96 </script> |
87 <script src="../fast/js/resources/js-test-post.js"></script> | 97 <script src="../fast/js/resources/js-test-post.js"></script> |
88 </body> | 98 </body> |
89 </html> | 99 </html> |
OLD | NEW |