Chromium Code Reviews| Index: third_party/WebKit/ManualTests/webaudio/osc-exponentialRamp.html |
| diff --git a/third_party/WebKit/ManualTests/webaudio/osc-exponentialRamp.html b/third_party/WebKit/ManualTests/webaudio/osc-exponentialRamp.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..6d3fa5d5bbd82ff56ff78c9e97740d887d03413d |
| --- /dev/null |
| +++ b/third_party/WebKit/ManualTests/webaudio/osc-exponentialRamp.html |
| @@ -0,0 +1,47 @@ |
| +<!doctype html> |
| +<html> |
| + <head> |
| + <title>Osc with ExponentialRamp (crbug.com/522229)</title> |
| + </head> |
| + |
| + <body> |
| + <script> |
| + var context = new AudioContext(); |
| + var sawosc = 0; |
| + |
| + function updateOsc (event) |
|
hongchan
2015/09/30 22:14:18
Let's be consistent with the curly brace after the
Raymond Toy
2015/10/01 18:05:55
Done. Fixed inconsistent indentation too. :-)
|
| + { |
| + var freq = Math.random() * 440 + 440; |
| + console.log(context.currentTime); |
| + sawosc.frequency.exponentialRampToValueAtTime(freq, context.currentTime + 0.025); |
| + } |
| + |
| + function startTest() { |
| + sawosc = context.createOscillator(); |
| + sawosc.type = 'sawtooth'; |
| + sawosc.connect(context.destination); |
| + window.addEventListener('keydown', updateOsc); |
| + sawosc.start(); |
| + } |
| + |
| + function stopTest() { |
| + window.removeEventListener('keydown', updateOsc); |
| + sawosc.stop(); |
| + } |
| + </script> |
| + |
| + <p> |
| + Test from <a href="crbug.com/522229">crbug.com/522229</a>. This test cannot be validated |
| + using an offline context because it requires user interaction. |
| + </p> |
| + <p> |
| + Press the start button to start the test and the stop button to stop it |
| + </p> |
| + <p> |
| + Press any set of keys quickly and listen. At no point should audio ever be silent. There |
| + should be no glitches either. If either of these happens, this test has failed. |
| + </p> |
| + <button onclick="startTest()">Start</button> |
| + <button onclick="stopTest()">Stop</button> |
| + </body> |
| +</html> |