| OLD | NEW |
| 1 <!doctype html> | 1 <!doctype html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <title>Validate Reduction Value of DynamicsComporessor after Disabling</titl
e> | 4 <title>Validate Reduction Value of DynamicsComporessor after Disabling</titl
e> |
| 5 <script src="resources/compatibility.js"></script> | 5 <script src="resources/compatibility.js"></script> |
| 6 <script src="resources/audio-testing.js"></script> | 6 <script src="resources/audio-testing.js"></script> |
| 7 <script src="../resources/js-test.js"></script> | 7 <script src="../resources/js-test.js"></script> |
| 8 </head> | 8 </head> |
| 9 | 9 |
| 10 <body> | 10 <body> |
| 11 <script> | 11 <script> |
| 12 description("Validate Reduction Value of DynamicsComporessor after Disabli
ng"); | 12 description("Validate Reduction Value of DynamicsComporessor after Disabli
ng"); |
| 13 | 13 |
| 14 var context; | 14 var context; |
| 15 var buffer; | 15 var buffer; |
| 16 var source; | 16 var source; |
| 17 var compressor; | 17 var compressor; |
| 18 var renderedData; | 18 var renderedData; |
| 19 | 19 |
| 20 var sampleRate = 44100; | 20 var sampleRate = 44100; |
| 21 var testDurationSamples = 44100; | 21 var testDurationSamples = 44100; |
| 22 | 22 |
| 23 function checkResult (event) { | 23 function checkResult (event) { |
| 24 | 24 |
| 25 renderedData = event.renderedBuffer.getChannelData(0); | 25 renderedData = event.renderedBuffer.getChannelData(0); |
| 26 | 26 |
| 27 // Check that the reduction value is 0.0. | 27 // Check that the reduction value is 0.0. |
| 28 if (compressor.reduction.value !== 0.0) { | 28 if (compressor.reduction !== 0.0) { |
| 29 testFailed("Expected reduction of 0.0, but the value is " + compre
ssor.reduction.value); | 29 testFailed("Expected reduction of 0.0, but the value is " + compre
ssor.reduction); |
| 30 } | 30 } |
| 31 else { | 31 else { |
| 32 testPassed("Reduction is 0.0"); | 32 testPassed("Reduction is 0.0"); |
| 33 } | 33 } |
| 34 | 34 |
| 35 finishJSTest(); | 35 finishJSTest(); |
| 36 } | 36 } |
| 37 | 37 |
| 38 function runTest() { | 38 function runTest() { |
| 39 window.jsTestIsAsync = true; | 39 window.jsTestIsAsync = true; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 57 | 57 |
| 58 // Render it! | 58 // Render it! |
| 59 context.startRendering(); | 59 context.startRendering(); |
| 60 } | 60 } |
| 61 | 61 |
| 62 runTest(); | 62 runTest(); |
| 63 succesfullyParsed = true; | 63 succesfullyParsed = true; |
| 64 </script> | 64 </script> |
| 65 </body> | 65 </body> |
| 66 </html> | 66 </html> |
| OLD | NEW |