From 5f8de423f190bbb79a62f804151bc24824fa32d8 Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Fri, 2 Feb 2018 04:16:08 -0500 Subject: Add m-esr52 at 52.6.0 --- dom/media/webaudio/test/audio-expected.wav | Bin 0 -> 190764 bytes dom/media/webaudio/test/audio-mono-expected-2.wav | Bin 0 -> 103788 bytes dom/media/webaudio/test/audio-mono-expected.wav | Bin 0 -> 103788 bytes dom/media/webaudio/test/audio-quad.wav | Bin 0 -> 5128 bytes dom/media/webaudio/test/audio.ogv | Bin 0 -> 16049 bytes .../test/audioBufferSourceNodeDetached_worker.js | 3 + dom/media/webaudio/test/audiovideo.mp4 | Bin 0 -> 139713 bytes dom/media/webaudio/test/blink/README | 9 + dom/media/webaudio/test/blink/audio-testing.js | 192 +++++++++ dom/media/webaudio/test/blink/biquad-filters.js | 368 ++++++++++++++++ dom/media/webaudio/test/blink/biquad-testing.js | 153 +++++++ .../webaudio/test/blink/convolution-testing.js | 182 ++++++++ dom/media/webaudio/test/blink/mochitest.ini | 23 + .../webaudio/test/blink/panner-model-testing.js | 210 +++++++++ .../test/blink/test_biquadFilterNodeAllPass.html | 32 ++ .../blink/test_biquadFilterNodeAutomation.html | 351 ++++++++++++++++ .../test/blink/test_biquadFilterNodeBandPass.html | 34 ++ .../test_biquadFilterNodeGetFrequencyResponse.html | 261 ++++++++++++ .../test/blink/test_biquadFilterNodeHighPass.html | 33 ++ .../test/blink/test_biquadFilterNodeHighShelf.html | 33 ++ .../test/blink/test_biquadFilterNodeLowPass.html | 34 ++ .../test/blink/test_biquadFilterNodeLowShelf.html | 34 ++ .../test/blink/test_biquadFilterNodeNotch.html | 33 ++ .../test/blink/test_biquadFilterNodePeaking.html | 34 ++ .../test/blink/test_biquadFilterNodeTail.html | 76 ++++ .../webaudio/test/blink/test_iirFilterNode.html | 467 +++++++++++++++++++++ .../test_iirFilterNodeGetFrequencyResponse.html | 97 +++++ dom/media/webaudio/test/browser.ini | 1 + dom/media/webaudio/test/browser_bug1181073.js | 40 ++ dom/media/webaudio/test/corsServer.sjs | 25 ++ dom/media/webaudio/test/invalid.txt | 1 + dom/media/webaudio/test/layouttest-glue.js | 19 + dom/media/webaudio/test/mochitest.ini | 212 ++++++++++ dom/media/webaudio/test/noaudio.webm | Bin 0 -> 105755 bytes dom/media/webaudio/test/sine-440-10s.opus | Bin 0 -> 94428 bytes dom/media/webaudio/test/small-shot-expected.wav | Bin 0 -> 53036 bytes .../webaudio/test/small-shot-mono-expected.wav | Bin 0 -> 26540 bytes dom/media/webaudio/test/small-shot.mp3 | Bin 0 -> 6825 bytes dom/media/webaudio/test/small-shot.ogg | Bin 0 -> 6416 bytes dom/media/webaudio/test/sweep-300-330-1sec.opus | Bin 0 -> 8889 bytes dom/media/webaudio/test/test_AudioBuffer.html | 105 +++++ dom/media/webaudio/test/test_AudioContext.html | 23 + .../webaudio/test/test_AudioContext_disabled.html | 56 +++ dom/media/webaudio/test/test_AudioListener.html | 35 ++ .../webaudio/test/test_AudioNodeDevtoolsAPI.html | 59 +++ .../webaudio/test/test_AudioParamDevtoolsAPI.html | 49 +++ .../webaudio/test/test_OfflineAudioContext.html | 102 +++++ .../test/test_ScriptProcessorCollected1.html | 84 ++++ .../test/test_WebAudioMemoryReporting.html | 54 +++ dom/media/webaudio/test/test_analyserNode.html | 103 +++++ .../webaudio/test/test_analyserNodeOutput.html | 43 ++ .../test/test_analyserNodePassThrough.html | 47 +++ .../webaudio/test/test_analyserNodeWithGain.html | 47 +++ dom/media/webaudio/test/test_analyserScale.html | 59 +++ .../webaudio/test/test_audioBufferSourceNode.html | 44 ++ .../test/test_audioBufferSourceNodeDetached.html | 58 +++ .../test/test_audioBufferSourceNodeEnded.html | 36 ++ .../test_audioBufferSourceNodeLazyLoopParam.html | 47 +++ .../test/test_audioBufferSourceNodeLoop.html | 45 ++ .../test_audioBufferSourceNodeLoopStartEnd.html | 52 +++ ...test_audioBufferSourceNodeLoopStartEndSame.html | 44 ++ .../test/test_audioBufferSourceNodeNoStart.html | 33 ++ .../test/test_audioBufferSourceNodeNullBuffer.html | 31 ++ .../test/test_audioBufferSourceNodeOffset.html | 55 +++ .../test_audioBufferSourceNodePassThrough.html | 45 ++ .../test/test_audioBufferSourceNodeRate.html | 66 +++ .../test/test_audioContextSuspendResumeClose.html | 410 ++++++++++++++++++ .../webaudio/test/test_audioDestinationNode.html | 26 ++ .../webaudio/test/test_audioParamChaining.html | 77 ++++ .../test/test_audioParamExponentialRamp.html | 54 +++ dom/media/webaudio/test/test_audioParamGain.html | 61 +++ .../webaudio/test/test_audioParamLinearRamp.html | 54 +++ .../test/test_audioParamSetCurveAtTime.html | 54 +++ .../test/test_audioParamSetCurveAtTimeTwice.html | 68 +++ .../test_audioParamSetCurveAtTimeZeroDuration.html | 57 +++ .../test/test_audioParamSetTargetAtTime.html | 55 +++ ..._audioParamSetTargetAtTimeZeroTimeConstant.html | 55 +++ .../test/test_audioParamSetValueAtTime.html | 52 +++ .../test_audioParamTimelineDestinationOffset.html | 45 ++ dom/media/webaudio/test/test_badConnect.html | 48 +++ dom/media/webaudio/test/test_biquadFilterNode.html | 86 ++++ .../test/test_biquadFilterNodePassThrough.html | 47 +++ .../test/test_biquadFilterNodeWithGain.html | 61 +++ dom/media/webaudio/test/test_bug1027864.html | 74 ++++ dom/media/webaudio/test/test_bug1056032.html | 35 ++ dom/media/webaudio/test/test_bug1113634.html | 54 +++ dom/media/webaudio/test/test_bug1118372.html | 46 ++ dom/media/webaudio/test/test_bug1255618.html | 41 ++ dom/media/webaudio/test/test_bug1267579.html | 46 ++ dom/media/webaudio/test/test_bug808374.html | 22 + dom/media/webaudio/test/test_bug827541.html | 22 + dom/media/webaudio/test/test_bug839753.html | 18 + dom/media/webaudio/test/test_bug845960.html | 18 + dom/media/webaudio/test/test_bug856771.html | 26 ++ dom/media/webaudio/test/test_bug866570.html | 18 + dom/media/webaudio/test/test_bug866737.html | 36 ++ dom/media/webaudio/test/test_bug867089.html | 43 ++ dom/media/webaudio/test/test_bug867104.html | 34 ++ dom/media/webaudio/test/test_bug867174.html | 38 ++ dom/media/webaudio/test/test_bug867203.html | 34 ++ dom/media/webaudio/test/test_bug875221.html | 239 +++++++++++ dom/media/webaudio/test/test_bug875402.html | 47 +++ dom/media/webaudio/test/test_bug894150.html | 21 + dom/media/webaudio/test/test_bug956489.html | 56 +++ dom/media/webaudio/test/test_bug964376.html | 64 +++ dom/media/webaudio/test/test_bug966247.html | 46 ++ dom/media/webaudio/test/test_bug972678.html | 62 +++ .../webaudio/test/test_channelMergerNode.html | 57 +++ .../test/test_channelMergerNodeWithVolume.html | 60 +++ .../webaudio/test/test_channelSplitterNode.html | 71 ++++ .../test/test_channelSplitterNodeWithVolume.html | 76 ++++ dom/media/webaudio/test/test_convolverNode.html | 32 ++ .../test/test_convolverNodeChannelCount.html | 61 +++ .../webaudio/test/test_convolverNodeDelay.html | 72 ++++ .../test/test_convolverNodeFiniteInfluence.html | 44 ++ .../test/test_convolverNodePassThrough.html | 48 +++ .../webaudio/test/test_convolverNodeWithGain.html | 62 +++ .../test/test_convolverNode_mono_mono.html | 73 ++++ dom/media/webaudio/test/test_currentTime.html | 26 ++ .../webaudio/test/test_decodeAudioDataPromise.html | 62 +++ .../webaudio/test/test_decodeMultichannel.html | 58 +++ dom/media/webaudio/test/test_decodeOpusTail.html | 28 ++ dom/media/webaudio/test/test_delayNode.html | 74 ++++ dom/media/webaudio/test/test_delayNodeAtMax.html | 53 +++ .../test/test_delayNodeChannelChanges.html | 98 +++++ dom/media/webaudio/test/test_delayNodeCycles.html | 157 +++++++ .../webaudio/test/test_delayNodePassThrough.html | 53 +++ .../webaudio/test/test_delayNodeSmallMaxDelay.html | 43 ++ .../webaudio/test/test_delayNodeTailIncrease.html | 71 ++++ .../test/test_delayNodeTailWithDisconnect.html | 95 +++++ .../webaudio/test/test_delayNodeTailWithGain.html | 72 ++++ .../test/test_delayNodeTailWithReconnect.html | 136 ++++++ .../webaudio/test/test_delayNodeWithGain.html | 54 +++ dom/media/webaudio/test/test_disconnectAll.html | 51 +++ .../webaudio/test/test_disconnectAudioParam.html | 58 +++ .../test/test_disconnectAudioParamFromOutput.html | 67 +++ .../webaudio/test/test_disconnectExceptions.html | 75 ++++ .../test/test_disconnectFromAudioNode.html | 55 +++ .../test_disconnectFromAudioNodeAndOutput.html | 59 +++ ...t_disconnectFromAudioNodeAndOutputAndInput.html | 57 +++ ..._disconnectFromAudioNodeMultipleConnection.html | 56 +++ .../webaudio/test/test_disconnectFromOutput.html | 54 +++ .../webaudio/test/test_dynamicsCompressorNode.html | 70 +++ .../test_dynamicsCompressorNodePassThrough.html | 47 +++ .../test/test_dynamicsCompressorNodeWithGain.html | 51 +++ dom/media/webaudio/test/test_gainNode.html | 57 +++ dom/media/webaudio/test/test_gainNodeInLoop.html | 48 +++ .../webaudio/test/test_gainNodePassThrough.html | 49 +++ .../test/test_iirFilterNodePassThrough.html | 47 +++ dom/media/webaudio/test/test_maxChannelCount.html | 38 ++ dom/media/webaudio/test/test_mediaDecoding.html | 367 ++++++++++++++++ .../test/test_mediaElementAudioSourceNode.html | 74 ++++ ...est_mediaElementAudioSourceNodeCrossOrigin.html | 94 +++++ .../test_mediaElementAudioSourceNodeFidelity.html | 128 ++++++ ...est_mediaElementAudioSourceNodePassThrough.html | 66 +++ .../test_mediaElementAudioSourceNodeVideo.html | 70 +++ .../test/test_mediaStreamAudioDestinationNode.html | 50 +++ .../test/test_mediaStreamAudioSourceNode.html | 50 +++ ...test_mediaStreamAudioSourceNodeCrossOrigin.html | 57 +++ .../test/test_mediaStreamAudioSourceNodeNoGC.html | 89 ++++ ...test_mediaStreamAudioSourceNodePassThrough.html | 55 +++ .../test_mediaStreamAudioSourceNodeResampling.html | 74 ++++ dom/media/webaudio/test/test_mixingRules.html | 401 ++++++++++++++++++ dom/media/webaudio/test/test_mozaudiochannel.html | 151 +++++++ .../webaudio/test/test_nodeToParamConnection.html | 60 +++ .../test_offlineDestinationChannelCountLess.html | 42 ++ .../test_offlineDestinationChannelCountMore.html | 46 ++ dom/media/webaudio/test/test_oscillatorNode.html | 60 +++ dom/media/webaudio/test/test_oscillatorNode2.html | 53 +++ .../test/test_oscillatorNodeNegativeFrequency.html | 50 +++ .../test/test_oscillatorNodePassThrough.html | 43 ++ .../webaudio/test/test_oscillatorNodeStart.html | 38 ++ .../webaudio/test/test_oscillatorTypeChange.html | 58 +++ dom/media/webaudio/test/test_pannerNode.html | 73 ++++ dom/media/webaudio/test/test_pannerNodeAbove.html | 50 +++ .../test/test_pannerNodeAtZeroDistance.html | 86 ++++ .../webaudio/test/test_pannerNodeChannelCount.html | 52 +++ .../webaudio/test/test_pannerNodeHRTFSymmetry.html | 106 +++++ .../webaudio/test/test_pannerNodePassThrough.html | 53 +++ dom/media/webaudio/test/test_pannerNodeTail.html | 232 ++++++++++ .../webaudio/test/test_pannerNode_equalPower.html | 26 ++ .../webaudio/test/test_pannerNode_maxDistance.html | 64 +++ dom/media/webaudio/test/test_periodicWave.html | 94 +++++ .../test/test_periodicWaveBandLimiting.html | 86 ++++ .../test_periodicWaveDisableNormalization.html | 100 +++++ .../webaudio/test/test_scriptProcessorNode.html | 132 ++++++ .../test/test_scriptProcessorNodeChannelCount.html | 80 ++++ .../test/test_scriptProcessorNodeNotConnected.html | 34 ++ .../test/test_scriptProcessorNodePassThrough.html | 103 +++++ .../test_scriptProcessorNodeZeroInputOutput.html | 39 ++ .../test_scriptProcessorNode_playbackTime1.html | 52 +++ .../test_sequentialBufferSourceWithResampling.html | 72 ++++ dom/media/webaudio/test/test_singleSourceDest.html | 70 +++ dom/media/webaudio/test/test_stereoPannerNode.html | 263 ++++++++++++ .../test/test_stereoPannerNodePassThrough.html | 47 +++ .../webaudio/test/test_stereoPanningWithGain.html | 49 +++ dom/media/webaudio/test/test_waveDecoder.html | 69 +++ dom/media/webaudio/test/test_waveShaper.html | 60 +++ dom/media/webaudio/test/test_waveShaperGain.html | 73 ++++ .../test/test_waveShaperInvalidLengthCurve.html | 66 +++ .../webaudio/test/test_waveShaperNoCurve.html | 43 ++ .../webaudio/test/test_waveShaperPassThrough.html | 55 +++ dom/media/webaudio/test/ting-44.1k-1ch.ogg | Bin 0 -> 8566 bytes dom/media/webaudio/test/ting-44.1k-1ch.wav | Bin 0 -> 61228 bytes dom/media/webaudio/test/ting-44.1k-2ch.ogg | Bin 0 -> 10422 bytes dom/media/webaudio/test/ting-44.1k-2ch.wav | Bin 0 -> 122412 bytes dom/media/webaudio/test/ting-48k-1ch.ogg | Bin 0 -> 8680 bytes dom/media/webaudio/test/ting-48k-1ch.wav | Bin 0 -> 66638 bytes dom/media/webaudio/test/ting-48k-2ch.ogg | Bin 0 -> 10701 bytes dom/media/webaudio/test/ting-48k-2ch.wav | Bin 0 -> 133232 bytes dom/media/webaudio/test/ting-dualchannel44.1.wav | Bin 0 -> 122412 bytes dom/media/webaudio/test/ting-dualchannel48.wav | Bin 0 -> 122412 bytes dom/media/webaudio/test/webaudio.js | 269 ++++++++++++ 213 files changed, 14278 insertions(+) create mode 100644 dom/media/webaudio/test/audio-expected.wav create mode 100644 dom/media/webaudio/test/audio-mono-expected-2.wav create mode 100644 dom/media/webaudio/test/audio-mono-expected.wav create mode 100644 dom/media/webaudio/test/audio-quad.wav create mode 100644 dom/media/webaudio/test/audio.ogv create mode 100644 dom/media/webaudio/test/audioBufferSourceNodeDetached_worker.js create mode 100644 dom/media/webaudio/test/audiovideo.mp4 create mode 100644 dom/media/webaudio/test/blink/README create mode 100644 dom/media/webaudio/test/blink/audio-testing.js create mode 100644 dom/media/webaudio/test/blink/biquad-filters.js create mode 100644 dom/media/webaudio/test/blink/biquad-testing.js create mode 100644 dom/media/webaudio/test/blink/convolution-testing.js create mode 100644 dom/media/webaudio/test/blink/mochitest.ini create mode 100644 dom/media/webaudio/test/blink/panner-model-testing.js create mode 100644 dom/media/webaudio/test/blink/test_biquadFilterNodeAllPass.html create mode 100644 dom/media/webaudio/test/blink/test_biquadFilterNodeAutomation.html create mode 100644 dom/media/webaudio/test/blink/test_biquadFilterNodeBandPass.html create mode 100644 dom/media/webaudio/test/blink/test_biquadFilterNodeGetFrequencyResponse.html create mode 100644 dom/media/webaudio/test/blink/test_biquadFilterNodeHighPass.html create mode 100644 dom/media/webaudio/test/blink/test_biquadFilterNodeHighShelf.html create mode 100644 dom/media/webaudio/test/blink/test_biquadFilterNodeLowPass.html create mode 100644 dom/media/webaudio/test/blink/test_biquadFilterNodeLowShelf.html create mode 100644 dom/media/webaudio/test/blink/test_biquadFilterNodeNotch.html create mode 100644 dom/media/webaudio/test/blink/test_biquadFilterNodePeaking.html create mode 100644 dom/media/webaudio/test/blink/test_biquadFilterNodeTail.html create mode 100644 dom/media/webaudio/test/blink/test_iirFilterNode.html create mode 100644 dom/media/webaudio/test/blink/test_iirFilterNodeGetFrequencyResponse.html create mode 100644 dom/media/webaudio/test/browser.ini create mode 100644 dom/media/webaudio/test/browser_bug1181073.js create mode 100644 dom/media/webaudio/test/corsServer.sjs create mode 100644 dom/media/webaudio/test/invalid.txt create mode 100644 dom/media/webaudio/test/layouttest-glue.js create mode 100644 dom/media/webaudio/test/mochitest.ini create mode 100644 dom/media/webaudio/test/noaudio.webm create mode 100644 dom/media/webaudio/test/sine-440-10s.opus create mode 100644 dom/media/webaudio/test/small-shot-expected.wav create mode 100644 dom/media/webaudio/test/small-shot-mono-expected.wav create mode 100644 dom/media/webaudio/test/small-shot.mp3 create mode 100644 dom/media/webaudio/test/small-shot.ogg create mode 100644 dom/media/webaudio/test/sweep-300-330-1sec.opus create mode 100644 dom/media/webaudio/test/test_AudioBuffer.html create mode 100644 dom/media/webaudio/test/test_AudioContext.html create mode 100644 dom/media/webaudio/test/test_AudioContext_disabled.html create mode 100644 dom/media/webaudio/test/test_AudioListener.html create mode 100644 dom/media/webaudio/test/test_AudioNodeDevtoolsAPI.html create mode 100644 dom/media/webaudio/test/test_AudioParamDevtoolsAPI.html create mode 100644 dom/media/webaudio/test/test_OfflineAudioContext.html create mode 100644 dom/media/webaudio/test/test_ScriptProcessorCollected1.html create mode 100644 dom/media/webaudio/test/test_WebAudioMemoryReporting.html create mode 100644 dom/media/webaudio/test/test_analyserNode.html create mode 100644 dom/media/webaudio/test/test_analyserNodeOutput.html create mode 100644 dom/media/webaudio/test/test_analyserNodePassThrough.html create mode 100644 dom/media/webaudio/test/test_analyserNodeWithGain.html create mode 100644 dom/media/webaudio/test/test_analyserScale.html create mode 100644 dom/media/webaudio/test/test_audioBufferSourceNode.html create mode 100644 dom/media/webaudio/test/test_audioBufferSourceNodeDetached.html create mode 100644 dom/media/webaudio/test/test_audioBufferSourceNodeEnded.html create mode 100644 dom/media/webaudio/test/test_audioBufferSourceNodeLazyLoopParam.html create mode 100644 dom/media/webaudio/test/test_audioBufferSourceNodeLoop.html create mode 100644 dom/media/webaudio/test/test_audioBufferSourceNodeLoopStartEnd.html create mode 100644 dom/media/webaudio/test/test_audioBufferSourceNodeLoopStartEndSame.html create mode 100644 dom/media/webaudio/test/test_audioBufferSourceNodeNoStart.html create mode 100644 dom/media/webaudio/test/test_audioBufferSourceNodeNullBuffer.html create mode 100644 dom/media/webaudio/test/test_audioBufferSourceNodeOffset.html create mode 100644 dom/media/webaudio/test/test_audioBufferSourceNodePassThrough.html create mode 100644 dom/media/webaudio/test/test_audioBufferSourceNodeRate.html create mode 100644 dom/media/webaudio/test/test_audioContextSuspendResumeClose.html create mode 100644 dom/media/webaudio/test/test_audioDestinationNode.html create mode 100644 dom/media/webaudio/test/test_audioParamChaining.html create mode 100644 dom/media/webaudio/test/test_audioParamExponentialRamp.html create mode 100644 dom/media/webaudio/test/test_audioParamGain.html create mode 100644 dom/media/webaudio/test/test_audioParamLinearRamp.html create mode 100644 dom/media/webaudio/test/test_audioParamSetCurveAtTime.html create mode 100644 dom/media/webaudio/test/test_audioParamSetCurveAtTimeTwice.html create mode 100644 dom/media/webaudio/test/test_audioParamSetCurveAtTimeZeroDuration.html create mode 100644 dom/media/webaudio/test/test_audioParamSetTargetAtTime.html create mode 100644 dom/media/webaudio/test/test_audioParamSetTargetAtTimeZeroTimeConstant.html create mode 100644 dom/media/webaudio/test/test_audioParamSetValueAtTime.html create mode 100644 dom/media/webaudio/test/test_audioParamTimelineDestinationOffset.html create mode 100644 dom/media/webaudio/test/test_badConnect.html create mode 100644 dom/media/webaudio/test/test_biquadFilterNode.html create mode 100644 dom/media/webaudio/test/test_biquadFilterNodePassThrough.html create mode 100644 dom/media/webaudio/test/test_biquadFilterNodeWithGain.html create mode 100644 dom/media/webaudio/test/test_bug1027864.html create mode 100644 dom/media/webaudio/test/test_bug1056032.html create mode 100644 dom/media/webaudio/test/test_bug1113634.html create mode 100644 dom/media/webaudio/test/test_bug1118372.html create mode 100644 dom/media/webaudio/test/test_bug1255618.html create mode 100644 dom/media/webaudio/test/test_bug1267579.html create mode 100644 dom/media/webaudio/test/test_bug808374.html create mode 100644 dom/media/webaudio/test/test_bug827541.html create mode 100644 dom/media/webaudio/test/test_bug839753.html create mode 100644 dom/media/webaudio/test/test_bug845960.html create mode 100644 dom/media/webaudio/test/test_bug856771.html create mode 100644 dom/media/webaudio/test/test_bug866570.html create mode 100644 dom/media/webaudio/test/test_bug866737.html create mode 100644 dom/media/webaudio/test/test_bug867089.html create mode 100644 dom/media/webaudio/test/test_bug867104.html create mode 100644 dom/media/webaudio/test/test_bug867174.html create mode 100644 dom/media/webaudio/test/test_bug867203.html create mode 100644 dom/media/webaudio/test/test_bug875221.html create mode 100644 dom/media/webaudio/test/test_bug875402.html create mode 100644 dom/media/webaudio/test/test_bug894150.html create mode 100644 dom/media/webaudio/test/test_bug956489.html create mode 100644 dom/media/webaudio/test/test_bug964376.html create mode 100644 dom/media/webaudio/test/test_bug966247.html create mode 100644 dom/media/webaudio/test/test_bug972678.html create mode 100644 dom/media/webaudio/test/test_channelMergerNode.html create mode 100644 dom/media/webaudio/test/test_channelMergerNodeWithVolume.html create mode 100644 dom/media/webaudio/test/test_channelSplitterNode.html create mode 100644 dom/media/webaudio/test/test_channelSplitterNodeWithVolume.html create mode 100644 dom/media/webaudio/test/test_convolverNode.html create mode 100644 dom/media/webaudio/test/test_convolverNodeChannelCount.html create mode 100644 dom/media/webaudio/test/test_convolverNodeDelay.html create mode 100644 dom/media/webaudio/test/test_convolverNodeFiniteInfluence.html create mode 100644 dom/media/webaudio/test/test_convolverNodePassThrough.html create mode 100644 dom/media/webaudio/test/test_convolverNodeWithGain.html create mode 100644 dom/media/webaudio/test/test_convolverNode_mono_mono.html create mode 100644 dom/media/webaudio/test/test_currentTime.html create mode 100644 dom/media/webaudio/test/test_decodeAudioDataPromise.html create mode 100644 dom/media/webaudio/test/test_decodeMultichannel.html create mode 100644 dom/media/webaudio/test/test_decodeOpusTail.html create mode 100644 dom/media/webaudio/test/test_delayNode.html create mode 100644 dom/media/webaudio/test/test_delayNodeAtMax.html create mode 100644 dom/media/webaudio/test/test_delayNodeChannelChanges.html create mode 100644 dom/media/webaudio/test/test_delayNodeCycles.html create mode 100644 dom/media/webaudio/test/test_delayNodePassThrough.html create mode 100644 dom/media/webaudio/test/test_delayNodeSmallMaxDelay.html create mode 100644 dom/media/webaudio/test/test_delayNodeTailIncrease.html create mode 100644 dom/media/webaudio/test/test_delayNodeTailWithDisconnect.html create mode 100644 dom/media/webaudio/test/test_delayNodeTailWithGain.html create mode 100644 dom/media/webaudio/test/test_delayNodeTailWithReconnect.html create mode 100644 dom/media/webaudio/test/test_delayNodeWithGain.html create mode 100644 dom/media/webaudio/test/test_disconnectAll.html create mode 100644 dom/media/webaudio/test/test_disconnectAudioParam.html create mode 100644 dom/media/webaudio/test/test_disconnectAudioParamFromOutput.html create mode 100644 dom/media/webaudio/test/test_disconnectExceptions.html create mode 100644 dom/media/webaudio/test/test_disconnectFromAudioNode.html create mode 100644 dom/media/webaudio/test/test_disconnectFromAudioNodeAndOutput.html create mode 100644 dom/media/webaudio/test/test_disconnectFromAudioNodeAndOutputAndInput.html create mode 100644 dom/media/webaudio/test/test_disconnectFromAudioNodeMultipleConnection.html create mode 100644 dom/media/webaudio/test/test_disconnectFromOutput.html create mode 100644 dom/media/webaudio/test/test_dynamicsCompressorNode.html create mode 100644 dom/media/webaudio/test/test_dynamicsCompressorNodePassThrough.html create mode 100644 dom/media/webaudio/test/test_dynamicsCompressorNodeWithGain.html create mode 100644 dom/media/webaudio/test/test_gainNode.html create mode 100644 dom/media/webaudio/test/test_gainNodeInLoop.html create mode 100644 dom/media/webaudio/test/test_gainNodePassThrough.html create mode 100644 dom/media/webaudio/test/test_iirFilterNodePassThrough.html create mode 100644 dom/media/webaudio/test/test_maxChannelCount.html create mode 100644 dom/media/webaudio/test/test_mediaDecoding.html create mode 100644 dom/media/webaudio/test/test_mediaElementAudioSourceNode.html create mode 100644 dom/media/webaudio/test/test_mediaElementAudioSourceNodeCrossOrigin.html create mode 100644 dom/media/webaudio/test/test_mediaElementAudioSourceNodeFidelity.html create mode 100644 dom/media/webaudio/test/test_mediaElementAudioSourceNodePassThrough.html create mode 100644 dom/media/webaudio/test/test_mediaElementAudioSourceNodeVideo.html create mode 100644 dom/media/webaudio/test/test_mediaStreamAudioDestinationNode.html create mode 100644 dom/media/webaudio/test/test_mediaStreamAudioSourceNode.html create mode 100644 dom/media/webaudio/test/test_mediaStreamAudioSourceNodeCrossOrigin.html create mode 100644 dom/media/webaudio/test/test_mediaStreamAudioSourceNodeNoGC.html create mode 100644 dom/media/webaudio/test/test_mediaStreamAudioSourceNodePassThrough.html create mode 100644 dom/media/webaudio/test/test_mediaStreamAudioSourceNodeResampling.html create mode 100644 dom/media/webaudio/test/test_mixingRules.html create mode 100644 dom/media/webaudio/test/test_mozaudiochannel.html create mode 100644 dom/media/webaudio/test/test_nodeToParamConnection.html create mode 100644 dom/media/webaudio/test/test_offlineDestinationChannelCountLess.html create mode 100644 dom/media/webaudio/test/test_offlineDestinationChannelCountMore.html create mode 100644 dom/media/webaudio/test/test_oscillatorNode.html create mode 100644 dom/media/webaudio/test/test_oscillatorNode2.html create mode 100644 dom/media/webaudio/test/test_oscillatorNodeNegativeFrequency.html create mode 100644 dom/media/webaudio/test/test_oscillatorNodePassThrough.html create mode 100644 dom/media/webaudio/test/test_oscillatorNodeStart.html create mode 100644 dom/media/webaudio/test/test_oscillatorTypeChange.html create mode 100644 dom/media/webaudio/test/test_pannerNode.html create mode 100644 dom/media/webaudio/test/test_pannerNodeAbove.html create mode 100644 dom/media/webaudio/test/test_pannerNodeAtZeroDistance.html create mode 100644 dom/media/webaudio/test/test_pannerNodeChannelCount.html create mode 100644 dom/media/webaudio/test/test_pannerNodeHRTFSymmetry.html create mode 100644 dom/media/webaudio/test/test_pannerNodePassThrough.html create mode 100644 dom/media/webaudio/test/test_pannerNodeTail.html create mode 100644 dom/media/webaudio/test/test_pannerNode_equalPower.html create mode 100644 dom/media/webaudio/test/test_pannerNode_maxDistance.html create mode 100644 dom/media/webaudio/test/test_periodicWave.html create mode 100644 dom/media/webaudio/test/test_periodicWaveBandLimiting.html create mode 100644 dom/media/webaudio/test/test_periodicWaveDisableNormalization.html create mode 100644 dom/media/webaudio/test/test_scriptProcessorNode.html create mode 100644 dom/media/webaudio/test/test_scriptProcessorNodeChannelCount.html create mode 100644 dom/media/webaudio/test/test_scriptProcessorNodeNotConnected.html create mode 100644 dom/media/webaudio/test/test_scriptProcessorNodePassThrough.html create mode 100644 dom/media/webaudio/test/test_scriptProcessorNodeZeroInputOutput.html create mode 100644 dom/media/webaudio/test/test_scriptProcessorNode_playbackTime1.html create mode 100644 dom/media/webaudio/test/test_sequentialBufferSourceWithResampling.html create mode 100644 dom/media/webaudio/test/test_singleSourceDest.html create mode 100644 dom/media/webaudio/test/test_stereoPannerNode.html create mode 100644 dom/media/webaudio/test/test_stereoPannerNodePassThrough.html create mode 100644 dom/media/webaudio/test/test_stereoPanningWithGain.html create mode 100644 dom/media/webaudio/test/test_waveDecoder.html create mode 100644 dom/media/webaudio/test/test_waveShaper.html create mode 100644 dom/media/webaudio/test/test_waveShaperGain.html create mode 100644 dom/media/webaudio/test/test_waveShaperInvalidLengthCurve.html create mode 100644 dom/media/webaudio/test/test_waveShaperNoCurve.html create mode 100644 dom/media/webaudio/test/test_waveShaperPassThrough.html create mode 100644 dom/media/webaudio/test/ting-44.1k-1ch.ogg create mode 100644 dom/media/webaudio/test/ting-44.1k-1ch.wav create mode 100644 dom/media/webaudio/test/ting-44.1k-2ch.ogg create mode 100644 dom/media/webaudio/test/ting-44.1k-2ch.wav create mode 100644 dom/media/webaudio/test/ting-48k-1ch.ogg create mode 100644 dom/media/webaudio/test/ting-48k-1ch.wav create mode 100644 dom/media/webaudio/test/ting-48k-2ch.ogg create mode 100644 dom/media/webaudio/test/ting-48k-2ch.wav create mode 100644 dom/media/webaudio/test/ting-dualchannel44.1.wav create mode 100644 dom/media/webaudio/test/ting-dualchannel48.wav create mode 100644 dom/media/webaudio/test/webaudio.js (limited to 'dom/media/webaudio/test') diff --git a/dom/media/webaudio/test/audio-expected.wav b/dom/media/webaudio/test/audio-expected.wav new file mode 100644 index 000000000..151927077 Binary files /dev/null and b/dom/media/webaudio/test/audio-expected.wav differ diff --git a/dom/media/webaudio/test/audio-mono-expected-2.wav b/dom/media/webaudio/test/audio-mono-expected-2.wav new file mode 100644 index 000000000..68c90dfa1 Binary files /dev/null and b/dom/media/webaudio/test/audio-mono-expected-2.wav differ diff --git a/dom/media/webaudio/test/audio-mono-expected.wav b/dom/media/webaudio/test/audio-mono-expected.wav new file mode 100644 index 000000000..bf00e5cdf Binary files /dev/null and b/dom/media/webaudio/test/audio-mono-expected.wav differ diff --git a/dom/media/webaudio/test/audio-quad.wav b/dom/media/webaudio/test/audio-quad.wav new file mode 100644 index 000000000..093f0197a Binary files /dev/null and b/dom/media/webaudio/test/audio-quad.wav differ diff --git a/dom/media/webaudio/test/audio.ogv b/dom/media/webaudio/test/audio.ogv new file mode 100644 index 000000000..68dee3cf2 Binary files /dev/null and b/dom/media/webaudio/test/audio.ogv differ diff --git a/dom/media/webaudio/test/audioBufferSourceNodeDetached_worker.js b/dom/media/webaudio/test/audioBufferSourceNodeDetached_worker.js new file mode 100644 index 000000000..2a5a4bff8 --- /dev/null +++ b/dom/media/webaudio/test/audioBufferSourceNodeDetached_worker.js @@ -0,0 +1,3 @@ +onmessage = function (event) { + postMessage("Pong"); +}; diff --git a/dom/media/webaudio/test/audiovideo.mp4 b/dom/media/webaudio/test/audiovideo.mp4 new file mode 100644 index 000000000..fe93122d2 Binary files /dev/null and b/dom/media/webaudio/test/audiovideo.mp4 differ diff --git a/dom/media/webaudio/test/blink/README b/dom/media/webaudio/test/blink/README new file mode 100644 index 000000000..1d819221f --- /dev/null +++ b/dom/media/webaudio/test/blink/README @@ -0,0 +1,9 @@ +This directory contains tests originally borrowed from the Blink Web Audio test +suite. + +The process of borrowing tests from Blink is as follows: + +* Import the pristine file from the Blink repo, noting the revision in the + commit message. +* Modify the test files to turn the LayoutTest into a mochitest-plain and add +* them to the test suite in a separate commit. diff --git a/dom/media/webaudio/test/blink/audio-testing.js b/dom/media/webaudio/test/blink/audio-testing.js new file mode 100644 index 000000000..c66d32c7f --- /dev/null +++ b/dom/media/webaudio/test/blink/audio-testing.js @@ -0,0 +1,192 @@ +if (window.testRunner) + testRunner.overridePreference("WebKitWebAudioEnabled", "1"); + +function writeString(s, a, offset) { + for (var i = 0; i < s.length; ++i) { + a[offset + i] = s.charCodeAt(i); + } +} + +function writeInt16(n, a, offset) { + n = Math.floor(n); + + var b1 = n & 255; + var b2 = (n >> 8) & 255; + + a[offset + 0] = b1; + a[offset + 1] = b2; +} + +function writeInt32(n, a, offset) { + n = Math.floor(n); + var b1 = n & 255; + var b2 = (n >> 8) & 255; + var b3 = (n >> 16) & 255; + var b4 = (n >> 24) & 255; + + a[offset + 0] = b1; + a[offset + 1] = b2; + a[offset + 2] = b3; + a[offset + 3] = b4; +} + +function writeAudioBuffer(audioBuffer, a, offset) { + var n = audioBuffer.length; + var channels = audioBuffer.numberOfChannels; + + for (var i = 0; i < n; ++i) { + for (var k = 0; k < channels; ++k) { + var buffer = audioBuffer.getChannelData(k); + var sample = buffer[i] * 32768.0; + + // Clip samples to the limitations of 16-bit. + // If we don't do this then we'll get nasty wrap-around distortion. + if (sample < -32768) + sample = -32768; + if (sample > 32767) + sample = 32767; + + writeInt16(sample, a, offset); + offset += 2; + } + } +} + +function createWaveFileData(audioBuffer) { + var frameLength = audioBuffer.length; + var numberOfChannels = audioBuffer.numberOfChannels; + var sampleRate = audioBuffer.sampleRate; + var bitsPerSample = 16; + var byteRate = sampleRate * numberOfChannels * bitsPerSample/8; + var blockAlign = numberOfChannels * bitsPerSample/8; + var wavDataByteLength = frameLength * numberOfChannels * 2; // 16-bit audio + var headerByteLength = 44; + var totalLength = headerByteLength + wavDataByteLength; + + var waveFileData = new Uint8Array(totalLength); + + var subChunk1Size = 16; // for linear PCM + var subChunk2Size = wavDataByteLength; + var chunkSize = 4 + (8 + subChunk1Size) + (8 + subChunk2Size); + + writeString("RIFF", waveFileData, 0); + writeInt32(chunkSize, waveFileData, 4); + writeString("WAVE", waveFileData, 8); + writeString("fmt ", waveFileData, 12); + + writeInt32(subChunk1Size, waveFileData, 16); // SubChunk1Size (4) + writeInt16(1, waveFileData, 20); // AudioFormat (2) + writeInt16(numberOfChannels, waveFileData, 22); // NumChannels (2) + writeInt32(sampleRate, waveFileData, 24); // SampleRate (4) + writeInt32(byteRate, waveFileData, 28); // ByteRate (4) + writeInt16(blockAlign, waveFileData, 32); // BlockAlign (2) + writeInt32(bitsPerSample, waveFileData, 34); // BitsPerSample (4) + + writeString("data", waveFileData, 36); + writeInt32(subChunk2Size, waveFileData, 40); // SubChunk2Size (4) + + // Write actual audio data starting at offset 44. + writeAudioBuffer(audioBuffer, waveFileData, 44); + + return waveFileData; +} + +function createAudioData(audioBuffer) { + return createWaveFileData(audioBuffer); +} + +function finishAudioTest(event) { + var audioData = createAudioData(event.renderedBuffer); + testRunner.setAudioData(audioData); + testRunner.notifyDone(); +} + +// Create an impulse in a buffer of length sampleFrameLength +function createImpulseBuffer(context, sampleFrameLength) { + var audioBuffer = context.createBuffer(1, sampleFrameLength, context.sampleRate); + var n = audioBuffer.length; + var dataL = audioBuffer.getChannelData(0); + + for (var k = 0; k < n; ++k) { + dataL[k] = 0; + } + dataL[0] = 1; + + return audioBuffer; +} + +// Create a buffer of the given length with a linear ramp having values 0 <= x < 1. +function createLinearRampBuffer(context, sampleFrameLength) { + var audioBuffer = context.createBuffer(1, sampleFrameLength, context.sampleRate); + var n = audioBuffer.length; + var dataL = audioBuffer.getChannelData(0); + + for (var i = 0; i < n; ++i) + dataL[i] = i / n; + + return audioBuffer; +} + +// Create a buffer of the given length having a constant value. +function createConstantBuffer(context, sampleFrameLength, constantValue) { + var audioBuffer = context.createBuffer(1, sampleFrameLength, context.sampleRate); + var n = audioBuffer.length; + var dataL = audioBuffer.getChannelData(0); + + for (var i = 0; i < n; ++i) + dataL[i] = constantValue; + + return audioBuffer; +} + +// Create a stereo impulse in a buffer of length sampleFrameLength +function createStereoImpulseBuffer(context, sampleFrameLength) { + var audioBuffer = context.createBuffer(2, sampleFrameLength, context.sampleRate); + var n = audioBuffer.length; + var dataL = audioBuffer.getChannelData(0); + var dataR = audioBuffer.getChannelData(1); + + for (var k = 0; k < n; ++k) { + dataL[k] = 0; + dataR[k] = 0; + } + dataL[0] = 1; + dataR[0] = 1; + + return audioBuffer; +} + +// Convert time (in seconds) to sample frames. +function timeToSampleFrame(time, sampleRate) { + return Math.floor(0.5 + time * sampleRate); +} + +// Compute the number of sample frames consumed by start with +// the specified |grainOffset|, |duration|, and |sampleRate|. +function grainLengthInSampleFrames(grainOffset, duration, sampleRate) { + var startFrame = timeToSampleFrame(grainOffset, sampleRate); + var endFrame = timeToSampleFrame(grainOffset + duration, sampleRate); + + return endFrame - startFrame; +} + +// True if the number is not an infinity or NaN +function isValidNumber(x) { + return !isNaN(x) && (x != Infinity) && (x != -Infinity); +} + +function shouldThrowTypeError(func, text) { + var ok = false; + try { + func(); + } catch (e) { + if (e instanceof TypeError) { + ok = true; + } + } + if (ok) { + testPassed(text + " threw TypeError."); + } else { + testFailed(text + " should throw TypeError."); + } +} diff --git a/dom/media/webaudio/test/blink/biquad-filters.js b/dom/media/webaudio/test/blink/biquad-filters.js new file mode 100644 index 000000000..06fff98b1 --- /dev/null +++ b/dom/media/webaudio/test/blink/biquad-filters.js @@ -0,0 +1,368 @@ +// Taken from WebKit/LayoutTests/webaudio/resources/biquad-filters.js + +// A biquad filter has a z-transform of +// H(z) = (b0 + b1 / z + b2 / z^2) / (1 + a1 / z + a2 / z^2) +// +// The formulas for the various filters were taken from +// http://www.musicdsp.org/files/Audio-EQ-Cookbook.txt. + + +// Lowpass filter. +function createLowpassFilter(freq, q, gain) { + var b0; + var b1; + var b2; + var a0; + var a1; + var a2; + + if (freq == 1) { + // The formula below works, except for roundoff. When freq = 1, + // the filter is just a wire, so hardwire the coefficients. + b0 = 1; + b1 = 0; + b2 = 0; + a0 = 1; + a1 = 0; + a2 = 0; + } else { + var w0 = Math.PI * freq; + var alpha = 0.5 * Math.sin(w0) / Math.pow(10, q / 20); + var cos_w0 = Math.cos(w0); + + b0 = 0.5 * (1 - cos_w0); + b1 = 1 - cos_w0; + b2 = b0; + a0 = 1 + alpha; + a1 = -2.0 * cos_w0; + a2 = 1 - alpha; + } + + return normalizeFilterCoefficients(b0, b1, b2, a0, a1, a2); +} + +function createHighpassFilter(freq, q, gain) { + var b0; + var b1; + var b2; + var a1; + var a2; + + if (freq == 1) { + // The filter is 0 + b0 = 0; + b1 = 0; + b2 = 0; + a0 = 1; + a1 = 0; + a2 = 0; + } else if (freq == 0) { + // The filter is 1. Computation of coefficients below is ok, but + // there's a pole at 1 and a zero at 1, so round-off could make + // the filter unstable. + b0 = 1; + b1 = 0; + b2 = 0; + a0 = 1; + a1 = 0; + a2 = 0; + } else { + var w0 = Math.PI * freq; + var alpha = 0.5 * Math.sin(w0) / Math.pow(10, q / 20); + var cos_w0 = Math.cos(w0); + + b0 = 0.5 * (1 + cos_w0); + b1 = -1 - cos_w0; + b2 = b0; + a0 = 1 + alpha; + a1 = -2.0 * cos_w0; + a2 = 1 - alpha; + } + + return normalizeFilterCoefficients(b0, b1, b2, a0, a1, a2); +} + +function normalizeFilterCoefficients(b0, b1, b2, a0, a1, a2) { + var scale = 1 / a0; + + return {b0 : b0 * scale, + b1 : b1 * scale, + b2 : b2 * scale, + a1 : a1 * scale, + a2 : a2 * scale}; +} + +function createBandpassFilter(freq, q, gain) { + var b0; + var b1; + var b2; + var a0; + var a1; + var a2; + var coef; + + if (freq > 0 && freq < 1) { + var w0 = Math.PI * freq; + if (q > 0) { + var alpha = Math.sin(w0) / (2 * q); + var k = Math.cos(w0); + + b0 = alpha; + b1 = 0; + b2 = -alpha; + a0 = 1 + alpha; + a1 = -2 * k; + a2 = 1 - alpha; + + coef = normalizeFilterCoefficients(b0, b1, b2, a0, a1, a2); + } else { + // q = 0, and frequency is not 0 or 1. The above formula has a + // divide by zero problem. The limit of the z-transform as q + // approaches 0 is 1, so set the filter that way. + coef = {b0 : 1, b1 : 0, b2 : 0, a1 : 0, a2 : 0}; + } + } else { + // When freq = 0 or 1, the z-transform is identically 0, + // independent of q. + coef = {b0 : 0, b1 : 0, b2 : 0, a1 : 0, a2 : 0} + } + + return coef; +} + +function createLowShelfFilter(freq, q, gain) { + // q not used + var b0; + var b1; + var b2; + var a0; + var a1; + var a2; + var coef; + + var S = 1; + var A = Math.pow(10, gain / 40); + + if (freq == 1) { + // The filter is just a constant gain + coef = {b0 : A * A, b1 : 0, b2 : 0, a1 : 0, a2 : 0}; + } else if (freq == 0) { + // The filter is 1 + coef = {b0 : 1, b1 : 0, b2 : 0, a1 : 0, a2 : 0}; + } else { + var w0 = Math.PI * freq; + var alpha = 1 / 2 * Math.sin(w0) * Math.sqrt((A + 1 / A) * (1 / S - 1) + 2); + var k = Math.cos(w0); + var k2 = 2 * Math.sqrt(A) * alpha; + var Ap1 = A + 1; + var Am1 = A - 1; + + b0 = A * (Ap1 - Am1 * k + k2); + b1 = 2 * A * (Am1 - Ap1 * k); + b2 = A * (Ap1 - Am1 * k - k2); + a0 = Ap1 + Am1 * k + k2; + a1 = -2 * (Am1 + Ap1 * k); + a2 = Ap1 + Am1 * k - k2; + coef = normalizeFilterCoefficients(b0, b1, b2, a0, a1, a2); + } + + return coef; +} + +function createHighShelfFilter(freq, q, gain) { + // q not used + var b0; + var b1; + var b2; + var a0; + var a1; + var a2; + var coef; + + var A = Math.pow(10, gain / 40); + + if (freq == 1) { + // When freq = 1, the z-transform is 1 + coef = {b0 : 1, b1 : 0, b2 : 0, a1 : 0, a2 : 0}; + } else if (freq > 0) { + var w0 = Math.PI * freq; + var S = 1; + var alpha = 0.5 * Math.sin(w0) * Math.sqrt((A + 1 / A) * (1 / S - 1) + 2); + var k = Math.cos(w0); + var k2 = 2 * Math.sqrt(A) * alpha; + var Ap1 = A + 1; + var Am1 = A - 1; + + b0 = A * (Ap1 + Am1 * k + k2); + b1 = -2 * A * (Am1 + Ap1 * k); + b2 = A * (Ap1 + Am1 * k - k2); + a0 = Ap1 - Am1 * k + k2; + a1 = 2 * (Am1 - Ap1*k); + a2 = Ap1 - Am1 * k-k2; + + coef = normalizeFilterCoefficients(b0, b1, b2, a0, a1, a2); + } else { + // When freq = 0, the filter is just a gain + coef = {b0 : A * A, b1 : 0, b2 : 0, a1 : 0, a2 : 0}; + } + + return coef; +} + +function createPeakingFilter(freq, q, gain) { + var b0; + var b1; + var b2; + var a0; + var a1; + var a2; + var coef; + + var A = Math.pow(10, gain / 40); + + if (freq > 0 && freq < 1) { + if (q > 0) { + var w0 = Math.PI * freq; + var alpha = Math.sin(w0) / (2 * q); + var k = Math.cos(w0); + + b0 = 1 + alpha * A; + b1 = -2 * k; + b2 = 1 - alpha * A; + a0 = 1 + alpha / A; + a1 = -2 * k; + a2 = 1 - alpha / A; + + coef = normalizeFilterCoefficients(b0, b1, b2, a0, a1, a2); + } else { + // q = 0, we have a divide by zero problem in the formulas + // above. But if we look at the z-transform, we see that the + // limit as q approaches 0 is A^2. + coef = {b0 : A * A, b1 : 0, b2 : 0, a1 : 0, a2 : 0}; + } + } else { + // freq = 0 or 1, the z-transform is 1 + coef = {b0 : 1, b1 : 0, b2 : 0, a1 : 0, a2 : 0}; + } + + return coef; +} + +function createNotchFilter(freq, q, gain) { + var b0; + var b1; + var b2; + var a0; + var a1; + var a2; + var coef; + + if (freq > 0 && freq < 1) { + if (q > 0) { + var w0 = Math.PI * freq; + var alpha = Math.sin(w0) / (2 * q); + var k = Math.cos(w0); + + b0 = 1; + b1 = -2 * k; + b2 = 1; + a0 = 1 + alpha; + a1 = -2 * k; + a2 = 1 - alpha; + coef = normalizeFilterCoefficients(b0, b1, b2, a0, a1, a2); + } else { + // When q = 0, we get a divide by zero above. The limit of the + // z-transform as q approaches 0 is 0, so set the coefficients + // appropriately. + coef = {b0 : 0, b1 : 0, b2 : 0, a1 : 0, a2 : 0}; + } + } else { + // When freq = 0 or 1, the z-transform is 1 + coef = {b0 : 1, b1 : 0, b2 : 0, a1 : 0, a2 : 0}; + } + + return coef; +} + +function createAllpassFilter(freq, q, gain) { + var b0; + var b1; + var b2; + var a0; + var a1; + var a2; + var coef; + + if (freq > 0 && freq < 1) { + if (q > 0) { + var w0 = Math.PI * freq; + var alpha = Math.sin(w0) / (2 * q); + var k = Math.cos(w0); + + b0 = 1 - alpha; + b1 = -2 * k; + b2 = 1 + alpha; + a0 = 1 + alpha; + a1 = -2 * k; + a2 = 1 - alpha; + coef = normalizeFilterCoefficients(b0, b1, b2, a0, a1, a2); + } else { + // q = 0 + coef = {b0 : -1, b1 : 0, b2 : 0, a1 : 0, a2 : 0}; + } + } else { + coef = {b0 : 1, b1 : 0, b2 : 0, a1 : 0, a2 : 0}; + } + + return coef; +} + +function filterData(filterCoef, signal, len) { + var y = new Array(len); + var b0 = filterCoef.b0; + var b1 = filterCoef.b1; + var b2 = filterCoef.b2; + var a1 = filterCoef.a1; + var a2 = filterCoef.a2; + + // Prime the pump. (Assumes the signal has length >= 2!) + y[0] = b0 * signal[0]; + y[1] = b0 * signal[1] + b1 * signal[0] - a1 * y[0]; + + // Filter all of the signal that we have. + for (var k = 2; k < Math.min(signal.length, len); ++k) { + y[k] = b0 * signal[k] + b1 * signal[k-1] + b2 * signal[k-2] - a1 * y[k-1] - a2 * y[k-2]; + } + + // If we need to filter more, but don't have any signal left, + // assume the signal is zero. + for (var k = signal.length; k < len; ++k) { + y[k] = - a1 * y[k-1] - a2 * y[k-2]; + } + + return y; +} + +// Map the filter type name to a function that computes the filter coefficents for the given filter +// type. +var filterCreatorFunction = {"lowpass": createLowpassFilter, + "highpass": createHighpassFilter, + "bandpass": createBandpassFilter, + "lowshelf": createLowShelfFilter, + "highshelf": createHighShelfFilter, + "peaking": createPeakingFilter, + "notch": createNotchFilter, + "allpass": createAllpassFilter}; + +var filterTypeName = {"lowpass": "Lowpass filter", + "highpass": "Highpass filter", + "bandpass": "Bandpass filter", + "lowshelf": "Lowshelf filter", + "highshelf": "Highshelf filter", + "peaking": "Peaking filter", + "notch": "Notch filter", + "allpass": "Allpass filter"}; + +function createFilter(filterType, freq, q, gain) { + return filterCreatorFunction[filterType](freq, q, gain); +} diff --git a/dom/media/webaudio/test/blink/biquad-testing.js b/dom/media/webaudio/test/blink/biquad-testing.js new file mode 100644 index 000000000..795adf601 --- /dev/null +++ b/dom/media/webaudio/test/blink/biquad-testing.js @@ -0,0 +1,153 @@ +// Globals, to make testing and debugging easier. +var context; +var filter; +var signal; +var renderedBuffer; +var renderedData; + +var sampleRate = 44100.0; +var pulseLengthFrames = .1 * sampleRate; + +// Maximum allowed error for the test to succeed. Experimentally determined. +var maxAllowedError = 5.9e-8; + +// This must be large enough so that the filtered result is +// essentially zero. See comments for createTestAndRun. +var timeStep = .1; + +// Maximum number of filters we can process (mostly for setting the +// render length correctly.) +var maxFilters = 5; + +// How long to render. Must be long enough for all of the filters we +// want to test. +var renderLengthSeconds = timeStep * (maxFilters + 1) ; + +var renderLengthSamples = Math.round(renderLengthSeconds * sampleRate); + +// Number of filters that will be processed. +var nFilters; + +function createImpulseBuffer(context, length) { + var impulse = context.createBuffer(1, length, context.sampleRate); + var data = impulse.getChannelData(0); + for (var k = 1; k < data.length; ++k) { + data[k] = 0; + } + data[0] = 1; + + return impulse; +} + + +function createTestAndRun(context, filterType, filterParameters) { + // To test the filters, we apply a signal (an impulse) to each of + // the specified filters, with each signal starting at a different + // time. The output of the filters is summed together at the + // output. Thus for filter k, the signal input to the filter + // starts at time k * timeStep. For this to work well, timeStep + // must be large enough for the output of each filter to have + // decayed to zero with timeStep seconds. That way the filter + // outputs don't interfere with each other. + + nFilters = Math.min(filterParameters.length, maxFilters); + + signal = new Array(nFilters); + filter = new Array(nFilters); + + impulse = createImpulseBuffer(context, pulseLengthFrames); + + // Create all of the signal sources and filters that we need. + for (var k = 0; k < nFilters; ++k) { + signal[k] = context.createBufferSource(); + signal[k].buffer = impulse; + + filter[k] = context.createBiquadFilter(); + filter[k].type = filterType; + filter[k].frequency.value = context.sampleRate / 2 * filterParameters[k].cutoff; + filter[k].detune.value = (filterParameters[k].detune === undefined) ? 0 : filterParameters[k].detune; + filter[k].Q.value = filterParameters[k].q; + filter[k].gain.value = filterParameters[k].gain; + + signal[k].connect(filter[k]); + filter[k].connect(context.destination); + + signal[k].start(timeStep * k); + } + + context.oncomplete = checkFilterResponse(filterType, filterParameters); + context.startRendering(); +} + +function addSignal(dest, src, destOffset) { + // Add src to dest at the given dest offset. + for (var k = destOffset, j = 0; k < dest.length, j < src.length; ++k, ++j) { + dest[k] += src[j]; + } +} + +function generateReference(filterType, filterParameters) { + var result = new Array(renderLengthSamples); + var data = new Array(renderLengthSamples); + // Initialize the result array and data. + for (var k = 0; k < result.length; ++k) { + result[k] = 0; + data[k] = 0; + } + // Make data an impulse. + data[0] = 1; + + for (var k = 0; k < nFilters; ++k) { + // Filter an impulse + var detune = (filterParameters[k].detune === undefined) ? 0 : filterParameters[k].detune; + var frequency = filterParameters[k].cutoff * Math.pow(2, detune / 1200); // Apply detune, converting from Cents. + + var filterCoef = createFilter(filterType, + frequency, + filterParameters[k].q, + filterParameters[k].gain); + var y = filterData(filterCoef, data, renderLengthSamples); + + // Accumulate this filtered data into the final output at the desired offset. + addSignal(result, y, timeToSampleFrame(timeStep * k, sampleRate)); + } + + return result; +} + +function checkFilterResponse(filterType, filterParameters) { + return function(event) { + renderedBuffer = event.renderedBuffer; + renderedData = renderedBuffer.getChannelData(0); + + reference = generateReference(filterType, filterParameters); + + var len = Math.min(renderedData.length, reference.length); + + var success = true; + + // Maximum error between rendered data and expected data + var maxError = 0; + + // Sample offset where the maximum error occurred. + var maxPosition = 0; + + // Number of infinities or NaNs that occurred in the rendered data. + var invalidNumberCount = 0; + + ok(nFilters == filterParameters.length, "Test wanted " + filterParameters.length + " filters but only " + maxFilters + " allowed."); + + compareChannels(renderedData, reference, len, 0, 0, true); + + // Check for bad numbers in the rendered output too. + // There shouldn't be any. + for (var k = 0; k < len; ++k) { + if (!isValidNumber(renderedData[k])) { + ++invalidNumberCount; + } + } + + ok(invalidNumberCount == 0, "Rendered output has " + invalidNumberCount + " infinities or NaNs."); + SimpleTest.finish(); + } +} diff --git a/dom/media/webaudio/test/blink/convolution-testing.js b/dom/media/webaudio/test/blink/convolution-testing.js new file mode 100644 index 000000000..98ff0c775 --- /dev/null +++ b/dom/media/webaudio/test/blink/convolution-testing.js @@ -0,0 +1,182 @@ +var sampleRate = 44100.0; + +var renderLengthSeconds = 8; +var pulseLengthSeconds = 1; +var pulseLengthFrames = pulseLengthSeconds * sampleRate; + +function createSquarePulseBuffer(context, sampleFrameLength) { + var audioBuffer = context.createBuffer(1, sampleFrameLength, context.sampleRate); + + var n = audioBuffer.length; + var data = audioBuffer.getChannelData(0); + + for (var i = 0; i < n; ++i) + data[i] = 1; + + return audioBuffer; +} + +// The triangle buffer holds the expected result of the convolution. +// It linearly ramps up from 0 to its maximum value (at the center) +// then linearly ramps down to 0. The center value corresponds to the +// point where the two square pulses overlap the most. +function createTrianglePulseBuffer(context, sampleFrameLength) { + var audioBuffer = context.createBuffer(1, sampleFrameLength, context.sampleRate); + + var n = audioBuffer.length; + var halfLength = n / 2; + var data = audioBuffer.getChannelData(0); + + for (var i = 0; i < halfLength; ++i) + data[i] = i + 1; + + for (var i = halfLength; i < n; ++i) + data[i] = n - i - 1; + + return audioBuffer; +} + +function log10(x) { + return Math.log(x)/Math.LN10; +} + +function linearToDecibel(x) { + return 20*log10(x); +} + +// Verify that the rendered result is very close to the reference +// triangular pulse. +function checkTriangularPulse(rendered, reference) { + var match = true; + var maxDelta = 0; + var valueAtMaxDelta = 0; + var maxDeltaIndex = 0; + + for (var i = 0; i < reference.length; ++i) { + var diff = rendered[i] - reference[i]; + var x = Math.abs(diff); + if (x > maxDelta) { + maxDelta = x; + valueAtMaxDelta = reference[i]; + maxDeltaIndex = i; + } + } + + // allowedDeviationFraction was determined experimentally. It + // is the threshold of the relative error at the maximum + // difference between the true triangular pulse and the + // rendered pulse. + var allowedDeviationDecibels = -129.4; + var maxDeviationDecibels = linearToDecibel(maxDelta / valueAtMaxDelta); + + if (maxDeviationDecibels <= allowedDeviationDecibels) { + testPassed("Triangular portion of convolution is correct."); + } else { + testFailed("Triangular portion of convolution is not correct. Max deviation = " + maxDeviationDecibels + " dB at " + maxDeltaIndex); + match = false; + } + + return match; +} + +// Verify that the rendered data is close to zero for the first part +// of the tail. +function checkTail1(data, reference, breakpoint) { + var isZero = true; + var tail1Max = 0; + + for (var i = reference.length; i < reference.length + breakpoint; ++i) { + var mag = Math.abs(data[i]); + if (mag > tail1Max) { + tail1Max = mag; + } + } + + // Let's find the peak of the reference (even though we know a + // priori what it is). + var refMax = 0; + for (var i = 0; i < reference.length; ++i) { + refMax = Math.max(refMax, Math.abs(reference[i])); + } + + // This threshold is experimentally determined by examining the + // value of tail1MaxDecibels. + var threshold1 = -129.7; + + var tail1MaxDecibels = linearToDecibel(tail1Max/refMax); + if (tail1MaxDecibels <= threshold1) { + testPassed("First part of tail of convolution is sufficiently small."); + } else { + testFailed("First part of tail of convolution is not sufficiently small: " + tail1MaxDecibels + " dB"); + isZero = false; + } + + return isZero; +} + +// Verify that the second part of the tail of the convolution is +// exactly zero. +function checkTail2(data, reference, breakpoint) { + var isZero = true; + var tail2Max = 0; + // For the second part of the tail, the maximum value should be + // exactly zero. + var threshold2 = 0; + for (var i = reference.length + breakpoint; i < data.length; ++i) { + if (Math.abs(data[i]) > 0) { + isZero = false; + break; + } + } + + if (isZero) { + testPassed("Rendered signal after tail of convolution is silent."); + } else { + testFailed("Rendered signal after tail of convolution should be silent."); + } + + return isZero; +} + +function checkConvolvedResult(trianglePulse) { + return function(event) { + var renderedBuffer = event.renderedBuffer; + + var referenceData = trianglePulse.getChannelData(0); + var renderedData = renderedBuffer.getChannelData(0); + + var success = true; + + // Verify the triangular pulse is actually triangular. + + success = success && checkTriangularPulse(renderedData, referenceData); + + // Make sure that portion after convolved portion is totally + // silent. But round-off prevents this from being completely + // true. At the end of the triangle, it should be close to + // zero. If we go farther out, it should be even closer and + // eventually zero. + + // For the tail of the convolution (where the result would be + // theoretically zero), we partition the tail into two + // parts. The first is the at the beginning of the tail, + // where we tolerate a small but non-zero value. The second part is + // farther along the tail where the result should be zero. + + // breakpoint is the point dividing the first two tail parts + // we're looking at. Experimentally determined. + var breakpoint = 12800; + + success = success && checkTail1(renderedData, referenceData, breakpoint); + + success = success && checkTail2(renderedData, referenceData, breakpoint); + + if (success) { + testPassed("Test signal was correctly convolved."); + } else { + testFailed("Test signal was not correctly convolved."); + } + + finishJSTest(); + } +} diff --git a/dom/media/webaudio/test/blink/mochitest.ini b/dom/media/webaudio/test/blink/mochitest.ini new file mode 100644 index 000000000..28bceb3a4 --- /dev/null +++ b/dom/media/webaudio/test/blink/mochitest.ini @@ -0,0 +1,23 @@ +[DEFAULT] +tags=msg +tags = webaudio +subsuite = media +support-files = + biquad-filters.js + biquad-testing.js + ../webaudio.js + +[test_biquadFilterNodeAllPass.html] +[test_biquadFilterNodeAutomation.html] +skip-if = true # Known problems with Biquad automation, e.g. Bug 1155709 +[test_biquadFilterNodeBandPass.html] +[test_biquadFilterNodeGetFrequencyResponse.html] +[test_biquadFilterNodeHighPass.html] +[test_biquadFilterNodeHighShelf.html] +[test_biquadFilterNodeLowPass.html] +[test_biquadFilterNodeLowShelf.html] +[test_biquadFilterNodeNotch.html] +[test_biquadFilterNodePeaking.html] +[test_biquadFilterNodeTail.html] +[test_iirFilterNode.html] +[test_iirFilterNodeGetFrequencyResponse.html] diff --git a/dom/media/webaudio/test/blink/panner-model-testing.js b/dom/media/webaudio/test/blink/panner-model-testing.js new file mode 100644 index 000000000..45460e276 --- /dev/null +++ b/dom/media/webaudio/test/blink/panner-model-testing.js @@ -0,0 +1,210 @@ +var sampleRate = 48000.0; + +var numberOfChannels = 1; + +// Time step when each panner node starts. +var timeStep = 0.001; + +// Length of the impulse signal. +var pulseLengthFrames = Math.round(timeStep * sampleRate); + +// How many panner nodes to create for the test +var nodesToCreate = 100; + +// Be sure we render long enough for all of our nodes. +var renderLengthSeconds = timeStep * (nodesToCreate + 1); + +// These are global mostly for debugging. +var context; +var impulse; +var bufferSource; +var panner; +var position; +var time; + +var renderedBuffer; +var renderedLeft; +var renderedRight; + +function createGraph(context, nodeCount) { + bufferSource = new Array(nodeCount); + panner = new Array(nodeCount); + position = new Array(nodeCount); + time = new Array(nodeCount); + // Angle between panner locations. (nodeCount - 1 because we want + // to include both 0 and 180 deg. + var angleStep = Math.PI / (nodeCount - 1); + + if (numberOfChannels == 2) { + impulse = createStereoImpulseBuffer(context, pulseLengthFrames); + } + else + impulse = createImpulseBuffer(context, pulseLengthFrames); + + for (var k = 0; k < nodeCount; ++k) { + bufferSource[k] = context.createBufferSource(); + bufferSource[k].buffer = impulse; + + panner[k] = context.createPanner(); + panner[k].panningModel = "equalpower"; + panner[k].distanceModel = "linear"; + + var angle = angleStep * k; + position[k] = {angle : angle, x : Math.cos(angle), z : Math.sin(angle)}; + panner[k].positionX.value = position[k].x; + panner[k].positionZ.value = position[k].z; + + bufferSource[k].connect(panner[k]); + panner[k].connect(context.destination); + + // Start the source + time[k] = k * timeStep; + bufferSource[k].start(time[k]); + } +} + +function createTestAndRun(context, nodeCount, numberOfSourceChannels) { + numberOfChannels = numberOfSourceChannels; + + createGraph(context, nodeCount); + + context.oncomplete = checkResult; + context.startRendering(); +} + +// Map our position angle to the azimuth angle (in degrees). +// +// An angle of 0 corresponds to an azimuth of 90 deg; pi, to -90 deg. +function angleToAzimuth(angle) { + return 90 - angle * 180 / Math.PI; +} + +// The gain caused by the EQUALPOWER panning model +function equalPowerGain(angle) { + var azimuth = angleToAzimuth(angle); + + if (numberOfChannels == 1) { + var panPosition = (azimuth + 90) / 180; + + var gainL = Math.cos(0.5 * Math.PI * panPosition); + var gainR = Math.sin(0.5 * Math.PI * panPosition); + + return { left : gainL, right : gainR }; + } else { + if (azimuth <= 0) { + var panPosition = (azimuth + 90) / 90; + + var gainL = 1 + Math.cos(0.5 * Math.PI * panPosition); + var gainR = Math.sin(0.5 * Math.PI * panPosition); + + return { left : gainL, right : gainR }; + } else { + var panPosition = azimuth / 90; + + var gainL = Math.cos(0.5 * Math.PI * panPosition); + var gainR = 1 + Math.sin(0.5 * Math.PI * panPosition); + + return { left : gainL, right : gainR }; + } + } +} + +function checkResult(event) { + renderedBuffer = event.renderedBuffer; + renderedLeft = renderedBuffer.getChannelData(0); + renderedRight = renderedBuffer.getChannelData(1); + + // The max error we allow between the rendered impulse and the + // expected value. This value is experimentally determined. Set + // to 0 to make the test fail to see what the actual error is. + var maxAllowedError = 1.3e-6; + + var success = true; + + // Number of impulses found in the rendered result. + var impulseCount = 0; + + // Max (relative) error and the index of the maxima for the left + // and right channels. + var maxErrorL = 0; + var maxErrorIndexL = 0; + var maxErrorR = 0; + var maxErrorIndexR = 0; + + // Number of impulses that don't match our expected locations. + var timeCount = 0; + + // Locations of where the impulses aren't at the expected locations. + var timeErrors = new Array(); + + for (var k = 0; k < renderedLeft.length; ++k) { + // We assume that the left and right channels start at the same instant. + if (renderedLeft[k] != 0 || renderedRight[k] != 0) { + // The expected gain for the left and right channels. + var pannerGain = equalPowerGain(position[impulseCount].angle); + var expectedL = pannerGain.left; + var expectedR = pannerGain.right; + + // Absolute error in the gain. + var errorL = Math.abs(renderedLeft[k] - expectedL); + var errorR = Math.abs(renderedRight[k] - expectedR); + + if (Math.abs(errorL) > maxErrorL) { + maxErrorL = Math.abs(errorL); + maxErrorIndexL = impulseCount; + } + if (Math.abs(errorR) > maxErrorR) { + maxErrorR = Math.abs(errorR); + maxErrorIndexR = impulseCount; + } + + // Keep track of the impulses that didn't show up where we + // expected them to be. + var expectedOffset = timeToSampleFrame(time[impulseCount], sampleRate); + if (k != expectedOffset) { + timeErrors[timeCount] = { actual : k, expected : expectedOffset}; + ++timeCount; + } + ++impulseCount; + } + } + + if (impulseCount == nodesToCreate) { + testPassed("Number of impulses matches the number of panner nodes."); + } else { + testFailed("Number of impulses is incorrect. (Found " + impulseCount + " but expected " + nodesToCreate + ")"); + success = false; + } + + if (timeErrors.length > 0) { + success = false; + testFailed(timeErrors.length + " timing errors found in " + nodesToCreate + " panner nodes."); + for (var k = 0; k < timeErrors.length; ++k) { + testFailed("Impulse at sample " + timeErrors[k].actual + " but expected " + timeErrors[k].expected); + } + } else { + testPassed("All impulses at expected offsets."); + } + + if (maxErrorL <= maxAllowedError) { + testPassed("Left channel gain values are correct."); + } else { + testFailed("Left channel gain values are incorrect. Max error = " + maxErrorL + " at time " + time[maxErrorIndexL] + " (threshold = " + maxAllowedError + ")"); + success = false; + } + + if (maxErrorR <= maxAllowedError) { + testPassed("Right channel gain values are correct."); + } else { + testFailed("Right channel gain values are incorrect. Max error = " + maxErrorR + " at time " + time[maxErrorIndexR] + " (threshold = " + maxAllowedError + ")"); + success = false; + } + + if (success) { + testPassed("EqualPower panner test passed"); + } else { + testFailed("EqualPower panner test failed"); + } + + finishJSTest(); +} diff --git a/dom/media/webaudio/test/blink/test_biquadFilterNodeAllPass.html b/dom/media/webaudio/test/blink/test_biquadFilterNodeAllPass.html new file mode 100644 index 000000000..266521c52 --- /dev/null +++ b/dom/media/webaudio/test/blink/test_biquadFilterNodeAllPass.html @@ -0,0 +1,32 @@ + + + + Test BiquadFilterNode All Pass Filter + + + + +
+
+
+
+
+
+
+ + diff --git a/dom/media/webaudio/test/blink/test_biquadFilterNodeAutomation.html b/dom/media/webaudio/test/blink/test_biquadFilterNodeAutomation.html new file mode 100644 index 000000000..08ce71cce --- /dev/null +++ b/dom/media/webaudio/test/blink/test_biquadFilterNodeAutomation.html @@ -0,0 +1,351 @@ + + + + Test BiquadFilterNode All Pass Filter + + + + +
+
+
+
+
+
+
+ + diff --git a/dom/media/webaudio/test/blink/test_biquadFilterNodeBandPass.html b/dom/media/webaudio/test/blink/test_biquadFilterNodeBandPass.html new file mode 100644 index 000000000..a3a1484f6 --- /dev/null +++ b/dom/media/webaudio/test/blink/test_biquadFilterNodeBandPass.html @@ -0,0 +1,34 @@ + + + + Test BiquadFilterNode Band Pass Filter + + + + +
+
+
+
+
+
+
+ + diff --git a/dom/media/webaudio/test/blink/test_biquadFilterNodeGetFrequencyResponse.html b/dom/media/webaudio/test/blink/test_biquadFilterNodeGetFrequencyResponse.html new file mode 100644 index 000000000..1576db1e8 --- /dev/null +++ b/dom/media/webaudio/test/blink/test_biquadFilterNodeGetFrequencyResponse.html @@ -0,0 +1,261 @@ + + + + Test BiquadFilterNode All Pass Filter + + + + +
+
+
+
+
+
+
+ + diff --git a/dom/media/webaudio/test/blink/test_biquadFilterNodeHighPass.html b/dom/media/webaudio/test/blink/test_biquadFilterNodeHighPass.html new file mode 100644 index 000000000..cb9aa274c --- /dev/null +++ b/dom/media/webaudio/test/blink/test_biquadFilterNodeHighPass.html @@ -0,0 +1,33 @@ + + + + Test BiquadFilterNode High Pass Filter + + + + +
+
+
+
+
+
+
+ + diff --git a/dom/media/webaudio/test/blink/test_biquadFilterNodeHighShelf.html b/dom/media/webaudio/test/blink/test_biquadFilterNodeHighShelf.html new file mode 100644 index 000000000..3581459b0 --- /dev/null +++ b/dom/media/webaudio/test/blink/test_biquadFilterNodeHighShelf.html @@ -0,0 +1,33 @@ + + + + Test BiquadFilterNode High Shelf Filter + + + + +
+
+
+
+
+
+
+ + diff --git a/dom/media/webaudio/test/blink/test_biquadFilterNodeLowPass.html b/dom/media/webaudio/test/blink/test_biquadFilterNodeLowPass.html new file mode 100644 index 000000000..b0c12558f --- /dev/null +++ b/dom/media/webaudio/test/blink/test_biquadFilterNodeLowPass.html @@ -0,0 +1,34 @@ + + + + Test BiquadFilterNode Low Pass Filter + + + + +
+
+
+
+
+
+
+ + diff --git a/dom/media/webaudio/test/blink/test_biquadFilterNodeLowShelf.html b/dom/media/webaudio/test/blink/test_biquadFilterNodeLowShelf.html new file mode 100644 index 000000000..3c83bfaa3 --- /dev/null +++ b/dom/media/webaudio/test/blink/test_biquadFilterNodeLowShelf.html @@ -0,0 +1,34 @@ + + + + Test BiquadFilterNode Low Shelf Filter + + + + +
+
+
+
+
+
+
+ + diff --git a/dom/media/webaudio/test/blink/test_biquadFilterNodeNotch.html b/dom/media/webaudio/test/blink/test_biquadFilterNodeNotch.html new file mode 100644 index 000000000..551410c66 --- /dev/null +++ b/dom/media/webaudio/test/blink/test_biquadFilterNodeNotch.html @@ -0,0 +1,33 @@ + + + + Test BiquadFilterNode Notch Filter + + + + +
+
+
+
+
+
+
+ + diff --git a/dom/media/webaudio/test/blink/test_biquadFilterNodePeaking.html b/dom/media/webaudio/test/blink/test_biquadFilterNodePeaking.html new file mode 100644 index 000000000..33fcc225a --- /dev/null +++ b/dom/media/webaudio/test/blink/test_biquadFilterNodePeaking.html @@ -0,0 +1,34 @@ + + + + Test BiquadFilterNode Low Pass Filter + + + + +
+
+
+
+
+
+
+ + diff --git a/dom/media/webaudio/test/blink/test_biquadFilterNodeTail.html b/dom/media/webaudio/test/blink/test_biquadFilterNodeTail.html new file mode 100644 index 000000000..fd02e734f --- /dev/null +++ b/dom/media/webaudio/test/blink/test_biquadFilterNodeTail.html @@ -0,0 +1,76 @@ + + + + Test BiquadFilterNode All Pass Filter + + + + +
+
+
+
+
+
+
+ + diff --git a/dom/media/webaudio/test/blink/test_iirFilterNode.html b/dom/media/webaudio/test/blink/test_iirFilterNode.html new file mode 100644 index 000000000..47f936761 --- /dev/null +++ b/dom/media/webaudio/test/blink/test_iirFilterNode.html @@ -0,0 +1,467 @@ + + + + Test IIRFilterNode GetFrequencyResponse + + + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/blink/test_iirFilterNodeGetFrequencyResponse.html b/dom/media/webaudio/test/blink/test_iirFilterNodeGetFrequencyResponse.html new file mode 100644 index 000000000..cb5cf33ed --- /dev/null +++ b/dom/media/webaudio/test/blink/test_iirFilterNodeGetFrequencyResponse.html @@ -0,0 +1,97 @@ + + + + Test IIRFilterNode GetFrequencyResponse + + + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/browser.ini b/dom/media/webaudio/test/browser.ini new file mode 100644 index 000000000..60ed969f1 --- /dev/null +++ b/dom/media/webaudio/test/browser.ini @@ -0,0 +1 @@ +[browser_bug1181073.js] \ No newline at end of file diff --git a/dom/media/webaudio/test/browser_bug1181073.js b/dom/media/webaudio/test/browser_bug1181073.js new file mode 100644 index 000000000..6ee48144c --- /dev/null +++ b/dom/media/webaudio/test/browser_bug1181073.js @@ -0,0 +1,40 @@ +add_task(function*() { + // Make the min_background_timeout_value very high to avoid problems on slow machines + yield new Promise(resolve => SpecialPowers.pushPrefEnv({ + 'set': [['dom.min_background_timeout_value', 3000]] + }, resolve)); + + // Make a new tab, and put it in the background + yield BrowserTestUtils.withNewTab("about:blank", function*(browser) { + yield BrowserTestUtils.withNewTab("about:blank", function*() { + let time = yield ContentTask.spawn(browser, null, function () { + return new Promise(resolve => { + let start = content.performance.now(); + let id = content.window.setInterval(function() { + let end = content.performance.now(); + content.window.clearInterval(id); + resolve(end - start); + }, 0); + }); + }); + + ok(time > 2000, "Interval is throttled with no webaudio (" + time + " ms)"); + + time = yield ContentTask.spawn(browser, null, function () { + return new Promise(resolve => { + // Create an audio context, and save it on the window so it doesn't get GCed + content.window._audioCtx = new content.window.AudioContext(); + + let start = content.performance.now(); + let id = content.window.setInterval(function() { + let end = content.performance.now(); + content.window.clearInterval(id); + resolve(end - start); + }, 0); + }); + }); + + ok(time < 1000, "Interval is not throttled with an audio context present (" + time + " ms)"); + }); + }); +}); diff --git a/dom/media/webaudio/test/corsServer.sjs b/dom/media/webaudio/test/corsServer.sjs new file mode 100644 index 000000000..1804c7862 --- /dev/null +++ b/dom/media/webaudio/test/corsServer.sjs @@ -0,0 +1,25 @@ +function handleRequest(request, response) +{ + var file = Components.classes["@mozilla.org/file/directory_service;1"]. + getService(Components.interfaces.nsIProperties). + get("CurWorkD", Components.interfaces.nsILocalFile); + var fis = Components.classes['@mozilla.org/network/file-input-stream;1']. + createInstance(Components.interfaces.nsIFileInputStream); + var bis = Components.classes["@mozilla.org/binaryinputstream;1"]. + createInstance(Components.interfaces.nsIBinaryInputStream); + var paths = "tests/dom/media/webaudio/test/small-shot.ogg"; + var split = paths.split("/"); + for(var i = 0; i < split.length; ++i) { + file.append(split[i]); + } + fis.init(file, -1, -1, false); + bis.setInputStream(fis); + var bytes = bis.readBytes(bis.available()); + response.setHeader("Content-Type", "video/ogg", false); + response.setHeader("Content-Length", ""+ bytes.length, false); + response.setHeader("Access-Control-Allow-Origin", "*", false); + response.write(bytes, bytes.length); + response.processAsync(); + response.finish(); + bis.close(); +} diff --git a/dom/media/webaudio/test/invalid.txt b/dom/media/webaudio/test/invalid.txt new file mode 100644 index 000000000..c44840faf --- /dev/null +++ b/dom/media/webaudio/test/invalid.txt @@ -0,0 +1 @@ +Surely this is not an audio file! diff --git a/dom/media/webaudio/test/layouttest-glue.js b/dom/media/webaudio/test/layouttest-glue.js new file mode 100644 index 000000000..db1aa563b --- /dev/null +++ b/dom/media/webaudio/test/layouttest-glue.js @@ -0,0 +1,19 @@ +// Reimplementation of the LayoutTest API from Blink so we can easily port +// WebAudio tests to Simpletest, without touching the internals of the test. + +function testFailed(msg) { + ok(false, msg); +} + +function testPassed(msg) { + ok(true, msg); +} + +function finishJSTest() { + SimpleTest.finish(); +} + +function description(str) { + info(str); +} + diff --git a/dom/media/webaudio/test/mochitest.ini b/dom/media/webaudio/test/mochitest.ini new file mode 100644 index 000000000..4abcce7e3 --- /dev/null +++ b/dom/media/webaudio/test/mochitest.ini @@ -0,0 +1,212 @@ +[DEFAULT] +tags=msg +tags = webaudio +subsuite = media +support-files = + audio-expected.wav + audio-mono-expected-2.wav + audio-mono-expected.wav + audio-quad.wav + audio.ogv + audiovideo.mp4 + audioBufferSourceNodeDetached_worker.js + corsServer.sjs + invalid.txt + layouttest-glue.js + noaudio.webm + small-shot-expected.wav + small-shot-mono-expected.wav + small-shot.ogg + small-shot.mp3 + sweep-300-330-1sec.opus + ting-44.1k-1ch.ogg + ting-44.1k-2ch.ogg + ting-48k-1ch.ogg + ting-48k-2ch.ogg + ting-44.1k-1ch.wav + ting-44.1k-2ch.wav + ting-48k-1ch.wav + ting-48k-2ch.wav + sine-440-10s.opus + webaudio.js + +[test_analyserNode.html] +[test_analyserScale.html] +[test_analyserNodeOutput.html] +[test_analyserNodePassThrough.html] +[test_analyserNodeWithGain.html] +[test_AudioBuffer.html] +[test_audioBufferSourceNode.html] +[test_audioBufferSourceNodeEnded.html] +[test_audioBufferSourceNodeLazyLoopParam.html] +[test_audioBufferSourceNodeLoop.html] +[test_audioBufferSourceNodeLoopStartEnd.html] +[test_audioBufferSourceNodeLoopStartEndSame.html] +[test_audioBufferSourceNodeDetached.html] +skip-if = (toolkit == 'android' && debug) || os == 'win' # bug 1127845, bug 1138468 +[test_audioBufferSourceNodeNoStart.html] +[test_audioBufferSourceNodeNullBuffer.html] +[test_audioBufferSourceNodeOffset.html] +skip-if = (toolkit == 'android') || debug #bug 906752 +[test_audioBufferSourceNodePassThrough.html] +[test_audioBufferSourceNodeRate.html] +[test_AudioContext.html] +[test_AudioContext_disabled.html] +[test_audioContextSuspendResumeClose.html] +tags=capturestream +[test_audioDestinationNode.html] +[test_AudioListener.html] +[test_AudioNodeDevtoolsAPI.html] +[test_audioParamChaining.html] +[test_AudioParamDevtoolsAPI.html] +[test_audioParamExponentialRamp.html] +[test_audioParamGain.html] +[test_audioParamLinearRamp.html] +[test_audioParamSetCurveAtTime.html] +[test_audioParamSetCurveAtTimeTwice.html] +[test_audioParamSetCurveAtTimeZeroDuration.html] +[test_audioParamSetTargetAtTime.html] +[test_audioParamSetTargetAtTimeZeroTimeConstant.html] +[test_audioParamSetValueAtTime.html] +[test_audioParamTimelineDestinationOffset.html] +[test_badConnect.html] +[test_biquadFilterNode.html] +[test_biquadFilterNodePassThrough.html] +[test_biquadFilterNodeWithGain.html] +[test_bug808374.html] +[test_bug827541.html] +[test_bug839753.html] +[test_bug845960.html] +[test_bug856771.html] +[test_bug866570.html] +[test_bug866737.html] +[test_bug867089.html] +[test_bug867104.html] +[test_bug867174.html] +[test_bug867203.html] +[test_bug875221.html] +[test_bug875402.html] +[test_bug894150.html] +[test_bug956489.html] +[test_bug964376.html] +[test_bug966247.html] +tags=capturestream +[test_bug972678.html] +[test_bug1113634.html] +[test_bug1118372.html] +[test_bug1027864.html] +[test_bug1056032.html] +skip-if = toolkit == 'android' # bug 1056706 +[test_bug1255618.html] +[test_bug1267579.html] +[test_channelMergerNode.html] +[test_channelMergerNodeWithVolume.html] +[test_channelSplitterNode.html] +[test_channelSplitterNodeWithVolume.html] +skip-if = (android_version == '18' && debug) # bug 1158417 +[test_convolverNode.html] +[test_convolverNode_mono_mono.html] +[test_convolverNodeChannelCount.html] +[test_convolverNodeDelay.html] +[test_convolverNodeFiniteInfluence.html] +[test_convolverNodePassThrough.html] +[test_convolverNodeWithGain.html] +[test_currentTime.html] +[test_decodeMultichannel.html] +[test_decodeAudioDataPromise.html] +[test_decodeOpusTail.html] +[test_delayNode.html] +[test_delayNodeAtMax.html] +[test_delayNodeChannelChanges.html] +skip-if = toolkit == 'android' # bug 1056706 +[test_delayNodeCycles.html] +[test_delayNodePassThrough.html] +[test_delayNodeSmallMaxDelay.html] +[test_delayNodeTailIncrease.html] +[test_delayNodeTailWithDisconnect.html] +[test_delayNodeTailWithGain.html] +[test_delayNodeTailWithReconnect.html] +[test_delayNodeWithGain.html] +[test_disconnectAll.html] +[test_disconnectAudioParam.html] +[test_disconnectAudioParamFromOutput.html] +[test_disconnectExceptions.html] +[test_disconnectFromAudioNode.html] +[test_disconnectFromAudioNodeAndOutput.html] +[test_disconnectFromAudioNodeAndOutputAndInput.html] +[test_disconnectFromAudioNodeMultipleConnection.html] +[test_disconnectFromOutput.html] +[test_dynamicsCompressorNode.html] +[test_dynamicsCompressorNodePassThrough.html] +[test_dynamicsCompressorNodeWithGain.html] +[test_gainNode.html] +[test_gainNodeInLoop.html] +[test_gainNodePassThrough.html] +[test_iirFilterNodePassThrough.html] +[test_maxChannelCount.html] +[test_mediaDecoding.html] +[test_mediaElementAudioSourceNode.html] +tags=capturestream +[test_mediaElementAudioSourceNodeFidelity.html] +tags=capturestream +[test_mediaElementAudioSourceNodePassThrough.html] +tags=capturestream +skip-if = toolkit == 'android' # bug 1145816 +[test_mediaElementAudioSourceNodeVideo.html] +tags=capturestream +[test_mediaElementAudioSourceNodeCrossOrigin.html] +tags=capturestream +skip-if = toolkit == 'android' # bug 1145816 +[test_mediaStreamAudioDestinationNode.html] +[test_mediaStreamAudioSourceNode.html] +[test_mediaStreamAudioSourceNodeCrossOrigin.html] +tags=capturestream +[test_mediaStreamAudioSourceNodeNoGC.html] +[test_mediaStreamAudioSourceNodePassThrough.html] +[test_mediaStreamAudioSourceNodeResampling.html] +tags=capturestream +[test_mixingRules.html] +skip-if = toolkit == 'android' # bug 1091965 +[test_mozaudiochannel.html] +# Android: bug 1061675; OSX 10.6: bug 1097721 +skip-if = (toolkit == 'android') || (os == 'mac' && os_version == '10.6') +[test_nodeToParamConnection.html] +[test_OfflineAudioContext.html] +[test_offlineDestinationChannelCountLess.html] +[test_offlineDestinationChannelCountMore.html] +[test_oscillatorNode.html] +[test_oscillatorNode2.html] +[test_oscillatorNodeNegativeFrequency.html] +[test_oscillatorNodePassThrough.html] +[test_oscillatorNodeStart.html] +[test_oscillatorTypeChange.html] +[test_pannerNode.html] +[test_pannerNode_equalPower.html] +[test_pannerNodeAbove.html] +[test_pannerNodeAtZeroDistance.html] +[test_pannerNodeChannelCount.html] +[test_pannerNodeHRTFSymmetry.html] +[test_pannerNodeTail.html] +[test_pannerNode_maxDistance.html] +[test_stereoPannerNode.html] +[test_stereoPannerNodePassThrough.html] +[test_periodicWave.html] +[test_periodicWaveDisableNormalization.html] +[test_periodicWaveBandLimiting.html] +[test_ScriptProcessorCollected1.html] +[test_scriptProcessorNode.html] +[test_scriptProcessorNodeChannelCount.html] +[test_scriptProcessorNodePassThrough.html] +[test_scriptProcessorNode_playbackTime1.html] +[test_scriptProcessorNodeZeroInputOutput.html] +[test_scriptProcessorNodeNotConnected.html] +[test_sequentialBufferSourceWithResampling.html] +[test_singleSourceDest.html] +[test_stereoPanningWithGain.html] +[test_waveDecoder.html] +[test_waveShaper.html] +[test_waveShaperGain.html] +[test_waveShaperNoCurve.html] +[test_waveShaperPassThrough.html] +[test_waveShaperInvalidLengthCurve.html] +[test_WebAudioMemoryReporting.html] diff --git a/dom/media/webaudio/test/noaudio.webm b/dom/media/webaudio/test/noaudio.webm new file mode 100644 index 000000000..9207017fb Binary files /dev/null and b/dom/media/webaudio/test/noaudio.webm differ diff --git a/dom/media/webaudio/test/sine-440-10s.opus b/dom/media/webaudio/test/sine-440-10s.opus new file mode 100644 index 000000000..eb9102016 Binary files /dev/null and b/dom/media/webaudio/test/sine-440-10s.opus differ diff --git a/dom/media/webaudio/test/small-shot-expected.wav b/dom/media/webaudio/test/small-shot-expected.wav new file mode 100644 index 000000000..2faaa8258 Binary files /dev/null and b/dom/media/webaudio/test/small-shot-expected.wav differ diff --git a/dom/media/webaudio/test/small-shot-mono-expected.wav b/dom/media/webaudio/test/small-shot-mono-expected.wav new file mode 100644 index 000000000..d4e2647e4 Binary files /dev/null and b/dom/media/webaudio/test/small-shot-mono-expected.wav differ diff --git a/dom/media/webaudio/test/small-shot.mp3 b/dom/media/webaudio/test/small-shot.mp3 new file mode 100644 index 000000000..f9397a510 Binary files /dev/null and b/dom/media/webaudio/test/small-shot.mp3 differ diff --git a/dom/media/webaudio/test/small-shot.ogg b/dom/media/webaudio/test/small-shot.ogg new file mode 100644 index 000000000..1a41623f8 Binary files /dev/null and b/dom/media/webaudio/test/small-shot.ogg differ diff --git a/dom/media/webaudio/test/sweep-300-330-1sec.opus b/dom/media/webaudio/test/sweep-300-330-1sec.opus new file mode 100644 index 000000000..619d1e084 Binary files /dev/null and b/dom/media/webaudio/test/sweep-300-330-1sec.opus differ diff --git a/dom/media/webaudio/test/test_AudioBuffer.html b/dom/media/webaudio/test/test_AudioBuffer.html new file mode 100644 index 000000000..82bfdd420 --- /dev/null +++ b/dom/media/webaudio/test/test_AudioBuffer.html @@ -0,0 +1,105 @@ + + + + Test whether we can create an AudioContext interface + + + + +
+
+
+
+ + diff --git a/dom/media/webaudio/test/test_AudioContext.html b/dom/media/webaudio/test/test_AudioContext.html new file mode 100644 index 000000000..0cab4354e --- /dev/null +++ b/dom/media/webaudio/test/test_AudioContext.html @@ -0,0 +1,23 @@ + + + + Test whether we can create an AudioContext interface + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_AudioContext_disabled.html b/dom/media/webaudio/test/test_AudioContext_disabled.html new file mode 100644 index 000000000..03e0775ed --- /dev/null +++ b/dom/media/webaudio/test/test_AudioContext_disabled.html @@ -0,0 +1,56 @@ + + + + Test whether we can disable the AudioContext interface + + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_AudioListener.html b/dom/media/webaudio/test/test_AudioListener.html new file mode 100644 index 000000000..07ad154d7 --- /dev/null +++ b/dom/media/webaudio/test/test_AudioListener.html @@ -0,0 +1,35 @@ + + + + Test AudioContext.listener and the AudioListener interface + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_AudioNodeDevtoolsAPI.html b/dom/media/webaudio/test/test_AudioNodeDevtoolsAPI.html new file mode 100644 index 000000000..49f71505d --- /dev/null +++ b/dom/media/webaudio/test/test_AudioNodeDevtoolsAPI.html @@ -0,0 +1,59 @@ + + + + Test the devtool AudioNode API + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_AudioParamDevtoolsAPI.html b/dom/media/webaudio/test/test_AudioParamDevtoolsAPI.html new file mode 100644 index 000000000..9b59dda8a --- /dev/null +++ b/dom/media/webaudio/test/test_AudioParamDevtoolsAPI.html @@ -0,0 +1,49 @@ + + + + Test the devtool AudioParam API + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_OfflineAudioContext.html b/dom/media/webaudio/test/test_OfflineAudioContext.html new file mode 100644 index 000000000..81d3e2313 --- /dev/null +++ b/dom/media/webaudio/test/test_OfflineAudioContext.html @@ -0,0 +1,102 @@ + + + + Test OfflineAudioContext + + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_ScriptProcessorCollected1.html b/dom/media/webaudio/test/test_ScriptProcessorCollected1.html new file mode 100644 index 000000000..931f995df --- /dev/null +++ b/dom/media/webaudio/test/test_ScriptProcessorCollected1.html @@ -0,0 +1,84 @@ + + + + Test ScriptProcessorNode in cycle with no listener is collected + + + + + + + + diff --git a/dom/media/webaudio/test/test_WebAudioMemoryReporting.html b/dom/media/webaudio/test/test_WebAudioMemoryReporting.html new file mode 100644 index 000000000..c753756e7 --- /dev/null +++ b/dom/media/webaudio/test/test_WebAudioMemoryReporting.html @@ -0,0 +1,54 @@ + + + + Web Audio memory reporting + + + + + diff --git a/dom/media/webaudio/test/test_analyserNode.html b/dom/media/webaudio/test/test_analyserNode.html new file mode 100644 index 000000000..7af67a5a5 --- /dev/null +++ b/dom/media/webaudio/test/test_analyserNode.html @@ -0,0 +1,103 @@ + + + + Test AnalyserNode + + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_analyserNodeOutput.html b/dom/media/webaudio/test/test_analyserNodeOutput.html new file mode 100644 index 000000000..e6255fee0 --- /dev/null +++ b/dom/media/webaudio/test/test_analyserNodeOutput.html @@ -0,0 +1,43 @@ + + + + Test AnalyserNode + + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_analyserNodePassThrough.html b/dom/media/webaudio/test/test_analyserNodePassThrough.html new file mode 100644 index 000000000..37d1db510 --- /dev/null +++ b/dom/media/webaudio/test/test_analyserNodePassThrough.html @@ -0,0 +1,47 @@ + + + + Test AnalyserNode with passthrough + + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_analyserNodeWithGain.html b/dom/media/webaudio/test/test_analyserNodeWithGain.html new file mode 100644 index 000000000..fa0a2caa7 --- /dev/null +++ b/dom/media/webaudio/test/test_analyserNodeWithGain.html @@ -0,0 +1,47 @@ + +Test effect of AnalyserNode on GainNode output + + + diff --git a/dom/media/webaudio/test/test_analyserScale.html b/dom/media/webaudio/test/test_analyserScale.html new file mode 100644 index 000000000..3aec8d22b --- /dev/null +++ b/dom/media/webaudio/test/test_analyserScale.html @@ -0,0 +1,59 @@ + + + + Test AnalyserNode when the input is scaled + + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_audioBufferSourceNode.html b/dom/media/webaudio/test/test_audioBufferSourceNode.html new file mode 100644 index 000000000..875c96c36 --- /dev/null +++ b/dom/media/webaudio/test/test_audioBufferSourceNode.html @@ -0,0 +1,44 @@ + + + + Test AudioBufferSourceNode + + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_audioBufferSourceNodeDetached.html b/dom/media/webaudio/test/test_audioBufferSourceNodeDetached.html new file mode 100644 index 000000000..4d06c26ca --- /dev/null +++ b/dom/media/webaudio/test/test_audioBufferSourceNodeDetached.html @@ -0,0 +1,58 @@ + + + + Test AudioBufferSourceNode when an AudioBuffer's getChanneData buffer is detached + + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_audioBufferSourceNodeEnded.html b/dom/media/webaudio/test/test_audioBufferSourceNodeEnded.html new file mode 100644 index 000000000..08616bea6 --- /dev/null +++ b/dom/media/webaudio/test/test_audioBufferSourceNodeEnded.html @@ -0,0 +1,36 @@ + + + + Test ended event on AudioBufferSourceNode + + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_audioBufferSourceNodeLazyLoopParam.html b/dom/media/webaudio/test/test_audioBufferSourceNodeLazyLoopParam.html new file mode 100644 index 000000000..0893cf10b --- /dev/null +++ b/dom/media/webaudio/test/test_audioBufferSourceNodeLazyLoopParam.html @@ -0,0 +1,47 @@ + + + + Test AudioBufferSourceNode + + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_audioBufferSourceNodeLoop.html b/dom/media/webaudio/test/test_audioBufferSourceNodeLoop.html new file mode 100644 index 000000000..79c78dfe0 --- /dev/null +++ b/dom/media/webaudio/test/test_audioBufferSourceNodeLoop.html @@ -0,0 +1,45 @@ + + + + Test AudioBufferSourceNode looping + + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_audioBufferSourceNodeLoopStartEnd.html b/dom/media/webaudio/test/test_audioBufferSourceNodeLoopStartEnd.html new file mode 100644 index 000000000..6f60762eb --- /dev/null +++ b/dom/media/webaudio/test/test_audioBufferSourceNodeLoopStartEnd.html @@ -0,0 +1,52 @@ + + + + Test AudioBufferSourceNode looping + + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_audioBufferSourceNodeLoopStartEndSame.html b/dom/media/webaudio/test/test_audioBufferSourceNodeLoopStartEndSame.html new file mode 100644 index 000000000..eca4bf636 --- /dev/null +++ b/dom/media/webaudio/test/test_audioBufferSourceNodeLoopStartEndSame.html @@ -0,0 +1,44 @@ + + + + Test AudioBufferSourceNode looping + + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_audioBufferSourceNodeNoStart.html b/dom/media/webaudio/test/test_audioBufferSourceNodeNoStart.html new file mode 100644 index 000000000..89340ade8 --- /dev/null +++ b/dom/media/webaudio/test/test_audioBufferSourceNodeNoStart.html @@ -0,0 +1,33 @@ + + + + Test AudioBufferSourceNode when start() is not called + + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_audioBufferSourceNodeNullBuffer.html b/dom/media/webaudio/test/test_audioBufferSourceNodeNullBuffer.html new file mode 100644 index 000000000..6ca771af1 --- /dev/null +++ b/dom/media/webaudio/test/test_audioBufferSourceNodeNullBuffer.html @@ -0,0 +1,31 @@ + + + + Test AudioBufferSourceNode + + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_audioBufferSourceNodeOffset.html b/dom/media/webaudio/test/test_audioBufferSourceNodeOffset.html new file mode 100644 index 000000000..b7a16634e --- /dev/null +++ b/dom/media/webaudio/test/test_audioBufferSourceNodeOffset.html @@ -0,0 +1,55 @@ + + + + Test the offset property on AudioBufferSourceNode + + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_audioBufferSourceNodePassThrough.html b/dom/media/webaudio/test/test_audioBufferSourceNodePassThrough.html new file mode 100644 index 000000000..5088f1637 --- /dev/null +++ b/dom/media/webaudio/test/test_audioBufferSourceNodePassThrough.html @@ -0,0 +1,45 @@ + + + + Test AudioBufferSourceNode with passthrough + + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_audioBufferSourceNodeRate.html b/dom/media/webaudio/test/test_audioBufferSourceNodeRate.html new file mode 100644 index 000000000..2cdcd7270 --- /dev/null +++ b/dom/media/webaudio/test/test_audioBufferSourceNodeRate.html @@ -0,0 +1,66 @@ + + + + Test AudioBufferSourceNode + + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_audioContextSuspendResumeClose.html b/dom/media/webaudio/test/test_audioContextSuspendResumeClose.html new file mode 100644 index 000000000..269d5380e --- /dev/null +++ b/dom/media/webaudio/test/test_audioContextSuspendResumeClose.html @@ -0,0 +1,410 @@ + + + + Test suspend, resume and close method of the AudioContext + + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_audioDestinationNode.html b/dom/media/webaudio/test/test_audioDestinationNode.html new file mode 100644 index 000000000..b86c7169d --- /dev/null +++ b/dom/media/webaudio/test/test_audioDestinationNode.html @@ -0,0 +1,26 @@ + + + + Test AudioDestinationNode as EventTarget + + + + + +
+
+
+ + + diff --git a/dom/media/webaudio/test/test_audioParamChaining.html b/dom/media/webaudio/test/test_audioParamChaining.html new file mode 100644 index 000000000..6093e4425 --- /dev/null +++ b/dom/media/webaudio/test/test_audioParamChaining.html @@ -0,0 +1,77 @@ + + + + Test whether we can create an AudioContext interface + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_audioParamExponentialRamp.html b/dom/media/webaudio/test/test_audioParamExponentialRamp.html new file mode 100644 index 000000000..e1b1c5142 --- /dev/null +++ b/dom/media/webaudio/test/test_audioParamExponentialRamp.html @@ -0,0 +1,54 @@ + + + + Test AudioParam.exponentialRampToValue + + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_audioParamGain.html b/dom/media/webaudio/test/test_audioParamGain.html new file mode 100644 index 000000000..b971becce --- /dev/null +++ b/dom/media/webaudio/test/test_audioParamGain.html @@ -0,0 +1,61 @@ + + + + Test AudioParam with pre-gain + + + + + +
+
+
+ diff --git a/dom/media/webaudio/test/test_audioParamLinearRamp.html b/dom/media/webaudio/test/test_audioParamLinearRamp.html new file mode 100644 index 000000000..31f1d80d6 --- /dev/null +++ b/dom/media/webaudio/test/test_audioParamLinearRamp.html @@ -0,0 +1,54 @@ + + + + Test AudioParam.linearRampToValue + + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_audioParamSetCurveAtTime.html b/dom/media/webaudio/test/test_audioParamSetCurveAtTime.html new file mode 100644 index 000000000..bcb655b52 --- /dev/null +++ b/dom/media/webaudio/test/test_audioParamSetCurveAtTime.html @@ -0,0 +1,54 @@ + + + + Test AudioParam.linearRampToValue + + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_audioParamSetCurveAtTimeTwice.html b/dom/media/webaudio/test/test_audioParamSetCurveAtTimeTwice.html new file mode 100644 index 000000000..0f976380e --- /dev/null +++ b/dom/media/webaudio/test/test_audioParamSetCurveAtTimeTwice.html @@ -0,0 +1,68 @@ + + + + Test AudioParam.setValueCurveAtTime twice + + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_audioParamSetCurveAtTimeZeroDuration.html b/dom/media/webaudio/test/test_audioParamSetCurveAtTimeZeroDuration.html new file mode 100644 index 000000000..174c15c6f --- /dev/null +++ b/dom/media/webaudio/test/test_audioParamSetCurveAtTimeZeroDuration.html @@ -0,0 +1,57 @@ + + + + Test AudioParam.linearRampToValue + + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_audioParamSetTargetAtTime.html b/dom/media/webaudio/test/test_audioParamSetTargetAtTime.html new file mode 100644 index 000000000..ccb35ca7b --- /dev/null +++ b/dom/media/webaudio/test/test_audioParamSetTargetAtTime.html @@ -0,0 +1,55 @@ + + + + Test AudioParam.setTargetAtTime + + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_audioParamSetTargetAtTimeZeroTimeConstant.html b/dom/media/webaudio/test/test_audioParamSetTargetAtTimeZeroTimeConstant.html new file mode 100644 index 000000000..bad12ca31 --- /dev/null +++ b/dom/media/webaudio/test/test_audioParamSetTargetAtTimeZeroTimeConstant.html @@ -0,0 +1,55 @@ + + + + Test AudioParam.setTargetAtTime with zero time constant + + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_audioParamSetValueAtTime.html b/dom/media/webaudio/test/test_audioParamSetValueAtTime.html new file mode 100644 index 000000000..1ab515935 --- /dev/null +++ b/dom/media/webaudio/test/test_audioParamSetValueAtTime.html @@ -0,0 +1,52 @@ + + + + Test AudioParam.linearRampToValue + + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_audioParamTimelineDestinationOffset.html b/dom/media/webaudio/test/test_audioParamTimelineDestinationOffset.html new file mode 100644 index 000000000..510beb3c7 --- /dev/null +++ b/dom/media/webaudio/test/test_audioParamTimelineDestinationOffset.html @@ -0,0 +1,45 @@ + + + + Test AudioParam timeline events scheduled after the destination stream has started playback + + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_badConnect.html b/dom/media/webaudio/test/test_badConnect.html new file mode 100644 index 000000000..b0d7c8f0c --- /dev/null +++ b/dom/media/webaudio/test/test_badConnect.html @@ -0,0 +1,48 @@ + + + + Test whether we can create an AudioContext interface + + + + +
+
+
+
+ + diff --git a/dom/media/webaudio/test/test_biquadFilterNode.html b/dom/media/webaudio/test/test_biquadFilterNode.html new file mode 100644 index 000000000..078f89179 --- /dev/null +++ b/dom/media/webaudio/test/test_biquadFilterNode.html @@ -0,0 +1,86 @@ + + + + Test BiquadFilterNode + + + + +
+
+
+
+ + diff --git a/dom/media/webaudio/test/test_biquadFilterNodePassThrough.html b/dom/media/webaudio/test/test_biquadFilterNodePassThrough.html new file mode 100644 index 000000000..59fc8ab4f --- /dev/null +++ b/dom/media/webaudio/test/test_biquadFilterNodePassThrough.html @@ -0,0 +1,47 @@ + + + + Test BiquadFilterNode with passthrough + + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_biquadFilterNodeWithGain.html b/dom/media/webaudio/test/test_biquadFilterNodeWithGain.html new file mode 100644 index 000000000..390f2cdb0 --- /dev/null +++ b/dom/media/webaudio/test/test_biquadFilterNodeWithGain.html @@ -0,0 +1,61 @@ + + + + Test BiquadFilterNode after a GainNode and tail - Bugs 924286 and 924288 + + + + +
+
+
+
+ + diff --git a/dom/media/webaudio/test/test_bug1027864.html b/dom/media/webaudio/test/test_bug1027864.html new file mode 100644 index 000000000..0c115d1a0 --- /dev/null +++ b/dom/media/webaudio/test/test_bug1027864.html @@ -0,0 +1,74 @@ + + + + Test bug 1027864 + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_bug1056032.html b/dom/media/webaudio/test/test_bug1056032.html new file mode 100644 index 000000000..98fb159f7 --- /dev/null +++ b/dom/media/webaudio/test/test_bug1056032.html @@ -0,0 +1,35 @@ + + + + + Test that we can decode an mp3 (bug 1056032) + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_bug1113634.html b/dom/media/webaudio/test/test_bug1113634.html new file mode 100644 index 000000000..8995589f3 --- /dev/null +++ b/dom/media/webaudio/test/test_bug1113634.html @@ -0,0 +1,54 @@ + + + + Test AudioParam.setTargetAtTime where the target time is the same as the time of a previous event + + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_bug1118372.html b/dom/media/webaudio/test/test_bug1118372.html new file mode 100644 index 000000000..ca3fc6b0d --- /dev/null +++ b/dom/media/webaudio/test/test_bug1118372.html @@ -0,0 +1,46 @@ + + + + Test WaveShaperNode with no curve + + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_bug1255618.html b/dom/media/webaudio/test/test_bug1255618.html new file mode 100644 index 000000000..246a04438 --- /dev/null +++ b/dom/media/webaudio/test/test_bug1255618.html @@ -0,0 +1,41 @@ + + + + Test sync XHR does not crash unlinked AudioContext + + + + + + diff --git a/dom/media/webaudio/test/test_bug1267579.html b/dom/media/webaudio/test/test_bug1267579.html new file mode 100644 index 000000000..62eda14dc --- /dev/null +++ b/dom/media/webaudio/test/test_bug1267579.html @@ -0,0 +1,46 @@ + + + + Test that PeriodicWave handles fundamental fequency of zero + + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_bug808374.html b/dom/media/webaudio/test/test_bug808374.html new file mode 100644 index 000000000..cc4e02f41 --- /dev/null +++ b/dom/media/webaudio/test/test_bug808374.html @@ -0,0 +1,22 @@ + + + + Crashtest for bug 808374 + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_bug827541.html b/dom/media/webaudio/test/test_bug827541.html new file mode 100644 index 000000000..9940c112e --- /dev/null +++ b/dom/media/webaudio/test/test_bug827541.html @@ -0,0 +1,22 @@ + + + + Tell the cycle collector about the audio contexts owned by nsGlobalWindow + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_bug839753.html b/dom/media/webaudio/test/test_bug839753.html new file mode 100644 index 000000000..bbab10b25 --- /dev/null +++ b/dom/media/webaudio/test/test_bug839753.html @@ -0,0 +1,18 @@ + + + + Crashtest for bug 839753 + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_bug845960.html b/dom/media/webaudio/test/test_bug845960.html new file mode 100644 index 000000000..4e37f91bf --- /dev/null +++ b/dom/media/webaudio/test/test_bug845960.html @@ -0,0 +1,18 @@ + + + + Crashtest for bug 845960 + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_bug856771.html b/dom/media/webaudio/test/test_bug856771.html new file mode 100644 index 000000000..8a6e622c2 --- /dev/null +++ b/dom/media/webaudio/test/test_bug856771.html @@ -0,0 +1,26 @@ + + + + Test for bug 856771 + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_bug866570.html b/dom/media/webaudio/test/test_bug866570.html new file mode 100644 index 000000000..0a1feca61 --- /dev/null +++ b/dom/media/webaudio/test/test_bug866570.html @@ -0,0 +1,18 @@ + + + + Crashtest for bug 859600 + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_bug866737.html b/dom/media/webaudio/test/test_bug866737.html new file mode 100644 index 000000000..40fcf83fd --- /dev/null +++ b/dom/media/webaudio/test/test_bug866737.html @@ -0,0 +1,36 @@ + + + + Test for bug 866737 + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_bug867089.html b/dom/media/webaudio/test/test_bug867089.html new file mode 100644 index 000000000..650676a44 --- /dev/null +++ b/dom/media/webaudio/test/test_bug867089.html @@ -0,0 +1,43 @@ + + + + Crashtest for bug 867089 + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_bug867104.html b/dom/media/webaudio/test/test_bug867104.html new file mode 100644 index 000000000..82852ba51 --- /dev/null +++ b/dom/media/webaudio/test/test_bug867104.html @@ -0,0 +1,34 @@ + + + + Crashtest for bug 867104 + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_bug867174.html b/dom/media/webaudio/test/test_bug867174.html new file mode 100644 index 000000000..ce88be1b3 --- /dev/null +++ b/dom/media/webaudio/test/test_bug867174.html @@ -0,0 +1,38 @@ + + + + Crashtest for bug 867174 + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_bug867203.html b/dom/media/webaudio/test/test_bug867203.html new file mode 100644 index 000000000..0ca31263d --- /dev/null +++ b/dom/media/webaudio/test/test_bug867203.html @@ -0,0 +1,34 @@ + + + + Crashtest for bug 867203 + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_bug875221.html b/dom/media/webaudio/test/test_bug875221.html new file mode 100644 index 000000000..16560ae75 --- /dev/null +++ b/dom/media/webaudio/test/test_bug875221.html @@ -0,0 +1,239 @@ + + + + Crashtest for bug 875221 + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_bug875402.html b/dom/media/webaudio/test/test_bug875402.html new file mode 100644 index 000000000..2dc347fc1 --- /dev/null +++ b/dom/media/webaudio/test/test_bug875402.html @@ -0,0 +1,47 @@ + + + + Crashtest for bug 875402 + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_bug894150.html b/dom/media/webaudio/test/test_bug894150.html new file mode 100644 index 000000000..08fd72413 --- /dev/null +++ b/dom/media/webaudio/test/test_bug894150.html @@ -0,0 +1,21 @@ + + + + Test whether we can create an AudioContext interface + + + + + + diff --git a/dom/media/webaudio/test/test_bug956489.html b/dom/media/webaudio/test/test_bug956489.html new file mode 100644 index 000000000..920889290 --- /dev/null +++ b/dom/media/webaudio/test/test_bug956489.html @@ -0,0 +1,56 @@ + + + + Test when and currentTime are in the same coordinate system + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_bug964376.html b/dom/media/webaudio/test/test_bug964376.html new file mode 100644 index 000000000..1d9af1c1e --- /dev/null +++ b/dom/media/webaudio/test/test_bug964376.html @@ -0,0 +1,64 @@ + + + + Test repeating audio is not distorted + + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_bug966247.html b/dom/media/webaudio/test/test_bug966247.html new file mode 100644 index 000000000..9224ac2d4 --- /dev/null +++ b/dom/media/webaudio/test/test_bug966247.html @@ -0,0 +1,46 @@ + + + + Test whether an audio file played with a volume set to 0 plays silence + + + + + + + + diff --git a/dom/media/webaudio/test/test_bug972678.html b/dom/media/webaudio/test/test_bug972678.html new file mode 100644 index 000000000..d0cb4e419 --- /dev/null +++ b/dom/media/webaudio/test/test_bug972678.html @@ -0,0 +1,62 @@ + + + + Test buffers do not interfere when scheduled in sequence + + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_channelMergerNode.html b/dom/media/webaudio/test/test_channelMergerNode.html new file mode 100644 index 000000000..a76aaa2e8 --- /dev/null +++ b/dom/media/webaudio/test/test_channelMergerNode.html @@ -0,0 +1,57 @@ + + + + Test ChannelMergerNode + + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_channelMergerNodeWithVolume.html b/dom/media/webaudio/test/test_channelMergerNodeWithVolume.html new file mode 100644 index 000000000..22f0a39cb --- /dev/null +++ b/dom/media/webaudio/test/test_channelMergerNodeWithVolume.html @@ -0,0 +1,60 @@ + + + + Test ChannelMergerNode + + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_channelSplitterNode.html b/dom/media/webaudio/test/test_channelSplitterNode.html new file mode 100644 index 000000000..30cb0028c --- /dev/null +++ b/dom/media/webaudio/test/test_channelSplitterNode.html @@ -0,0 +1,71 @@ + + + + Test ChannelSplitterNode + + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_channelSplitterNodeWithVolume.html b/dom/media/webaudio/test/test_channelSplitterNodeWithVolume.html new file mode 100644 index 000000000..8e16271f3 --- /dev/null +++ b/dom/media/webaudio/test/test_channelSplitterNodeWithVolume.html @@ -0,0 +1,76 @@ + + + + Test ChannelSplitterNode + + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_convolverNode.html b/dom/media/webaudio/test/test_convolverNode.html new file mode 100644 index 000000000..38b58bd9b --- /dev/null +++ b/dom/media/webaudio/test/test_convolverNode.html @@ -0,0 +1,32 @@ + + + + Test the ConvolverNode interface + + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_convolverNodeChannelCount.html b/dom/media/webaudio/test/test_convolverNodeChannelCount.html new file mode 100644 index 000000000..d5b261c81 --- /dev/null +++ b/dom/media/webaudio/test/test_convolverNodeChannelCount.html @@ -0,0 +1,61 @@ + + + + Test ConvolverNode channel count + + + + +
+
+
+
+ + diff --git a/dom/media/webaudio/test/test_convolverNodeDelay.html b/dom/media/webaudio/test/test_convolverNodeDelay.html new file mode 100644 index 000000000..2e8caf802 --- /dev/null +++ b/dom/media/webaudio/test/test_convolverNodeDelay.html @@ -0,0 +1,72 @@ + +Test convolution to delay a triangle pulse + + + diff --git a/dom/media/webaudio/test/test_convolverNodeFiniteInfluence.html b/dom/media/webaudio/test/test_convolverNodeFiniteInfluence.html new file mode 100644 index 000000000..1cfb51ce8 --- /dev/null +++ b/dom/media/webaudio/test/test_convolverNodeFiniteInfluence.html @@ -0,0 +1,44 @@ + +Test convolution effect has finite duration + + + diff --git a/dom/media/webaudio/test/test_convolverNodePassThrough.html b/dom/media/webaudio/test/test_convolverNodePassThrough.html new file mode 100644 index 000000000..d5f9ef8ab --- /dev/null +++ b/dom/media/webaudio/test/test_convolverNodePassThrough.html @@ -0,0 +1,48 @@ + + + + Test ConvolverNode with passthrough + + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_convolverNodeWithGain.html b/dom/media/webaudio/test/test_convolverNodeWithGain.html new file mode 100644 index 000000000..7bbe24089 --- /dev/null +++ b/dom/media/webaudio/test/test_convolverNodeWithGain.html @@ -0,0 +1,62 @@ + + + + Test ConvolverNode after a GainNode - Bug 891254 + + + + +
+
+
+
+ + diff --git a/dom/media/webaudio/test/test_convolverNode_mono_mono.html b/dom/media/webaudio/test/test_convolverNode_mono_mono.html new file mode 100644 index 000000000..f7da2b020 --- /dev/null +++ b/dom/media/webaudio/test/test_convolverNode_mono_mono.html @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + +
+
+ + + + + + diff --git a/dom/media/webaudio/test/test_currentTime.html b/dom/media/webaudio/test/test_currentTime.html new file mode 100644 index 000000000..bb015e5e2 --- /dev/null +++ b/dom/media/webaudio/test/test_currentTime.html @@ -0,0 +1,26 @@ + + + + Test AudioContext.currentTime + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_decodeAudioDataPromise.html b/dom/media/webaudio/test/test_decodeAudioDataPromise.html new file mode 100644 index 000000000..d07f55936 --- /dev/null +++ b/dom/media/webaudio/test/test_decodeAudioDataPromise.html @@ -0,0 +1,62 @@ + + + + Test the decodeAudioData API with Promise + + + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_decodeMultichannel.html b/dom/media/webaudio/test/test_decodeMultichannel.html new file mode 100644 index 000000000..0fb2f5b3c --- /dev/null +++ b/dom/media/webaudio/test/test_decodeMultichannel.html @@ -0,0 +1,58 @@ + + + + + Test that we can decode 4 channel wave file in webaudio, but not in <audio> + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_decodeOpusTail.html b/dom/media/webaudio/test/test_decodeOpusTail.html new file mode 100644 index 000000000..b5b53f685 --- /dev/null +++ b/dom/media/webaudio/test/test_decodeOpusTail.html @@ -0,0 +1,28 @@ + + + + + Regression test to check that opus files don't have a tail at the end. + + + + +
+
diff --git a/dom/media/webaudio/test/test_delayNode.html b/dom/media/webaudio/test/test_delayNode.html
new file mode 100644
index 000000000..a3e314ef7
--- /dev/null
+++ b/dom/media/webaudio/test/test_delayNode.html
@@ -0,0 +1,74 @@
+
+
+
+  Test DelayNode
+  
+  
+
+
+
+
+
+
+ + diff --git a/dom/media/webaudio/test/test_delayNodeAtMax.html b/dom/media/webaudio/test/test_delayNodeAtMax.html new file mode 100644 index 000000000..6c7dde3d1 --- /dev/null +++ b/dom/media/webaudio/test/test_delayNodeAtMax.html @@ -0,0 +1,53 @@ + + + + Test DelayNode with maxDelayTime delay - bug 890528 + + + + +
+
+
+
+ + diff --git a/dom/media/webaudio/test/test_delayNodeChannelChanges.html b/dom/media/webaudio/test/test_delayNodeChannelChanges.html new file mode 100644 index 000000000..229bfd069 --- /dev/null +++ b/dom/media/webaudio/test/test_delayNodeChannelChanges.html @@ -0,0 +1,98 @@ + + + + test DelayNode channel count changes + + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_delayNodeCycles.html b/dom/media/webaudio/test/test_delayNodeCycles.html new file mode 100644 index 000000000..f5f2e6786 --- /dev/null +++ b/dom/media/webaudio/test/test_delayNodeCycles.html @@ -0,0 +1,157 @@ + + + + Test the support of cycles. + + + + + +
+
+
+
+ + diff --git a/dom/media/webaudio/test/test_delayNodePassThrough.html b/dom/media/webaudio/test/test_delayNodePassThrough.html new file mode 100644 index 000000000..4945ee95c --- /dev/null +++ b/dom/media/webaudio/test/test_delayNodePassThrough.html @@ -0,0 +1,53 @@ + + + + Test DelayNode + + + + +
+
+
+
+ + diff --git a/dom/media/webaudio/test/test_delayNodeSmallMaxDelay.html b/dom/media/webaudio/test/test_delayNodeSmallMaxDelay.html new file mode 100644 index 000000000..b9cee458d --- /dev/null +++ b/dom/media/webaudio/test/test_delayNodeSmallMaxDelay.html @@ -0,0 +1,43 @@ + + + + Test DelayNode + + + + +
+
+
+
+ + diff --git a/dom/media/webaudio/test/test_delayNodeTailIncrease.html b/dom/media/webaudio/test/test_delayNodeTailIncrease.html new file mode 100644 index 000000000..751602824 --- /dev/null +++ b/dom/media/webaudio/test/test_delayNodeTailIncrease.html @@ -0,0 +1,71 @@ + + + + Test increasing delay of DelayNode after input finishes + + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_delayNodeTailWithDisconnect.html b/dom/media/webaudio/test/test_delayNodeTailWithDisconnect.html new file mode 100644 index 000000000..fa431d61b --- /dev/null +++ b/dom/media/webaudio/test/test_delayNodeTailWithDisconnect.html @@ -0,0 +1,95 @@ + + + + Test tail time lifetime of DelayNode after input is disconnected + + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_delayNodeTailWithGain.html b/dom/media/webaudio/test/test_delayNodeTailWithGain.html new file mode 100644 index 000000000..6994a7f9d --- /dev/null +++ b/dom/media/webaudio/test/test_delayNodeTailWithGain.html @@ -0,0 +1,72 @@ + + + + Test tail time lifetime of DelayNode indirectly connected to source + + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_delayNodeTailWithReconnect.html b/dom/media/webaudio/test/test_delayNodeTailWithReconnect.html new file mode 100644 index 000000000..6c1cda580 --- /dev/null +++ b/dom/media/webaudio/test/test_delayNodeTailWithReconnect.html @@ -0,0 +1,136 @@ + + + + Test tail time lifetime of DelayNode after input finishes and new input added + + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_delayNodeWithGain.html b/dom/media/webaudio/test/test_delayNodeWithGain.html new file mode 100644 index 000000000..768bea77c --- /dev/null +++ b/dom/media/webaudio/test/test_delayNodeWithGain.html @@ -0,0 +1,54 @@ + + + + Test DelayNode with a GainNode + + + + +
+
+
+
+ + diff --git a/dom/media/webaudio/test/test_disconnectAll.html b/dom/media/webaudio/test/test_disconnectAll.html new file mode 100644 index 000000000..9d3af066e --- /dev/null +++ b/dom/media/webaudio/test/test_disconnectAll.html @@ -0,0 +1,51 @@ + + + + Test whether we can disconnect an AudioNode + + + + + +
+      
+    
+ + \ No newline at end of file diff --git a/dom/media/webaudio/test/test_disconnectAudioParam.html b/dom/media/webaudio/test/test_disconnectAudioParam.html new file mode 100644 index 000000000..1f4e79c56 --- /dev/null +++ b/dom/media/webaudio/test/test_disconnectAudioParam.html @@ -0,0 +1,58 @@ + + + + Test whether we can disconnect an AudioParam + + + + + +
+      
+    
+ + diff --git a/dom/media/webaudio/test/test_disconnectAudioParamFromOutput.html b/dom/media/webaudio/test/test_disconnectAudioParamFromOutput.html new file mode 100644 index 000000000..a08ffa53b --- /dev/null +++ b/dom/media/webaudio/test/test_disconnectAudioParamFromOutput.html @@ -0,0 +1,67 @@ + + + + Test whether we can disconnect an AudioParam + + + + + +
+      
+    
+ + diff --git a/dom/media/webaudio/test/test_disconnectExceptions.html b/dom/media/webaudio/test/test_disconnectExceptions.html new file mode 100644 index 000000000..ceba972c9 --- /dev/null +++ b/dom/media/webaudio/test/test_disconnectExceptions.html @@ -0,0 +1,75 @@ + + + + Test whether we can disconnect an AudioNode + + + + + +
+      
+    
+ + diff --git a/dom/media/webaudio/test/test_disconnectFromAudioNode.html b/dom/media/webaudio/test/test_disconnectFromAudioNode.html new file mode 100644 index 000000000..931195146 --- /dev/null +++ b/dom/media/webaudio/test/test_disconnectFromAudioNode.html @@ -0,0 +1,55 @@ + + + + Test whether we can disconnect an AudioNode + + + + + +
+      
+    
+ + diff --git a/dom/media/webaudio/test/test_disconnectFromAudioNodeAndOutput.html b/dom/media/webaudio/test/test_disconnectFromAudioNodeAndOutput.html new file mode 100644 index 000000000..5c4e3ee5d --- /dev/null +++ b/dom/media/webaudio/test/test_disconnectFromAudioNodeAndOutput.html @@ -0,0 +1,59 @@ + + + + Test whether we can disconnect an AudioNode + + + + + +
+      
+    
+ + diff --git a/dom/media/webaudio/test/test_disconnectFromAudioNodeAndOutputAndInput.html b/dom/media/webaudio/test/test_disconnectFromAudioNodeAndOutputAndInput.html new file mode 100644 index 000000000..6526cf65b --- /dev/null +++ b/dom/media/webaudio/test/test_disconnectFromAudioNodeAndOutputAndInput.html @@ -0,0 +1,57 @@ + + + + Test whether we can disconnect an AudioNode + + + + + +
+      
+    
+ + \ No newline at end of file diff --git a/dom/media/webaudio/test/test_disconnectFromAudioNodeMultipleConnection.html b/dom/media/webaudio/test/test_disconnectFromAudioNodeMultipleConnection.html new file mode 100644 index 000000000..746b7ba93 --- /dev/null +++ b/dom/media/webaudio/test/test_disconnectFromAudioNodeMultipleConnection.html @@ -0,0 +1,56 @@ + + + + + Test whether we can disconnect all outbound connection of an AudioNode + + + + + + +
+      
+    
+ + diff --git a/dom/media/webaudio/test/test_disconnectFromOutput.html b/dom/media/webaudio/test/test_disconnectFromOutput.html new file mode 100644 index 000000000..8a6daf5c7 --- /dev/null +++ b/dom/media/webaudio/test/test_disconnectFromOutput.html @@ -0,0 +1,54 @@ + + + + Test whether we can disconnect an AudioNode + + + + + +
+      
+    
+ + \ No newline at end of file diff --git a/dom/media/webaudio/test/test_dynamicsCompressorNode.html b/dom/media/webaudio/test/test_dynamicsCompressorNode.html new file mode 100644 index 000000000..052b27671 --- /dev/null +++ b/dom/media/webaudio/test/test_dynamicsCompressorNode.html @@ -0,0 +1,70 @@ + + + + Test DynamicsCompressorNode + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_dynamicsCompressorNodePassThrough.html b/dom/media/webaudio/test/test_dynamicsCompressorNodePassThrough.html new file mode 100644 index 000000000..1be838a4e --- /dev/null +++ b/dom/media/webaudio/test/test_dynamicsCompressorNodePassThrough.html @@ -0,0 +1,47 @@ + + + + Test DynamicsCompressorNode with passthrough + + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_dynamicsCompressorNodeWithGain.html b/dom/media/webaudio/test/test_dynamicsCompressorNodeWithGain.html new file mode 100644 index 000000000..2e4b38ea5 --- /dev/null +++ b/dom/media/webaudio/test/test_dynamicsCompressorNodeWithGain.html @@ -0,0 +1,51 @@ + + + + + Test DynamicsCompressor with Gain + + + + + +
+
+ diff --git a/dom/media/webaudio/test/test_gainNode.html b/dom/media/webaudio/test/test_gainNode.html new file mode 100644 index 000000000..41b19fda0 --- /dev/null +++ b/dom/media/webaudio/test/test_gainNode.html @@ -0,0 +1,57 @@ + + + + Test GainNode + + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_gainNodeInLoop.html b/dom/media/webaudio/test/test_gainNodeInLoop.html new file mode 100644 index 000000000..6b32cbcfa --- /dev/null +++ b/dom/media/webaudio/test/test_gainNodeInLoop.html @@ -0,0 +1,48 @@ + + + + Test GainNode in presence of loops + + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_gainNodePassThrough.html b/dom/media/webaudio/test/test_gainNodePassThrough.html new file mode 100644 index 000000000..2a7cd6bf4 --- /dev/null +++ b/dom/media/webaudio/test/test_gainNodePassThrough.html @@ -0,0 +1,49 @@ + + + + Test GainNode with passthrough + + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_iirFilterNodePassThrough.html b/dom/media/webaudio/test/test_iirFilterNodePassThrough.html new file mode 100644 index 000000000..7773a5b82 --- /dev/null +++ b/dom/media/webaudio/test/test_iirFilterNodePassThrough.html @@ -0,0 +1,47 @@ + + + + Test IIRFilterNode with passthrough + + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_maxChannelCount.html b/dom/media/webaudio/test/test_maxChannelCount.html new file mode 100644 index 000000000..319e2bf1e --- /dev/null +++ b/dom/media/webaudio/test/test_maxChannelCount.html @@ -0,0 +1,38 @@ + + + + Test the AudioContext.destination interface + + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_mediaDecoding.html b/dom/media/webaudio/test/test_mediaDecoding.html new file mode 100644 index 000000000..07e18162b --- /dev/null +++ b/dom/media/webaudio/test/test_mediaDecoding.html @@ -0,0 +1,367 @@ + + + + Test the decodeAudioData API and Resampling + + + + +
+
+
+
+
+ + diff --git a/dom/media/webaudio/test/test_mediaElementAudioSourceNode.html b/dom/media/webaudio/test/test_mediaElementAudioSourceNode.html new file mode 100644 index 000000000..3e196735f --- /dev/null +++ b/dom/media/webaudio/test/test_mediaElementAudioSourceNode.html @@ -0,0 +1,74 @@ + + + + + Test MediaElementAudioSourceNode + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_mediaElementAudioSourceNodeCrossOrigin.html b/dom/media/webaudio/test/test_mediaElementAudioSourceNodeCrossOrigin.html new file mode 100644 index 000000000..7e03b7079 --- /dev/null +++ b/dom/media/webaudio/test/test_mediaElementAudioSourceNodeCrossOrigin.html @@ -0,0 +1,94 @@ + + + + + Test MediaStreamAudioSourceNode doesn't get data from cross-origin media resources + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_mediaElementAudioSourceNodeFidelity.html b/dom/media/webaudio/test/test_mediaElementAudioSourceNodeFidelity.html new file mode 100644 index 000000000..8d3b0ed46 --- /dev/null +++ b/dom/media/webaudio/test/test_mediaElementAudioSourceNodeFidelity.html @@ -0,0 +1,128 @@ + + + + + Test MediaStreamAudioSourceNode doesn't get data from cross-origin media resources + + + + +
+
diff --git a/dom/media/webaudio/test/test_mediaElementAudioSourceNodePassThrough.html b/dom/media/webaudio/test/test_mediaElementAudioSourceNodePassThrough.html
new file mode 100644
index 000000000..1bb0ad9ec
--- /dev/null
+++ b/dom/media/webaudio/test/test_mediaElementAudioSourceNodePassThrough.html
@@ -0,0 +1,66 @@
+
+
+
+
+  Test MediaElementAudioSourceNode with passthrough
+  
+  
+
+
+
+
+
+ + diff --git a/dom/media/webaudio/test/test_mediaElementAudioSourceNodeVideo.html b/dom/media/webaudio/test/test_mediaElementAudioSourceNodeVideo.html new file mode 100644 index 000000000..ad0b355b1 --- /dev/null +++ b/dom/media/webaudio/test/test_mediaElementAudioSourceNodeVideo.html @@ -0,0 +1,70 @@ + + + + + Test MediaElementAudioSourceNode before "loadedmetadata" + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_mediaStreamAudioDestinationNode.html b/dom/media/webaudio/test/test_mediaStreamAudioDestinationNode.html new file mode 100644 index 000000000..5aa1a7910 --- /dev/null +++ b/dom/media/webaudio/test/test_mediaStreamAudioDestinationNode.html @@ -0,0 +1,50 @@ + + + + Test MediaStreamAudioDestinationNode + + + + + +
+
+
diff --git a/dom/media/webaudio/test/test_mediaStreamAudioSourceNode.html b/dom/media/webaudio/test/test_mediaStreamAudioSourceNode.html
new file mode 100644
index 000000000..85d96d3e8
--- /dev/null
+++ b/dom/media/webaudio/test/test_mediaStreamAudioSourceNode.html
@@ -0,0 +1,50 @@
+
+
+
+
+  Test MediaStreamAudioSourceNode processing is correct
+  
+  
+  
+
+
+
+
+
+ + diff --git a/dom/media/webaudio/test/test_mediaStreamAudioSourceNodeCrossOrigin.html b/dom/media/webaudio/test/test_mediaStreamAudioSourceNodeCrossOrigin.html new file mode 100644 index 000000000..f3cc0334a --- /dev/null +++ b/dom/media/webaudio/test/test_mediaStreamAudioSourceNodeCrossOrigin.html @@ -0,0 +1,57 @@ + + + + + Test MediaStreamAudioSourceNode doesn't get data from cross-origin media resources + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_mediaStreamAudioSourceNodeNoGC.html b/dom/media/webaudio/test/test_mediaStreamAudioSourceNodeNoGC.html new file mode 100644 index 000000000..7a9b6c4a6 --- /dev/null +++ b/dom/media/webaudio/test/test_mediaStreamAudioSourceNodeNoGC.html @@ -0,0 +1,89 @@ + + + + + Test that MediaStreamAudioSourceNode and its input MediaStream stays alive while there are active tracks + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_mediaStreamAudioSourceNodePassThrough.html b/dom/media/webaudio/test/test_mediaStreamAudioSourceNodePassThrough.html new file mode 100644 index 000000000..d2c22600a --- /dev/null +++ b/dom/media/webaudio/test/test_mediaStreamAudioSourceNodePassThrough.html @@ -0,0 +1,55 @@ + + + + + Test MediaStreamAudioSourceNode passthrough + + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_mediaStreamAudioSourceNodeResampling.html b/dom/media/webaudio/test/test_mediaStreamAudioSourceNodeResampling.html new file mode 100644 index 000000000..4a4f03c53 --- /dev/null +++ b/dom/media/webaudio/test/test_mediaStreamAudioSourceNodeResampling.html @@ -0,0 +1,74 @@ + + + + + Test MediaStreamAudioSourceNode processing is correct + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_mixingRules.html b/dom/media/webaudio/test/test_mixingRules.html new file mode 100644 index 000000000..0bdcff87e --- /dev/null +++ b/dom/media/webaudio/test/test_mixingRules.html @@ -0,0 +1,401 @@ + + + + Testcase for AudioNode channel up-mix/down-mix rules + + + + + + + + + + + diff --git a/dom/media/webaudio/test/test_mozaudiochannel.html b/dom/media/webaudio/test/test_mozaudiochannel.html new file mode 100644 index 000000000..6ba14347b --- /dev/null +++ b/dom/media/webaudio/test/test_mozaudiochannel.html @@ -0,0 +1,151 @@ + + + + Test for mozaudiochannel + + + + + +

+
+
+
+ + diff --git a/dom/media/webaudio/test/test_nodeToParamConnection.html b/dom/media/webaudio/test/test_nodeToParamConnection.html new file mode 100644 index 000000000..4525923db --- /dev/null +++ b/dom/media/webaudio/test/test_nodeToParamConnection.html @@ -0,0 +1,60 @@ + + + + Test connecting an AudioNode to an AudioParam + + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_offlineDestinationChannelCountLess.html b/dom/media/webaudio/test/test_offlineDestinationChannelCountLess.html new file mode 100644 index 000000000..675106697 --- /dev/null +++ b/dom/media/webaudio/test/test_offlineDestinationChannelCountLess.html @@ -0,0 +1,42 @@ + + + + Test OfflineAudioContext with a channel count less than the specified number + + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_offlineDestinationChannelCountMore.html b/dom/media/webaudio/test/test_offlineDestinationChannelCountMore.html new file mode 100644 index 000000000..7c7d5c8e5 --- /dev/null +++ b/dom/media/webaudio/test/test_offlineDestinationChannelCountMore.html @@ -0,0 +1,46 @@ + + + + Test OfflineAudioContext with a channel count less than the specified number + + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_oscillatorNode.html b/dom/media/webaudio/test/test_oscillatorNode.html new file mode 100644 index 000000000..5eb488574 --- /dev/null +++ b/dom/media/webaudio/test/test_oscillatorNode.html @@ -0,0 +1,60 @@ + + + + Test the OscillatorNode interface + + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_oscillatorNode2.html b/dom/media/webaudio/test/test_oscillatorNode2.html new file mode 100644 index 000000000..1ddae937c --- /dev/null +++ b/dom/media/webaudio/test/test_oscillatorNode2.html @@ -0,0 +1,53 @@ + + + + Test OscillatorNode lifetime and sine phase + + + + +
+
+
+
+ + diff --git a/dom/media/webaudio/test/test_oscillatorNodeNegativeFrequency.html b/dom/media/webaudio/test/test_oscillatorNodeNegativeFrequency.html new file mode 100644 index 000000000..8acc025da --- /dev/null +++ b/dom/media/webaudio/test/test_oscillatorNodeNegativeFrequency.html @@ -0,0 +1,50 @@ + + + + Test the OscillatorNode when the frequency is negative + + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_oscillatorNodePassThrough.html b/dom/media/webaudio/test/test_oscillatorNodePassThrough.html new file mode 100644 index 000000000..c732bb273 --- /dev/null +++ b/dom/media/webaudio/test/test_oscillatorNodePassThrough.html @@ -0,0 +1,43 @@ + + + + Test Oscillator with passthrough + + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_oscillatorNodeStart.html b/dom/media/webaudio/test/test_oscillatorNodeStart.html new file mode 100644 index 000000000..c43219c99 --- /dev/null +++ b/dom/media/webaudio/test/test_oscillatorNodeStart.html @@ -0,0 +1,38 @@ + + + + Test the OscillatorNode interface + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_oscillatorTypeChange.html b/dom/media/webaudio/test/test_oscillatorTypeChange.html new file mode 100644 index 000000000..aaf311a0c --- /dev/null +++ b/dom/media/webaudio/test/test_oscillatorTypeChange.html @@ -0,0 +1,58 @@ + + + + Test OscillatorNode type change after it has started and triangle phase + + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_pannerNode.html b/dom/media/webaudio/test/test_pannerNode.html new file mode 100644 index 000000000..374ad3421 --- /dev/null +++ b/dom/media/webaudio/test/test_pannerNode.html @@ -0,0 +1,73 @@ + + + + Test PannerNode + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_pannerNodeAbove.html b/dom/media/webaudio/test/test_pannerNodeAbove.html new file mode 100644 index 000000000..6bab394e6 --- /dev/null +++ b/dom/media/webaudio/test/test_pannerNodeAbove.html @@ -0,0 +1,50 @@ + + + + Test PannerNode directly above + + + + +
+
+
+
+ + diff --git a/dom/media/webaudio/test/test_pannerNodeAtZeroDistance.html b/dom/media/webaudio/test/test_pannerNodeAtZeroDistance.html new file mode 100644 index 000000000..21abd2b60 --- /dev/null +++ b/dom/media/webaudio/test/test_pannerNodeAtZeroDistance.html @@ -0,0 +1,86 @@ + + + + Test PannerNode produces output even when the even when the distance is from the listener is zero + + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_pannerNodeChannelCount.html b/dom/media/webaudio/test/test_pannerNodeChannelCount.html new file mode 100644 index 000000000..63a52ea0c --- /dev/null +++ b/dom/media/webaudio/test/test_pannerNodeChannelCount.html @@ -0,0 +1,52 @@ + + + + Test PannerNode directly above + + + + +
+
+
+
+ + diff --git a/dom/media/webaudio/test/test_pannerNodeHRTFSymmetry.html b/dom/media/webaudio/test/test_pannerNodeHRTFSymmetry.html new file mode 100644 index 000000000..c5312d042 --- /dev/null +++ b/dom/media/webaudio/test/test_pannerNodeHRTFSymmetry.html @@ -0,0 +1,106 @@ + + + + Test left/right symmetry and block-offset invariance of HRTF panner + + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_pannerNodePassThrough.html b/dom/media/webaudio/test/test_pannerNodePassThrough.html new file mode 100644 index 000000000..ab1f4b46f --- /dev/null +++ b/dom/media/webaudio/test/test_pannerNodePassThrough.html @@ -0,0 +1,53 @@ + + + + Test PannerNode with passthrough + + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_pannerNodeTail.html b/dom/media/webaudio/test/test_pannerNodeTail.html new file mode 100644 index 000000000..5fff52797 --- /dev/null +++ b/dom/media/webaudio/test/test_pannerNodeTail.html @@ -0,0 +1,232 @@ + + + + Test tail time lifetime of PannerNode + + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_pannerNode_equalPower.html b/dom/media/webaudio/test/test_pannerNode_equalPower.html new file mode 100644 index 000000000..14e9f2153 --- /dev/null +++ b/dom/media/webaudio/test/test_pannerNode_equalPower.html @@ -0,0 +1,26 @@ + + + +Test PannerNode + + + + + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_pannerNode_maxDistance.html b/dom/media/webaudio/test/test_pannerNode_maxDistance.html new file mode 100644 index 000000000..faca136b3 --- /dev/null +++ b/dom/media/webaudio/test/test_pannerNode_maxDistance.html @@ -0,0 +1,64 @@ + + + + Test PannerNode outputs silence when the distance is greater than maxDist + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_periodicWave.html b/dom/media/webaudio/test/test_periodicWave.html new file mode 100644 index 000000000..3ed440748 --- /dev/null +++ b/dom/media/webaudio/test/test_periodicWave.html @@ -0,0 +1,94 @@ + + + + Test the PeriodicWave interface + + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_periodicWaveBandLimiting.html b/dom/media/webaudio/test/test_periodicWaveBandLimiting.html new file mode 100644 index 000000000..70fbb09e2 --- /dev/null +++ b/dom/media/webaudio/test/test_periodicWaveBandLimiting.html @@ -0,0 +1,86 @@ + +Test effect of band limiting on PeriodicWave signals + + + diff --git a/dom/media/webaudio/test/test_periodicWaveDisableNormalization.html b/dom/media/webaudio/test/test_periodicWaveDisableNormalization.html new file mode 100644 index 000000000..fb924c475 --- /dev/null +++ b/dom/media/webaudio/test/test_periodicWaveDisableNormalization.html @@ -0,0 +1,100 @@ + + + + Test PeriodicWave disableNormalization Parameter + + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_scriptProcessorNode.html b/dom/media/webaudio/test/test_scriptProcessorNode.html new file mode 100644 index 000000000..7cfb3d96e --- /dev/null +++ b/dom/media/webaudio/test/test_scriptProcessorNode.html @@ -0,0 +1,132 @@ + + + + Test ScriptProcessorNode + + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_scriptProcessorNodeChannelCount.html b/dom/media/webaudio/test/test_scriptProcessorNodeChannelCount.html new file mode 100644 index 000000000..6361a1747 --- /dev/null +++ b/dom/media/webaudio/test/test_scriptProcessorNodeChannelCount.html @@ -0,0 +1,80 @@ + + + + Test AudioBufferSourceNode + + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_scriptProcessorNodeNotConnected.html b/dom/media/webaudio/test/test_scriptProcessorNodeNotConnected.html new file mode 100644 index 000000000..a3c073e38 --- /dev/null +++ b/dom/media/webaudio/test/test_scriptProcessorNodeNotConnected.html @@ -0,0 +1,34 @@ + + + + Test AudioBufferSourceNode: should not fire audioprocess if not connected. + + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_scriptProcessorNodePassThrough.html b/dom/media/webaudio/test/test_scriptProcessorNodePassThrough.html new file mode 100644 index 000000000..8352a331d --- /dev/null +++ b/dom/media/webaudio/test/test_scriptProcessorNodePassThrough.html @@ -0,0 +1,103 @@ + + + + Test ScriptProcessorNode with passthrough + + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_scriptProcessorNodeZeroInputOutput.html b/dom/media/webaudio/test/test_scriptProcessorNodeZeroInputOutput.html new file mode 100644 index 000000000..6ac8beda0 --- /dev/null +++ b/dom/media/webaudio/test/test_scriptProcessorNodeZeroInputOutput.html @@ -0,0 +1,39 @@ + + + + Test AudioBufferSourceNode + + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_scriptProcessorNode_playbackTime1.html b/dom/media/webaudio/test/test_scriptProcessorNode_playbackTime1.html new file mode 100644 index 000000000..43cd13912 --- /dev/null +++ b/dom/media/webaudio/test/test_scriptProcessorNode_playbackTime1.html @@ -0,0 +1,52 @@ + + + + Test ScriptProcessorNode playbackTime for bug 970773 + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_sequentialBufferSourceWithResampling.html b/dom/media/webaudio/test/test_sequentialBufferSourceWithResampling.html new file mode 100644 index 000000000..5c03a8a91 --- /dev/null +++ b/dom/media/webaudio/test/test_sequentialBufferSourceWithResampling.html @@ -0,0 +1,72 @@ + +Test seamless playback of a series of resampled buffers + + + diff --git a/dom/media/webaudio/test/test_singleSourceDest.html b/dom/media/webaudio/test/test_singleSourceDest.html new file mode 100644 index 000000000..8613a2dd9 --- /dev/null +++ b/dom/media/webaudio/test/test_singleSourceDest.html @@ -0,0 +1,70 @@ + + + + Test whether we can create an AudioContext interface + + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_stereoPannerNode.html b/dom/media/webaudio/test/test_stereoPannerNode.html new file mode 100644 index 000000000..ffc735364 --- /dev/null +++ b/dom/media/webaudio/test/test_stereoPannerNode.html @@ -0,0 +1,263 @@ + + + + Test StereoPannerNode + + + + + +
+
+
+
+
+ + diff --git a/dom/media/webaudio/test/test_stereoPannerNodePassThrough.html b/dom/media/webaudio/test/test_stereoPannerNodePassThrough.html new file mode 100644 index 000000000..250a1a9de --- /dev/null +++ b/dom/media/webaudio/test/test_stereoPannerNodePassThrough.html @@ -0,0 +1,47 @@ + + + + Test StereoPanerNode with passthrough + + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_stereoPanningWithGain.html b/dom/media/webaudio/test/test_stereoPanningWithGain.html new file mode 100644 index 000000000..1ef0c037d --- /dev/null +++ b/dom/media/webaudio/test/test_stereoPanningWithGain.html @@ -0,0 +1,49 @@ + + + + Test stereo equalpower panning with a GainNode + + + + +
+
+
+
+ + diff --git a/dom/media/webaudio/test/test_waveDecoder.html b/dom/media/webaudio/test/test_waveDecoder.html new file mode 100644 index 000000000..bd5faf6ad --- /dev/null +++ b/dom/media/webaudio/test/test_waveDecoder.html @@ -0,0 +1,69 @@ + + + + + Test that we decode uint8 and sint16 wave files with correct conversion to float64 + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_waveShaper.html b/dom/media/webaudio/test/test_waveShaper.html new file mode 100644 index 000000000..c95cf5e05 --- /dev/null +++ b/dom/media/webaudio/test/test_waveShaper.html @@ -0,0 +1,60 @@ + + + + Test WaveShaperNode with no curve + + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_waveShaperGain.html b/dom/media/webaudio/test/test_waveShaperGain.html new file mode 100644 index 000000000..b0c82d2d8 --- /dev/null +++ b/dom/media/webaudio/test/test_waveShaperGain.html @@ -0,0 +1,73 @@ + + + + + Test that WaveShaperNode doesn't corrupt its inputs when the gain is != + 1.0 (bug 1203616) + + + + + +
+
+ + diff --git a/dom/media/webaudio/test/test_waveShaperInvalidLengthCurve.html b/dom/media/webaudio/test/test_waveShaperInvalidLengthCurve.html new file mode 100644 index 000000000..f117f0376 --- /dev/null +++ b/dom/media/webaudio/test/test_waveShaperInvalidLengthCurve.html @@ -0,0 +1,66 @@ + + + + Test WaveShaperNode with an invalid curve + + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_waveShaperNoCurve.html b/dom/media/webaudio/test/test_waveShaperNoCurve.html new file mode 100644 index 000000000..c0d3187b2 --- /dev/null +++ b/dom/media/webaudio/test/test_waveShaperNoCurve.html @@ -0,0 +1,43 @@ + + + + Test WaveShaperNode with no curve + + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_waveShaperPassThrough.html b/dom/media/webaudio/test/test_waveShaperPassThrough.html new file mode 100644 index 000000000..52c70d3c2 --- /dev/null +++ b/dom/media/webaudio/test/test_waveShaperPassThrough.html @@ -0,0 +1,55 @@ + + + + Test WaveShaperNode with passthrough + + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/ting-44.1k-1ch.ogg b/dom/media/webaudio/test/ting-44.1k-1ch.ogg new file mode 100644 index 000000000..a11aaf1cb Binary files /dev/null and b/dom/media/webaudio/test/ting-44.1k-1ch.ogg differ diff --git a/dom/media/webaudio/test/ting-44.1k-1ch.wav b/dom/media/webaudio/test/ting-44.1k-1ch.wav new file mode 100644 index 000000000..6854c9d89 Binary files /dev/null and b/dom/media/webaudio/test/ting-44.1k-1ch.wav differ diff --git a/dom/media/webaudio/test/ting-44.1k-2ch.ogg b/dom/media/webaudio/test/ting-44.1k-2ch.ogg new file mode 100644 index 000000000..94e001485 Binary files /dev/null and b/dom/media/webaudio/test/ting-44.1k-2ch.ogg differ diff --git a/dom/media/webaudio/test/ting-44.1k-2ch.wav b/dom/media/webaudio/test/ting-44.1k-2ch.wav new file mode 100644 index 000000000..703d88589 Binary files /dev/null and b/dom/media/webaudio/test/ting-44.1k-2ch.wav differ diff --git a/dom/media/webaudio/test/ting-48k-1ch.ogg b/dom/media/webaudio/test/ting-48k-1ch.ogg new file mode 100644 index 000000000..f45ce33a5 Binary files /dev/null and b/dom/media/webaudio/test/ting-48k-1ch.ogg differ diff --git a/dom/media/webaudio/test/ting-48k-1ch.wav b/dom/media/webaudio/test/ting-48k-1ch.wav new file mode 100644 index 000000000..8fe471666 Binary files /dev/null and b/dom/media/webaudio/test/ting-48k-1ch.wav differ diff --git a/dom/media/webaudio/test/ting-48k-2ch.ogg b/dom/media/webaudio/test/ting-48k-2ch.ogg new file mode 100644 index 000000000..e4c564abb Binary files /dev/null and b/dom/media/webaudio/test/ting-48k-2ch.ogg differ diff --git a/dom/media/webaudio/test/ting-48k-2ch.wav b/dom/media/webaudio/test/ting-48k-2ch.wav new file mode 100644 index 000000000..ad4d0466d Binary files /dev/null and b/dom/media/webaudio/test/ting-48k-2ch.wav differ diff --git a/dom/media/webaudio/test/ting-dualchannel44.1.wav b/dom/media/webaudio/test/ting-dualchannel44.1.wav new file mode 100644 index 000000000..62954394d Binary files /dev/null and b/dom/media/webaudio/test/ting-dualchannel44.1.wav differ diff --git a/dom/media/webaudio/test/ting-dualchannel48.wav b/dom/media/webaudio/test/ting-dualchannel48.wav new file mode 100644 index 000000000..a0b824788 Binary files /dev/null and b/dom/media/webaudio/test/ting-dualchannel48.wav differ diff --git a/dom/media/webaudio/test/webaudio.js b/dom/media/webaudio/test/webaudio.js new file mode 100644 index 000000000..1a1a8efb7 --- /dev/null +++ b/dom/media/webaudio/test/webaudio.js @@ -0,0 +1,269 @@ +// Helpers for Web Audio tests + +function expectException(func, exceptionCode) { + var threw = false; + try { + func(); + } catch (ex) { + threw = true; + ok(ex instanceof DOMException, "Expect a DOM exception"); + is(ex.code, exceptionCode, "Expect the correct exception code"); + } + ok(threw, "The exception was thrown"); +} + +function expectNoException(func) { + var threw = false; + try { + func(); + } catch (ex) { + threw = true; + } + ok(!threw, "An exception was not thrown"); +} + +function expectTypeError(func) { + var threw = false; + try { + func(); + } catch (ex) { + threw = true; + ok(ex instanceof TypeError, "Expect a TypeError"); + } + ok(threw, "The exception was thrown"); +} + +function expectRejectedPromise(that, func, exceptionName) { + var promise = that[func](); + + ok(promise instanceof Promise, "Expect a Promise"); + + promise.then(function(res) { + ok(false, "Promise resolved when it should have been rejected."); + }).catch(function(err) { + is(err.name, exceptionName, "Promise correctly reject with " + exceptionName); + }); +} + +function fuzzyCompare(a, b) { + return Math.abs(a - b) < 9e-3; +} + +function compareChannels(buf1, buf2, + /*optional*/ length, + /*optional*/ sourceOffset, + /*optional*/ destOffset, + /*optional*/ skipLengthCheck) { + if (!skipLengthCheck) { + is(buf1.length, buf2.length, "Channels must have the same length"); + } + sourceOffset = sourceOffset || 0; + destOffset = destOffset || 0; + if (length == undefined) { + length = buf1.length - sourceOffset; + } + var difference = 0; + var maxDifference = 0; + var firstBadIndex = -1; + for (var i = 0; i < length; ++i) { + if (!fuzzyCompare(buf1[i + sourceOffset], buf2[i + destOffset])) { + difference++; + maxDifference = Math.max(maxDifference, Math.abs(buf1[i + sourceOffset] - buf2[i + destOffset])); + if (firstBadIndex == -1) { + firstBadIndex = i; + } + } + }; + + is(difference, 0, "maxDifference: " + maxDifference + + ", first bad index: " + firstBadIndex + + " with test-data offset " + sourceOffset + " and expected-data offset " + + destOffset + "; corresponding values " + buf1[firstBadIndex + sourceOffset] + + " and " + buf2[firstBadIndex + destOffset] + " --- differences"); +} + +function compareBuffers(got, expected) { + if (got.numberOfChannels != expected.numberOfChannels) { + is(got.numberOfChannels, expected.numberOfChannels, + "Correct number of buffer channels"); + return; + } + if (got.length != expected.length) { + is(got.length, expected.length, + "Correct buffer length"); + return; + } + if (got.sampleRate != expected.sampleRate) { + is(got.sampleRate, expected.sampleRate, + "Correct sample rate"); + return; + } + + for (var i = 0; i < got.numberOfChannels; ++i) { + compareChannels(got.getChannelData(i), expected.getChannelData(i), + got.length, 0, 0, true); + } +} + +/** + * Compute the root mean square (RMS, + * ) of a channel of a slice + * (defined by `start` and `end`) of an AudioBuffer. + * + * This is useful to detect that a buffer is noisy or silent. + */ +function rms(audiobuffer, channel = 0, start = 0, end = audiobuffer.length) { + var buffer= audiobuffer.getChannelData(channel); + var rms = 0; + for (var i = start; i < end; i++) { + rms += buffer[i] * buffer[i]; + } + + rms /= buffer.length; + rms = Math.sqrt(rms); + return rms; +} + +function getEmptyBuffer(context, length) { + return context.createBuffer(gTest.numberOfChannels, length, context.sampleRate); +} + +/** + * This function assumes that the test file defines a single gTest variable with + * the following properties and methods: + * + * + numberOfChannels: optional property which specifies the number of channels + * in the output. The default value is 2. + * + createGraph: mandatory method which takes a context object and does + * everything needed in order to set up the Web Audio graph. + * This function returns the node to be inspected. + * + createGraphAsync: async version of createGraph. This function takes + * a callback which should be called with an argument + * set to the node to be inspected when the callee is + * ready to proceed with the test. Either this function + * or createGraph must be provided. + * + createExpectedBuffers: optional method which takes a context object and + * returns either one expected buffer or an array of + * them, designating what is expected to be observed + * in the output. If omitted, the output is expected + * to be silence. All buffers must have the same + * length, which must be a bufferSize supported by + * ScriptProcessorNode. This function is guaranteed + * to be called before createGraph. + * + length: property equal to the total number of frames which we are waiting + * to see in the output, mandatory if createExpectedBuffers is not + * provided, in which case it must be a bufferSize supported by + * ScriptProcessorNode (256, 512, 1024, 2048, 4096, 8192, or 16384). + * If createExpectedBuffers is provided then this must be equal to + * the number of expected buffers * the expected buffer length. + * + * + skipOfflineContextTests: optional. when true, skips running tests on an offline + * context by circumventing testOnOfflineContext. + */ +function runTest() +{ + function done() { + SimpleTest.finish(); + } + + SimpleTest.waitForExplicitFinish(); + function runTestFunction () { + if (!gTest.numberOfChannels) { + gTest.numberOfChannels = 2; // default + } + + var testLength; + + function runTestOnContext(context, callback, testOutput) { + if (!gTest.createExpectedBuffers) { + // Assume that the output is silence + var expectedBuffers = getEmptyBuffer(context, gTest.length); + } else { + var expectedBuffers = gTest.createExpectedBuffers(context); + } + if (!(expectedBuffers instanceof Array)) { + expectedBuffers = [expectedBuffers]; + } + var expectedFrames = 0; + for (var i = 0; i < expectedBuffers.length; ++i) { + is(expectedBuffers[i].numberOfChannels, gTest.numberOfChannels, + "Correct number of channels for expected buffer " + i); + expectedFrames += expectedBuffers[i].length; + } + if (gTest.length && gTest.createExpectedBuffers) { + is(expectedFrames, gTest.length, "Correct number of expected frames"); + } + + if (gTest.createGraphAsync) { + gTest.createGraphAsync(context, function(nodeToInspect) { + testOutput(nodeToInspect, expectedBuffers, callback); + }); + } else { + testOutput(gTest.createGraph(context), expectedBuffers, callback); + } + } + + function testOnNormalContext(callback) { + function testOutput(nodeToInspect, expectedBuffers, callback) { + testLength = 0; + var sp = context.createScriptProcessor(expectedBuffers[0].length, gTest.numberOfChannels, 0); + nodeToInspect.connect(sp); + sp.onaudioprocess = function(e) { + var expectedBuffer = expectedBuffers.shift(); + testLength += expectedBuffer.length; + compareBuffers(e.inputBuffer, expectedBuffer); + if (expectedBuffers.length == 0) { + sp.onaudioprocess = null; + callback(); + } + }; + } + var context = new AudioContext(); + runTestOnContext(context, callback, testOutput); + } + + function testOnOfflineContext(callback, sampleRate) { + function testOutput(nodeToInspect, expectedBuffers, callback) { + nodeToInspect.connect(context.destination); + context.oncomplete = function(e) { + var samplesSeen = 0; + while (expectedBuffers.length) { + var expectedBuffer = expectedBuffers.shift(); + is(e.renderedBuffer.numberOfChannels, expectedBuffer.numberOfChannels, + "Correct number of input buffer channels"); + for (var i = 0; i < e.renderedBuffer.numberOfChannels; ++i) { + compareChannels(e.renderedBuffer.getChannelData(i), + expectedBuffer.getChannelData(i), + expectedBuffer.length, + samplesSeen, + undefined, + true); + } + samplesSeen += expectedBuffer.length; + } + callback(); + }; + context.startRendering(); + } + + var context = new OfflineAudioContext(gTest.numberOfChannels, testLength, sampleRate); + runTestOnContext(context, callback, testOutput); + } + + testOnNormalContext(function() { + if (!gTest.skipOfflineContextTests) { + testOnOfflineContext(function() { + testOnOfflineContext(done, 44100); + }, 48000); + } else { + done(); + } + }); + }; + + if (document.readyState !== 'complete') { + addLoadEvent(runTestFunction); + } else { + runTestFunction(); + } +} -- cgit v1.2.3