Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / webaudio / audioparam-exponentialRampToValueAtTime.html
blobddf219e341e1d56a0b6ad050c78388c08f80efcd
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html>
3 <head>
4 <script src="resources/compatibility.js"></script>
5 <script src="resources/audio-testing.js"></script>
6 <script src="resources/audioparam-testing.js"></script>
7 <script src="../resources/js-test.js"></script>
8 </head>
10 <body>
11 <div id="description"></div>
12 <div id="console"></div>
14 <script>
15 description("Test AudioParam exponentialRampToValueAtTime() functionality.");
17 // Play a long DC signal out through an AudioGainNode, and call setValueAtTime() and
18 // exponentialRampToValueAtTime() at regular intervals to set the starting and ending values
19 // for an exponential ramp. Each time interval has a ramp with a different starting and
20 // ending value so that there is a discontinuity at each time interval boundary. The
21 // discontinuity is for testing timing. Also, we alternate between an increasing and
22 // decreasing ramp for each interval.
24 // Number of tests to run.
25 var numberOfTests = 100;
27 // Max allowed difference between the rendered data and the expected result.
28 var maxAllowedError = 6.75e-4;
30 // The AudioGainNode starts with this value instead of the default value.
31 var initialValue = 100;
33 // Set the gain node value to the specified value at the specified time.
34 function setValue(value, time)
36 gainNode.gain.setValueAtTime(value, time);
39 // Generate an exponential ramp ending at time |endTime| with an ending value of |value|.
40 function generateRamp(value, startTime, endTime)
42 // |startTime| is ignored because the exponential ramp
43 // uses the value from the setValueAtTime() call above.
44 gainNode.gain.exponentialRampToValueAtTime(value, endTime)
47 function runTest()
49 createAudioGraphAndTest(numberOfTests,
50 initialValue,
51 setValue,
52 generateRamp,
53 "exponentialRampToValueAtTime()",
54 maxAllowedError,
55 createExponentialRampArray);
59 runTest();
60 successfullyParsed = true;
62 </script>
64 </body>
65 </html>