Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / webaudio / delaynode.html
blobd42afa0b3abeaf2184c75a72481f833c1970a585
1 <!DOCTYPE html>
3 <html>
4 <head>
5 <script src="../resources/js-test.js"></script>
6 <script src="resources/compatibility.js"></script>
7 <script src="resources/audio-testing.js"></script>
8 <script src="resources/delay-testing.js"></script>
9 </head>
11 <body>
13 <div id="description"></div>
14 <div id="console"></div>
16 <script>
17 description("Tests attribute and basic functionality of Delay.");
19 function runTest() {
20 if (window.testRunner) {
21 testRunner.dumpAsText();
22 testRunner.waitUntilDone();
25 window.jsTestIsAsync = true;
27 // Create offline audio context.
28 var context = new OfflineAudioContext(1, sampleRate * renderLengthSeconds, sampleRate);
29 var toneBuffer = createToneBuffer(context, 20, 20 * toneLengthSeconds, sampleRate); // 20Hz tone
31 var bufferSource = context.createBufferSource();
32 bufferSource.buffer = toneBuffer;
34 var delay = context.createDelay();
36 window.delay = delay;
37 shouldBeTrue("delay.numberOfInputs === 1");
38 shouldBeTrue("delay.numberOfOutputs === 1");
39 shouldBeTrue("delay.delayTime.defaultValue === 0.0");
40 shouldBeTrue("delay.delayTime.value === 0.0");
42 delay.delayTime.value = delayTimeSeconds;
43 shouldBeTrue("delay.delayTime.value === 0.5");
45 bufferSource.connect(delay);
46 delay.connect(context.destination);
47 bufferSource.start(0);
49 context.oncomplete = checkDelayedResult(toneBuffer);
50 context.startRendering();
53 runTest();
55 </script>
57 </body>
58 </html>