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

Side by Side Diff: third_party/WebKit/LayoutTests/webaudio/AudioParam/audioparam-negative-exponentialRamp.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 <script src="../../resources/js-test.js"></script> 4 <script src="../../resources/testharness.js"></script>
5 <script src="../../resources/testharnessreport.js"></script>
5 <script src="../resources/audit-util.js"></script> 6 <script src="../resources/audit-util.js"></script>
6 <script src="../resources/audio-testing.js"></script> 7 <script src="../resources/audio-testing.js"></script>
7 <title>Test Negative AudioParam.exponentialRampToValueAtTime</title> 8 <title>Test Negative AudioParam.exponentialRampToValueAtTime</title>
8 </head> 9 </head>
9 10
10 <body> 11 <body>
11 <script> 12 <script>
12 description("Test AudioParam.exponentialRampToValueAtTime() with Negative Values.");
13 window.jsTestIsAsync = true;
14 13
15 var sampleRate = 48000; 14 var sampleRate = 48000;
16 15
17 var audit = Audit.createTaskRunner(); 16 var audit = Audit.createTaskRunner();
18 17
19 audit.defineTask("both negative values", function (done) { 18 audit.defineTask("both negative values", function (done) {
20 var renderDuration = 0.125; 19 var renderDuration = 0.125;
21 20
22 // Create context with two channels. Channel 0 contains the positive-va lued exponential and 21 // Create context with two channels. Channel 0 contains the positive-va lued exponential and
23 // channel 1 contains the negative-valued exponential. We'll compare th e two channels to 22 // channel 1 contains the negative-valued exponential. We'll compare th e two channels to
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 // should just propagate -1 from the end of the linear ramp "forever". 138 // should just propagate -1 from the end of the linear ramp "forever".
140 var endFrame = Math.ceil(linearRampEnd * sampleRate); 139 var endFrame = Math.ceil(linearRampEnd * sampleRate);
141 Should("Exponential ramp from -1 to 1 after the end of the linear ramp ", 140 Should("Exponential ramp from -1 to 1 after the end of the linear ramp ",
142 actual.slice(endFrame)) 141 actual.slice(endFrame))
143 .beConstantValueOf(-1); 142 .beConstantValueOf(-1);
144 }).then(done); 143 }).then(done);
145 144
146 }); 145 });
147 146
148 audit.defineTask("finish", function (done) { 147 audit.defineTask("finish", function (done) {
149 finishJSTest();
150 done(); 148 done();
151 }); 149 });
152 150
153 audit.runTasks(); 151 audit.runTasks();
154 </script> 152 </script>
155 </body> 153 </body>
156 </html> 154 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698