| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 | 2 |
| 3 <html> | 3 <html> |
| 4 <head> | 4 <head> |
| 5 <script src="../resources/js-test.js"></script> | 5 <script src="../resources/js-test.js"></script> |
| 6 <script src="resources/compatibility.js"></script> |
| 6 <script src="resources/audio-testing.js"></script> | 7 <script src="resources/audio-testing.js"></script> |
| 7 </head> | 8 </head> |
| 8 | 9 |
| 9 <body> | 10 <body> |
| 10 <div id="description"></div> | 11 <div id="description"></div> |
| 11 <div id="console"></div> | 12 <div id="console"></div> |
| 12 | 13 |
| 13 <script> | 14 <script> |
| 14 description("Basic tests for MediaStreamAudioDestinationNode API."); | 15 description("Basic tests for MediaStreamAudioDestinationNode API."); |
| 15 | 16 |
| 16 var context; | 17 var context; |
| 17 var mediaStreamDestination; | 18 var mediaStreamDestination; |
| 18 | 19 |
| 19 function runTest() { | 20 function runTest() { |
| 20 if (window.testRunner) { | 21 if (window.testRunner) { |
| 21 testRunner.dumpAsText(); | 22 testRunner.dumpAsText(); |
| 22 } | 23 } |
| 23 | 24 |
| 24 context = new webkitAudioContext(); | 25 context = new AudioContext(); |
| 25 | 26 |
| 26 mediaStreamDestination = context.createMediaStreamDestination(); | 27 mediaStreamDestination = context.createMediaStreamDestination(); |
| 27 | 28 |
| 28 // MediaStreamAudioDestinationNode should inherit AudioNode. | 29 // MediaStreamAudioDestinationNode should inherit AudioNode. |
| 29 shouldBe('mediaStreamDestination.__proto__.__proto__', 'AudioNode.prototype'
); | 30 shouldBe('mediaStreamDestination.__proto__.__proto__', 'AudioNode.prototype'
); |
| 30 | 31 |
| 31 // Check number of inputs and outputs. | 32 // Check number of inputs and outputs. |
| 32 if (mediaStreamDestination.numberOfInputs == 1) | 33 if (mediaStreamDestination.numberOfInputs == 1) |
| 33 testPassed("Destination AudioNode has one input."); | 34 testPassed("Destination AudioNode has one input."); |
| 34 else | 35 else |
| (...skipping 11 matching lines...) Expand all Loading... |
| 46 finishJSTest(); | 47 finishJSTest(); |
| 47 } | 48 } |
| 48 | 49 |
| 49 runTest(); | 50 runTest(); |
| 50 window.successfullyParsed = true; | 51 window.successfullyParsed = true; |
| 51 | 52 |
| 52 </script> | 53 </script> |
| 53 | 54 |
| 54 </body> | 55 </body> |
| 55 </html> | 56 </html> |
| OLD | NEW |