| 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/compatibility.js"></script> |
| 7 <script type="text/javascript" src="resources/audio-testing.js"></script> | 7 <script type="text/javascript" src="resources/audio-testing.js"></script> |
| 8 </head> | 8 </head> |
| 9 | 9 |
| 10 <body> | 10 <body> |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 if (compressor.knee.value == 30) | 37 if (compressor.knee.value == 30) |
| 38 testPassed("knee attribute has correct default value."); | 38 testPassed("knee attribute has correct default value."); |
| 39 else | 39 else |
| 40 testFailed("knee attribute has incorrect default value."); | 40 testFailed("knee attribute has incorrect default value."); |
| 41 | 41 |
| 42 if (compressor.ratio.value == 12) | 42 if (compressor.ratio.value == 12) |
| 43 testPassed("ratio attribute has correct default value."); | 43 testPassed("ratio attribute has correct default value."); |
| 44 else | 44 else |
| 45 testFailed("ratio attribute has incorrect default value."); | 45 testFailed("ratio attribute has incorrect default value."); |
| 46 | 46 |
| 47 if (compressor.attack.value - 0.003 < 3e-8) | 47 if (compressor.attack.value === Math.fround(0.003)) |
| 48 testPassed("attack attribute has correct default value."); | 48 testPassed("attack attribute has correct default value."); |
| 49 else | 49 else |
| 50 testFailed("attack attribute has incorrect default value."); | 50 testFailed("attack attribute has incorrect default value."); |
| 51 | 51 |
| 52 if (compressor.release.value - 0.25 < 3e-8) | 52 if (compressor.release.value === 0.25) |
| 53 testPassed("release attribute has correct default value."); | 53 testPassed("release attribute has correct default value."); |
| 54 else | 54 else |
| 55 testFailed("release attribute has incorrect default value."); | 55 testFailed("release attribute has incorrect default value."); |
| 56 | 56 |
| 57 if (typeof compressor.reduction === "number") { |
| 58 testPassed("reduction attribute is a number.") |
| 59 if (compressor.reduction == 0) |
| 60 testPassed("reduction attribute has correct default value.") |
| 61 } else { |
| 62 testFailed("reduction attribute is an " + compressor.reduction.const
ructor.name + " not a number."); |
| 63 } |
| 64 |
| 57 } catch(e) { | 65 } catch(e) { |
| 58 testFailed("Exception thrown when accessing DynamicsCompressorNode attri
butes."); | 66 testFailed("Exception thrown when accessing DynamicsCompressorNode attri
butes."); |
| 59 } | 67 } |
| 60 | 68 |
| 61 finishJSTest(); | 69 finishJSTest(); |
| 62 } | 70 } |
| 63 | 71 |
| 64 runTest(); | 72 runTest(); |
| 65 | 73 |
| 66 </script> | 74 </script> |
| 67 | 75 |
| 68 </body> | 76 </body> |
| 69 </html> | 77 </html> |
| OLD | NEW |