| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 | 3 |
| 4 <head> | 4 <head> |
| 5 <script src="../../resources/js-test.js"></script> | 5 <script src="../../resources/js-test.js"></script> |
| 6 <script src="../resources/audit-util.js"></script> | 6 <script src="../resources/audit-util.js"></script> |
| 7 <script src="../resources/audio-testing.js"></script> | 7 <script src="../resources/audio-testing.js"></script> |
| 8 </head> | 8 </head> |
| 9 | 9 |
| 10 <body> | 10 <body> |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 // not have the second output, so it should throw. | 118 // not have the second output, so it should throw. |
| 119 Should('Connecting with an invalid output', function () { | 119 Should('Connecting with an invalid output', function () { |
| 120 gain1.connect(gain2, 1).connect(contextA.destination); | 120 gain1.connect(gain2, 1).connect(contextA.destination); |
| 121 }).throw('IndexSizeError'); | 121 }).throw('IndexSizeError'); |
| 122 | 122 |
| 123 // Test if the second connection throws correctly. The contextB's | 123 // Test if the second connection throws correctly. The contextB's |
| 124 // destination is not compatible with the nodes from contextA, thus the | 124 // destination is not compatible with the nodes from contextA, thus the |
| 125 // first connection succeeds but the second one should throw. | 125 // first connection succeeds but the second one should throw. |
| 126 Should('Connecting to a node from the different context', function () { | 126 Should('Connecting to a node from the different context', function () { |
| 127 gain1.connect(gain2).connect(contextB.destination); | 127 gain1.connect(gain2).connect(contextB.destination); |
| 128 }).throw('SyntaxError'); | 128 }).throw('InvalidAccessError'); |
| 129 | 129 |
| 130 done(); | 130 done(); |
| 131 }); | 131 }); |
| 132 | 132 |
| 133 // Task: verify if the method chaining actually works. | 133 // Task: verify if the method chaining actually works. |
| 134 audit.defineTask('verification', function (done) { | 134 audit.defineTask('verification', function (done) { |
| 135 // We pick the lowest sample rate allowed to run the test efficiently. | 135 // We pick the lowest sample rate allowed to run the test efficiently. |
| 136 var context = new OfflineAudioContext(1, 128, 3000); | 136 var context = new OfflineAudioContext(1, 128, 3000); |
| 137 | 137 |
| 138 var constantBuffer = createConstantBuffer(context, 1, 1.0); | 138 var constantBuffer = createConstantBuffer(context, 1, 1.0); |
| (...skipping 27 matching lines...) Expand all Loading... |
| 166 'invalid-operation', | 166 'invalid-operation', |
| 167 'verification', | 167 'verification', |
| 168 'finish' | 168 'finish' |
| 169 ); | 169 ); |
| 170 | 170 |
| 171 successfullyParsed = true; | 171 successfullyParsed = true; |
| 172 </script> | 172 </script> |
| 173 </body> | 173 </body> |
| 174 | 174 |
| 175 </html> | 175 </html> |
| OLD | NEW |