Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / webaudio / audioparam-setValueAtTime.html
blob908c4b9f46438700db2e026fe9ec28128657aaad
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 setValueAtTime() functionality.");
17 // Play a long DC signal out through an AudioGainNode, and call setValueAtTime() at regular
18 // intervals to set the value for the duration of the interval. Each time interval has
19 // different value so that there is a discontinuity at each time interval boundary. The
20 // discontinuity is for testing timing.
22 // Number of tests to run.
23 var numberOfTests = 100;
25 // Max allowed difference between the rendered data and the expected result.
26 var maxAllowedError = 6e-8;
28 // Set the gain node value to the specified value at the specified time.
29 function setValue(value, time)
31 gainNode.gain.setValueAtTime(value, time);
34 // For testing setValueAtTime(), we don't need to do anything for automation. because the value at
35 // the beginning of the interval is set by setValue and it remains constant for the duration, which
36 // is what we want.
37 function automation(value, startTime, endTime)
39 // Do nothing.
42 function runTest()
44 createAudioGraphAndTest(numberOfTests,
46 setValue,
47 automation,
48 "setValueAtTime()",
49 maxAllowedError,
50 createConstantArray);
53 runTest();
54 successfullyParsed = true;
56 </script>
58 </body>
59 </html>