Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(90)

Unified Diff: third_party/WebKit/LayoutTests/webaudio/BiquadFilter/biquadfilternode-basic.html

Issue 2895963003: Apply layout-test-tidy to LayoutTests/webaudio (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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>

Powered by Google App Engine
This is Rietveld 408576698