diff options
Diffstat (limited to 'testing/web-platform/tests/webaudio/the-audio-api/the-dynamicscompressornode-interface/dynamicscompressor-basic.html')
-rw-r--r-- | testing/web-platform/tests/webaudio/the-audio-api/the-dynamicscompressornode-interface/dynamicscompressor-basic.html | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/testing/web-platform/tests/webaudio/the-audio-api/the-dynamicscompressornode-interface/dynamicscompressor-basic.html b/testing/web-platform/tests/webaudio/the-audio-api/the-dynamicscompressornode-interface/dynamicscompressor-basic.html new file mode 100644 index 0000000000..6c602010d0 --- /dev/null +++ b/testing/web-platform/tests/webaudio/the-audio-api/the-dynamicscompressornode-interface/dynamicscompressor-basic.html @@ -0,0 +1,48 @@ +<!DOCTYPE html> +<html> + <head> + <title> + dynamicscompressor-basic.html + </title> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/webaudio/resources/audit-util.js"></script> + <script src="/webaudio/resources/audit.js"></script> + </head> + <body> + <script id="layout-test-code"> + let audit = Audit.createTaskRunner(); + let context; + let compressor; + + audit.define( + { + label: 'test', + description: 'Basic tests for DynamicsCompressorNode API' + }, + function(task, should) { + + context = new AudioContext(); + compressor = context.createDynamicsCompressor(); + + should(compressor.threshold.value, 'compressor.threshold.value') + .beEqualTo(-24); + should(compressor.knee.value, 'compressor.knee.value') + .beEqualTo(30); + should(compressor.ratio.value, 'compressor.ratio.value') + .beEqualTo(12); + should(compressor.attack.value, 'compressor.attack.value') + .beEqualTo(Math.fround(0.003)); + should(compressor.release.value, 'compressor.release.value') + .beEqualTo(0.25); + should(typeof compressor.reduction, 'typeof compressor.reduction') + .beEqualTo('number'); + should(compressor.reduction, 'compressor.reduction').beEqualTo(0); + + task.done(); + }); + + audit.run(); + </script> + </body> +</html> |