| Index: third_party/WebKit/LayoutTests/webaudio/BiquadFilter/biquadfilternode-basic.html
|
| diff --git a/third_party/WebKit/LayoutTests/webaudio/BiquadFilter/biquadfilternode-basic.html b/third_party/WebKit/LayoutTests/webaudio/BiquadFilter/biquadfilternode-basic.html
|
| index 84dc4e6c0a9299c79b9ad639195bc2067d13db44..45da53992578a2fcdbc59110525df4b6b9307524 100644
|
| --- a/third_party/WebKit/LayoutTests/webaudio/BiquadFilter/biquadfilternode-basic.html
|
| +++ b/third_party/WebKit/LayoutTests/webaudio/BiquadFilter/biquadfilternode-basic.html
|
| @@ -1,62 +1,64 @@
|
| <!DOCTYPE html>
|
| <html>
|
| -<head>
|
| -<script src="../../resources/testharness.js"></script>
|
| -<script src="../../resources/testharnessreport.js"></script>
|
| -<script src="../resources/audit-util.js"></script>
|
| -<script src="../resources/audit.js"></script>
|
| -</head>
|
| -
|
| -<body>
|
| -<script>
|
| -let audit = Audit.createTaskRunner();
|
| -
|
| -audit.define({
|
| - label: 'test',
|
| - description: 'Basic tests for BiquadFilterNode'
|
| -}, function(task, should) {
|
| -
|
| - let context = new AudioContext();
|
| - let filter = context.createBiquadFilter();
|
| -
|
| - should(filter.numberOfInputs, 'Number of inputs').beEqualTo(1);
|
| -
|
| - should(filter.numberOfOutputs, 'Number of outputs').beEqualTo(1);
|
| -
|
| - should(filter.type, 'Default filter type').beEqualTo('lowpass');
|
| -
|
| - should(filter.frequency.value, 'Default frequency value').beEqualTo(350);
|
| -
|
| - should(filter.Q.value, 'Default Q value').beEqualTo(1);
|
| -
|
| - should(filter.gain.value, 'Default gain value').beEqualTo(0);
|
| -
|
| - // Check that all legal filter types can be set.
|
| - let filterTypeArray = [
|
| - {type: 'lowpass'}, {type: 'highpass'}, {type: 'bandpass'},
|
| - {type: 'lowshelf'}, {type: 'highshelf'}, {type: 'peaking'}, {type: 'notch'},
|
| - {type: 'allpass'}
|
| - ];
|
| -
|
| - for (let i = 0; i < filterTypeArray.length; ++i) {
|
| - should(
|
| - () => filter.type = filterTypeArray[i].type,
|
| - 'Setting filter.type to ' + filterTypeArray[i].type)
|
| - .notThrow();
|
| - should(filter.type, 'Filter type is').beEqualTo(filterTypeArray[i].type);
|
| - }
|
| -
|
| -
|
| - // Check that numerical values are no longer supported
|
| - filter.type = 99;
|
| - should(filter.type, 'Setting filter.type to (invalid) 99').notBeEqualTo(99);
|
| -
|
| - task.done();
|
| -});
|
| -
|
| -audit.run();
|
| -
|
| -</script>
|
| -
|
| -</body>
|
| + <head>
|
| + <title>
|
| + biquadfilternode-basic.html
|
| + </title>
|
| + <script src="../../resources/testharness.js"></script>
|
| + <script src="../../resources/testharnessreport.js"></script>
|
| + <script src="../resources/audit-util.js"></script>
|
| + <script src="../resources/audit.js"></script>
|
| + </head>
|
| + <body>
|
| + <script id="layout-test-code">
|
| + let audit = Audit.createTaskRunner();
|
| +
|
| + audit.define(
|
| + {label: 'test', description: 'Basic tests for BiquadFilterNode'},
|
| + function(task, should) {
|
| +
|
| + let context = new AudioContext();
|
| + let filter = context.createBiquadFilter();
|
| +
|
| + should(filter.numberOfInputs, 'Number of inputs').beEqualTo(1);
|
| +
|
| + should(filter.numberOfOutputs, 'Number of outputs').beEqualTo(1);
|
| +
|
| + should(filter.type, 'Default filter type').beEqualTo('lowpass');
|
| +
|
| + should(filter.frequency.value, 'Default frequency value')
|
| + .beEqualTo(350);
|
| +
|
| + should(filter.Q.value, 'Default Q value').beEqualTo(1);
|
| +
|
| + should(filter.gain.value, 'Default gain value').beEqualTo(0);
|
| +
|
| + // Check that all legal filter types can be set.
|
| + let filterTypeArray = [
|
| + {type: 'lowpass'}, {type: 'highpass'}, {type: 'bandpass'},
|
| + {type: 'lowshelf'}, {type: 'highshelf'}, {type: 'peaking'},
|
| + {type: 'notch'}, {type: 'allpass'}
|
| + ];
|
| +
|
| + for (let i = 0; i < filterTypeArray.length; ++i) {
|
| + should(
|
| + () => filter.type = filterTypeArray[i].type,
|
| + 'Setting filter.type to ' + filterTypeArray[i].type)
|
| + .notThrow();
|
| + should(filter.type, 'Filter type is')
|
| + .beEqualTo(filterTypeArray[i].type);
|
| + }
|
| +
|
| +
|
| + // Check that numerical values are no longer supported
|
| + filter.type = 99;
|
| + should(filter.type, 'Setting filter.type to (invalid) 99')
|
| + .notBeEqualTo(99);
|
| +
|
| + task.done();
|
| + });
|
| +
|
| + audit.run();
|
| + </script>
|
| + </body>
|
| </html>
|
|
|