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

Side by Side Diff: third_party/WebKit/LayoutTests/webaudio/AudioParam/audioparam-setTargetAtTime-limit.html

Issue 2658703002: Convert AudioParam Audit tests to testharness (Closed)
Patch Set: Rebase test Created 3 years, 10 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 unified diff | Download patch
OLDNEW
1 <!doctype html> 1 <!doctype html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <title>Test setTargetAtTime Approach to Limit</title> 4 <title>Test setTargetAtTime Approach to Limit</title>
5 <script src="../../resources/js-test.js"></script> 5 <script src="../../resources/testharness.js"></script>
6 <script src="../../resources/testharnessreport.js"></script>
6 <script src="../resources/audit-util.js"></script> 7 <script src="../resources/audit-util.js"></script>
7 <script src="../resources/audio-testing.js"></script> 8 <script src="../resources/audio-testing.js"></script>
8 <script src="../resources/audioparam-testing.js"></script> 9 <script src="../resources/audioparam-testing.js"></script>
9 </head> 10 </head>
10 11
11 <body> 12 <body>
12 <script> 13 <script>
13 description("Test setTargetAtTime Approach to Limit");
14 window.jsTestIsAsync = true;
15 14
16 var audit = Audit.createTaskRunner(); 15 var audit = Audit.createTaskRunner();
17 16
18 audit.defineTask("approach 1", function(done) { 17 audit.defineTask("approach 1", function(done) {
19 var sampleRate = 48000; 18 var sampleRate = 48000;
20 19
21 // A really short time constant so that setTargetAtTime approaches the l imiting value well 20 // A really short time constant so that setTargetAtTime approaches the l imiting value well
22 // before the end of the test. 21 // before the end of the test.
23 var timeConstant = 0.001; 22 var timeConstant = 0.001;
24 23
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 133
135 var success = true; 134 var success = true;
136 success = Should("Initial output of " + tailFrame + " samples for " + message, 135 success = Should("Initial output of " + tailFrame + " samples for " + message,
137 actual.slice(0, tailFrame), { numberOfArrayLog: 8 }) 136 actual.slice(0, tailFrame), { numberOfArrayLog: 8 })
138 .beCloseToArray(expected.slice(0, tailFrame), options.threshold) && success; 137 .beCloseToArray(expected.slice(0, tailFrame), options.threshold) && success;
139 138
140 success = Should("Tail output for " + message, 139 success = Should("Tail output for " + message,
141 actual.slice(tailFrame)) 140 actual.slice(tailFrame))
142 .containValues([options.v1]) && success; 141 .containValues([options.v1]) && success;
143 142
144 if (success) 143 Should(message, success)
145 testPassed(message + " had the expected values.\n"); 144 .summarize("had the expected values",
146 else 145 "did not have the expected values");
147 testFailed(message + " did not have the expected values.\n");
148 }); 146 });
149 } 147 }
150 148
151 audit.defineTask("finish", function (done) { 149 audit.defineTask("finish", function (done) {
152 finishJSTest();
153 done(); 150 done();
154 }); 151 });
155 152
156 audit.runTasks(); 153 audit.runTasks();
157 </script> 154 </script>
158 </body> 155 </body>
159 </html> 156 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698