From 3f9bd50fa805a803b5c21c98000466639215ea21 Mon Sep 17 00:00:00 2001 From: Ehsan Akhgari Date: Thu, 2 May 2013 01:13:27 -0400 Subject: [PATCH] Bug 867876 - Add some tests for the AudioParam automation events; r=roc --- content/media/webaudio/test/Makefile.in | 2 + .../test/test_audioParamExponentialRamp.html | 63 +++++++++++++++++++ .../test/test_audioParamLinearRamp.html | 63 +++++++++++++++++++ content/media/webaudio/test/webaudio.js | 2 +- 4 files changed, 129 insertions(+), 1 deletion(-) create mode 100644 content/media/webaudio/test/test_audioParamExponentialRamp.html create mode 100644 content/media/webaudio/test/test_audioParamLinearRamp.html diff --git a/content/media/webaudio/test/Makefile.in b/content/media/webaudio/test/Makefile.in index 89da9bf5d60d..e05e25d7201c 100644 --- a/content/media/webaudio/test/Makefile.in +++ b/content/media/webaudio/test/Makefile.in @@ -26,6 +26,8 @@ MOCHITEST_FILES := \ test_AudioContext.html \ test_AudioListener.html \ test_AudioParam.html \ + test_audioParamExponentialRamp.html \ + test_audioParamLinearRamp.html \ test_audioBufferSourceNode.html \ test_audioBufferSourceNodeLazyLoopParam.html \ test_audioBufferSourceNodeLoop.html \ diff --git a/content/media/webaudio/test/test_audioParamExponentialRamp.html b/content/media/webaudio/test/test_audioParamExponentialRamp.html new file mode 100644 index 000000000000..1eb444f04711 --- /dev/null +++ b/content/media/webaudio/test/test_audioParamExponentialRamp.html @@ -0,0 +1,63 @@ + + + + Test AudioParam.exponentialRampToValue + + + + + +
+
+
+ + diff --git a/content/media/webaudio/test/test_audioParamLinearRamp.html b/content/media/webaudio/test/test_audioParamLinearRamp.html new file mode 100644 index 000000000000..034c825b4799 --- /dev/null +++ b/content/media/webaudio/test/test_audioParamLinearRamp.html @@ -0,0 +1,63 @@ + + + + Test AudioParam.linearRampToValue + + + + + +
+
+
+ + diff --git a/content/media/webaudio/test/webaudio.js b/content/media/webaudio/test/webaudio.js index 32bbc34f3157..28f6dfeda595 100644 --- a/content/media/webaudio/test/webaudio.js +++ b/content/media/webaudio/test/webaudio.js @@ -24,7 +24,7 @@ function expectTypeError(func) { } function fuzzyCompare(a, b) { - return Math.abs(a - b) < 5e-5; + return Math.abs(a - b) < 9e-3; } function compareBuffers(buf1, buf2,