| 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 MediaElementAudioSourceNode API."); | 15 description("Basic tests for MediaElementAudioSourceNode API."); |
| 15 | 16 |
| 16 var context = 0; | 17 var context = 0; |
| 17 | 18 |
| 18 function runTest() { | 19 function runTest() { |
| 19 if (window.testRunner) { | 20 if (window.testRunner) { |
| 20 testRunner.dumpAsText(); | 21 testRunner.dumpAsText(); |
| 21 testRunner.waitUntilDone(); | 22 testRunner.waitUntilDone(); |
| 22 } | 23 } |
| 23 | 24 |
| 24 window.jsTestIsAsync = true; | 25 window.jsTestIsAsync = true; |
| 25 | 26 |
| 26 context = new webkitAudioContext(); | 27 context = new AudioContext(); |
| 27 | 28 |
| 28 audioElement = new Audio(); | 29 audioElement = new Audio(); |
| 29 mediaSource = context.createMediaElementSource(audioElement); | 30 mediaSource = context.createMediaElementSource(audioElement); |
| 30 window.audioNode = mediaSource; | 31 window.audioNode = mediaSource; |
| 31 | 32 |
| 32 // Check number of inputs and outputs. | 33 // Check number of inputs and outputs. |
| 33 if (audioNode.numberOfInputs == 0) | 34 if (audioNode.numberOfInputs == 0) |
| 34 testPassed("Source AudioNode has no inputs."); | 35 testPassed("Source AudioNode has no inputs."); |
| 35 else | 36 else |
| 36 testFailed("Source AudioNode should not have inputs."); | 37 testFailed("Source AudioNode should not have inputs."); |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 | 82 |
| 82 finishJSTest(); | 83 finishJSTest(); |
| 83 } | 84 } |
| 84 | 85 |
| 85 runTest(); | 86 runTest(); |
| 86 | 87 |
| 87 </script> | 88 </script> |
| 88 | 89 |
| 89 </body> | 90 </body> |
| 90 </html> | 91 </html> |
| OLD | NEW |