| 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 type="text/javascript" src="resources/audio-testing.js"></script> | 7 <script type="text/javascript" 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 DynamicsCompressorNode API."); | 15 description("Basic tests for DynamicsCompressorNode API."); |
| 15 | 16 |
| 16 var context; | 17 var context; |
| 17 var compressor; | 18 var compressor; |
| 18 | 19 |
| 19 function runTest() { | 20 function runTest() { |
| 20 if (window.testRunner) { | 21 if (window.testRunner) { |
| 21 testRunner.dumpAsText(); | 22 testRunner.dumpAsText(); |
| 22 testRunner.waitUntilDone(); | 23 testRunner.waitUntilDone(); |
| 23 } | 24 } |
| 24 | 25 |
| 25 window.jsTestIsAsync = true; | 26 window.jsTestIsAsync = true; |
| 26 | 27 |
| 27 context = new webkitAudioContext(); | 28 context = new AudioContext(); |
| 28 compressor = context.createDynamicsCompressor(); | 29 compressor = context.createDynamicsCompressor(); |
| 29 | 30 |
| 30 try { | 31 try { |
| 31 if (compressor.threshold.value == -24) | 32 if (compressor.threshold.value == -24) |
| 32 testPassed("threshold attribute has correct default value."); | 33 testPassed("threshold attribute has correct default value."); |
| 33 else | 34 else |
| 34 testFailed("threshold attribute has incorrect default value."); | 35 testFailed("threshold attribute has incorrect default value."); |
| 35 | 36 |
| 36 if (compressor.knee.value == 30) | 37 if (compressor.knee.value == 30) |
| 37 testPassed("knee attribute has correct default value."); | 38 testPassed("knee attribute has correct default value."); |
| (...skipping 21 matching lines...) Expand all Loading... |
| 59 | 60 |
| 60 finishJSTest(); | 61 finishJSTest(); |
| 61 } | 62 } |
| 62 | 63 |
| 63 runTest(); | 64 runTest(); |
| 64 | 65 |
| 65 </script> | 66 </script> |
| 66 | 67 |
| 67 </body> | 68 </body> |
| 68 </html> | 69 </html> |
| OLD | NEW |