From 6bf0a5cb5034a7e684dcc3500e841785237ce2dd Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 19:32:43 +0200 Subject: Adding upstream version 1:115.7.0. Signed-off-by: Daniel Baumann --- dom/media/webaudio/test/8kHz-320kbps-6ch.aac | Bin 0 -> 22657 bytes 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 | 22 + .../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/corsServer.sjs | 26 ++ .../test/file_nodeCreationDocumentGone.html | 4 + dom/media/webaudio/test/generate-test-files.py | 52 +++ .../test/half-a-second-1ch-44100-aac-afconvert.mp4 | Bin 0 -> 6560 bytes .../webaudio/test/half-a-second-1ch-44100-aac.aac | Bin 0 -> 4826 bytes .../webaudio/test/half-a-second-1ch-44100-aac.mp4 | Bin 0 -> 5584 bytes .../test/half-a-second-1ch-44100-flac.flac | Bin 0 -> 17320 bytes .../test/half-a-second-1ch-44100-libmp3lame.mp3 | Bin 0 -> 4615 bytes .../test/half-a-second-1ch-44100-libopus.mp4 | Bin 0 -> 7171 bytes .../test/half-a-second-1ch-44100-libopus.opus | Bin 0 -> 6469 bytes .../test/half-a-second-1ch-44100-libopus.webm | Bin 0 -> 6991 bytes .../test/half-a-second-1ch-44100-libvorbis.ogg | Bin 0 -> 4320 bytes .../test/half-a-second-1ch-44100-libvorbis.webm | Bin 0 -> 4878 bytes .../webaudio/test/half-a-second-1ch-44100.wav | Bin 0 -> 44144 bytes .../webaudio/test/half-a-second-1ch-48000-aac.aac | Bin 0 -> 4840 bytes .../webaudio/test/half-a-second-1ch-48000-aac.mp4 | Bin 0 -> 5592 bytes .../test/half-a-second-1ch-48000-flac.flac | Bin 0 -> 18577 bytes .../test/half-a-second-1ch-48000-libmp3lame.mp3 | Bin 0 -> 4461 bytes .../test/half-a-second-1ch-48000-libopus.mp4 | Bin 0 -> 6738 bytes .../test/half-a-second-1ch-48000-libopus.opus | Bin 0 -> 6031 bytes .../test/half-a-second-1ch-48000-libopus.webm | Bin 0 -> 6558 bytes .../test/half-a-second-1ch-48000-libvorbis.ogg | Bin 0 -> 4559 bytes .../test/half-a-second-1ch-48000-libvorbis.webm | Bin 0 -> 5142 bytes .../webaudio/test/half-a-second-1ch-48000.wav | Bin 0 -> 48044 bytes .../webaudio/test/half-a-second-2ch-44100-aac.aac | Bin 0 -> 8755 bytes .../webaudio/test/half-a-second-2ch-44100-aac.mp4 | Bin 0 -> 9513 bytes .../test/half-a-second-2ch-44100-flac.flac | Bin 0 -> 23279 bytes .../test/half-a-second-2ch-44100-libmp3lame.mp3 | Bin 0 -> 9030 bytes .../test/half-a-second-2ch-44100-libopus.mp4 | Bin 0 -> 11593 bytes .../test/half-a-second-2ch-44100-libopus.opus | Bin 0 -> 10905 bytes .../test/half-a-second-2ch-44100-libopus.webm | Bin 0 -> 11413 bytes .../test/half-a-second-2ch-44100-libvorbis.ogg | Bin 0 -> 5478 bytes .../test/half-a-second-2ch-44100-libvorbis.webm | Bin 0 -> 6033 bytes .../webaudio/test/half-a-second-2ch-44100.wav | Bin 0 -> 88244 bytes .../webaudio/test/half-a-second-2ch-48000-aac.aac | Bin 0 -> 8727 bytes .../webaudio/test/half-a-second-2ch-48000-aac.mp4 | Bin 0 -> 9479 bytes .../test/half-a-second-2ch-48000-flac.flac | Bin 0 -> 24984 bytes .../test/half-a-second-2ch-48000-libmp3lame.mp3 | Bin 0 -> 8685 bytes .../test/half-a-second-2ch-48000-libopus.mp4 | Bin 0 -> 12247 bytes .../test/half-a-second-2ch-48000-libopus.opus | Bin 0 -> 11559 bytes .../test/half-a-second-2ch-48000-libopus.webm | Bin 0 -> 12067 bytes .../test/half-a-second-2ch-48000-libvorbis.ogg | Bin 0 -> 5784 bytes .../test/half-a-second-2ch-48000-libvorbis.webm | Bin 0 -> 6364 bytes .../webaudio/test/half-a-second-2ch-48000.wav | Bin 0 -> 96044 bytes dom/media/webaudio/test/invalid.txt | 1 + dom/media/webaudio/test/invalidContent.flac | 1 + dom/media/webaudio/test/layouttest-glue.js | 18 + dom/media/webaudio/test/mochitest.ini | 215 ++++++++++ dom/media/webaudio/test/mochitest_audio.ini | 69 +++ dom/media/webaudio/test/mochitest_bugs.ini | 65 +++ dom/media/webaudio/test/mochitest_media.ini | 64 +++ dom/media/webaudio/test/nil-packet.ogg | Bin 0 -> 9760 bytes 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/sixteen-frames.mp3 | Bin 0 -> 625 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 | 104 +++++ dom/media/webaudio/test/test_AudioContext.html | 23 + .../webaudio/test/test_AudioContext_disabled.html | 56 +++ dom/media/webaudio/test/test_AudioListener.html | 26 ++ .../webaudio/test/test_AudioNodeDevtoolsAPI.html | 59 +++ .../webaudio/test/test_AudioParamDevtoolsAPI.html | 49 +++ .../webaudio/test/test_OfflineAudioContext.html | 118 ++++++ .../test/test_ScriptProcessorCollected1.html | 77 ++++ .../test/test_WebAudioMemoryReporting.html | 54 +++ dom/media/webaudio/test/test_analyserNode.html | 178 ++++++++ .../webaudio/test/test_analyserNodeMinimum.html | 51 +++ .../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 | 48 +++ ...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 | 58 +++ dom/media/webaudio/test/test_audioContextGC.html | 162 +++++++ ...ioContextParams_recordNonDefaultSampleRate.html | 48 +++ .../test/test_audioContextParams_sampleRate.html | 81 ++++ .../test/test_audioContextSuspendResumeClose.html | 419 ++++++++++++++++++ .../webaudio/test/test_audioDestinationNode.html | 26 ++ .../webaudio/test/test_audioParamChaining.html | 77 ++++ .../test/test_audioParamExponentialRamp.html | 58 +++ dom/media/webaudio/test/test_audioParamGain.html | 61 +++ .../webaudio/test/test_audioParamLinearRamp.html | 54 +++ .../test/test_audioParamSetCurveAtTime.html | 54 +++ .../test/test_audioParamSetTargetAtTime.html | 55 +++ ..._audioParamSetTargetAtTimeZeroTimeConstant.html | 58 +++ .../test/test_audioParamSetValueAtTime.html | 52 +++ .../test_audioParamTimelineDestinationOffset.html | 45 ++ dom/media/webaudio/test/test_badConnect.html | 52 +++ 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 | 58 +++ 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_bug1355798.html | 30 ++ dom/media/webaudio/test/test_bug1447273.html | 175 ++++++++ dom/media/webaudio/test/test_bug808374.html | 22 + dom/media/webaudio/test/test_bug827541.html | 24 ++ 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_bug867174.html | 38 ++ dom/media/webaudio/test/test_bug873335.html | 22 + 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 ++++ ...test_convolver-upmixing-1-channel-response.html | 143 +++++++ dom/media/webaudio/test/test_convolverNode.html | 31 ++ .../test/test_convolverNodeChannelCount.html | 61 +++ ..._convolverNodeChannelInterpretationChanges.html | 169 ++++++++ .../webaudio/test/test_convolverNodeDelay.html | 72 ++++ .../test/test_convolverNodeFiniteInfluence.html | 44 ++ .../test/test_convolverNodeNormalization.html | 83 ++++ dom/media/webaudio/test/test_convolverNodeOOM.html | 46 ++ .../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 | 27 ++ .../test/test_decodeAudioDataOnDetachedBuffer.html | 50 +++ .../webaudio/test/test_decodeAudioDataPromise.html | 62 +++ dom/media/webaudio/test/test_decodeAudioError.html | 74 ++++ .../webaudio/test/test_decodeMultichannel.html | 75 ++++ dom/media/webaudio/test/test_decodeOpusTail.html | 28 ++ dom/media/webaudio/test/test_decoderDelay.html | 144 +++++++ dom/media/webaudio/test/test_delayNode.html | 101 +++++ 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 +++ .../test/test_delaynode-channel-count-1.html | 104 +++++ 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 | 68 +++ .../test_dynamicsCompressorNodePassThrough.html | 47 +++ .../test/test_dynamicsCompressorNodeWithGain.html | 51 +++ .../webaudio/test/test_event_listener_leaks.html | 47 +++ dom/media/webaudio/test/test_gainNode.html | 72 ++++ 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 | 388 +++++++++++++++++ .../test/test_mediaElementAudioSourceNode.html | 74 ++++ ...est_mediaElementAudioSourceNodeCrossOrigin.html | 94 +++++ .../test_mediaElementAudioSourceNodeFidelity.html | 137 ++++++ ...est_mediaElementAudioSourceNodePassThrough.html | 66 +++ .../test_mediaElementAudioSourceNodeVideo.html | 70 +++ .../test/test_mediaStreamAudioDestinationNode.html | 50 +++ .../test/test_mediaStreamAudioSourceNode.html | 50 +++ ...test_mediaStreamAudioSourceNodeCrossOrigin.html | 60 +++ .../test/test_mediaStreamAudioSourceNodeNoGC.html | 116 +++++ ...test_mediaStreamAudioSourceNodePassThrough.html | 55 +++ .../test_mediaStreamAudioSourceNodeResampling.html | 74 ++++ .../test/test_mediaStreamTrackAudioSourceNode.html | 54 +++ ...mediaStreamTrackAudioSourceNodeCrossOrigin.html | 53 +++ .../test_mediaStreamTrackAudioSourceNodeVideo.html | 27 ++ dom/media/webaudio/test/test_mixingRules.html | 402 ++++++++++++++++++ .../test/test_nodeCreationDocumentGone.html | 34 ++ .../webaudio/test/test_nodeToParamConnection.html | 60 +++ .../test/test_notAllowedToStartAudioContextGC.html | 57 +++ .../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 | 71 ++++ dom/media/webaudio/test/test_pannerNodeAbove.html | 50 +++ .../test/test_pannerNodeAtZeroDistance.html | 149 +++++++ .../webaudio/test/test_pannerNodeChannelCount.html | 52 +++ .../webaudio/test/test_pannerNodeHRTFSymmetry.html | 107 +++++ .../webaudio/test/test_pannerNodePassThrough.html | 53 +++ dom/media/webaudio/test/test_pannerNodeTail.html | 232 ++++++++++ .../test/test_pannerNode_audioparam_distance.html | 43 ++ .../webaudio/test/test_pannerNode_equalPower.html | 26 ++ .../webaudio/test/test_pannerNode_maxDistance.html | 64 +++ dom/media/webaudio/test/test_periodicWave.html | 130 ++++++ .../test/test_periodicWaveBandLimiting.html | 86 ++++ .../test_periodicWaveDisableNormalization.html | 98 +++++ ...retrospective-exponentialRampToValueAtTime.html | 51 +++ ...test_retrospective-linearRampToValueAtTime.html | 51 +++ .../test/test_retrospective-setTargetAtTime.html | 51 +++ .../test/test_retrospective-setValueAtTime.html | 54 +++ .../test_retrospective-setValueCurveAtTime.html | 49 +++ .../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 ++++ .../test_setValueCurveWithNonFiniteElements.html | 60 +++ dom/media/webaudio/test/test_singleSourceDest.html | 70 +++ dom/media/webaudio/test/test_slowStart.html | 48 +++ dom/media/webaudio/test/test_stereoPannerNode.html | 295 +++++++++++++ .../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/test_webAudio_muteTab.html | 95 +++++ 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 | 319 ++++++++++++++ 286 files changed, 16690 insertions(+) create mode 100644 dom/media/webaudio/test/8kHz-320kbps-6ch.aac 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/corsServer.sjs create mode 100644 dom/media/webaudio/test/file_nodeCreationDocumentGone.html create mode 100755 dom/media/webaudio/test/generate-test-files.py create mode 100644 dom/media/webaudio/test/half-a-second-1ch-44100-aac-afconvert.mp4 create mode 100644 dom/media/webaudio/test/half-a-second-1ch-44100-aac.aac create mode 100644 dom/media/webaudio/test/half-a-second-1ch-44100-aac.mp4 create mode 100644 dom/media/webaudio/test/half-a-second-1ch-44100-flac.flac create mode 100644 dom/media/webaudio/test/half-a-second-1ch-44100-libmp3lame.mp3 create mode 100644 dom/media/webaudio/test/half-a-second-1ch-44100-libopus.mp4 create mode 100644 dom/media/webaudio/test/half-a-second-1ch-44100-libopus.opus create mode 100644 dom/media/webaudio/test/half-a-second-1ch-44100-libopus.webm create mode 100644 dom/media/webaudio/test/half-a-second-1ch-44100-libvorbis.ogg create mode 100644 dom/media/webaudio/test/half-a-second-1ch-44100-libvorbis.webm create mode 100644 dom/media/webaudio/test/half-a-second-1ch-44100.wav create mode 100644 dom/media/webaudio/test/half-a-second-1ch-48000-aac.aac create mode 100644 dom/media/webaudio/test/half-a-second-1ch-48000-aac.mp4 create mode 100644 dom/media/webaudio/test/half-a-second-1ch-48000-flac.flac create mode 100644 dom/media/webaudio/test/half-a-second-1ch-48000-libmp3lame.mp3 create mode 100644 dom/media/webaudio/test/half-a-second-1ch-48000-libopus.mp4 create mode 100644 dom/media/webaudio/test/half-a-second-1ch-48000-libopus.opus create mode 100644 dom/media/webaudio/test/half-a-second-1ch-48000-libopus.webm create mode 100644 dom/media/webaudio/test/half-a-second-1ch-48000-libvorbis.ogg create mode 100644 dom/media/webaudio/test/half-a-second-1ch-48000-libvorbis.webm create mode 100644 dom/media/webaudio/test/half-a-second-1ch-48000.wav create mode 100644 dom/media/webaudio/test/half-a-second-2ch-44100-aac.aac create mode 100644 dom/media/webaudio/test/half-a-second-2ch-44100-aac.mp4 create mode 100644 dom/media/webaudio/test/half-a-second-2ch-44100-flac.flac create mode 100644 dom/media/webaudio/test/half-a-second-2ch-44100-libmp3lame.mp3 create mode 100644 dom/media/webaudio/test/half-a-second-2ch-44100-libopus.mp4 create mode 100644 dom/media/webaudio/test/half-a-second-2ch-44100-libopus.opus create mode 100644 dom/media/webaudio/test/half-a-second-2ch-44100-libopus.webm create mode 100644 dom/media/webaudio/test/half-a-second-2ch-44100-libvorbis.ogg create mode 100644 dom/media/webaudio/test/half-a-second-2ch-44100-libvorbis.webm create mode 100644 dom/media/webaudio/test/half-a-second-2ch-44100.wav create mode 100644 dom/media/webaudio/test/half-a-second-2ch-48000-aac.aac create mode 100644 dom/media/webaudio/test/half-a-second-2ch-48000-aac.mp4 create mode 100644 dom/media/webaudio/test/half-a-second-2ch-48000-flac.flac create mode 100644 dom/media/webaudio/test/half-a-second-2ch-48000-libmp3lame.mp3 create mode 100644 dom/media/webaudio/test/half-a-second-2ch-48000-libopus.mp4 create mode 100644 dom/media/webaudio/test/half-a-second-2ch-48000-libopus.opus create mode 100644 dom/media/webaudio/test/half-a-second-2ch-48000-libopus.webm create mode 100644 dom/media/webaudio/test/half-a-second-2ch-48000-libvorbis.ogg create mode 100644 dom/media/webaudio/test/half-a-second-2ch-48000-libvorbis.webm create mode 100644 dom/media/webaudio/test/half-a-second-2ch-48000.wav create mode 100644 dom/media/webaudio/test/invalid.txt create mode 100644 dom/media/webaudio/test/invalidContent.flac 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/mochitest_audio.ini create mode 100644 dom/media/webaudio/test/mochitest_bugs.ini create mode 100644 dom/media/webaudio/test/mochitest_media.ini create mode 100644 dom/media/webaudio/test/nil-packet.ogg 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/sixteen-frames.mp3 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_analyserNodeMinimum.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_audioContextGC.html create mode 100644 dom/media/webaudio/test/test_audioContextParams_recordNonDefaultSampleRate.html create mode 100644 dom/media/webaudio/test/test_audioContextParams_sampleRate.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_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_bug1355798.html create mode 100644 dom/media/webaudio/test/test_bug1447273.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_bug867174.html create mode 100644 dom/media/webaudio/test/test_bug873335.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_convolver-upmixing-1-channel-response.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_convolverNodeChannelInterpretationChanges.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_convolverNodeNormalization.html create mode 100644 dom/media/webaudio/test/test_convolverNodeOOM.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_decodeAudioDataOnDetachedBuffer.html create mode 100644 dom/media/webaudio/test/test_decodeAudioDataPromise.html create mode 100644 dom/media/webaudio/test/test_decodeAudioError.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_decoderDelay.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_delaynode-channel-count-1.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_event_listener_leaks.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_mediaStreamTrackAudioSourceNode.html create mode 100644 dom/media/webaudio/test/test_mediaStreamTrackAudioSourceNodeCrossOrigin.html create mode 100644 dom/media/webaudio/test/test_mediaStreamTrackAudioSourceNodeVideo.html create mode 100644 dom/media/webaudio/test/test_mixingRules.html create mode 100644 dom/media/webaudio/test/test_nodeCreationDocumentGone.html create mode 100644 dom/media/webaudio/test/test_nodeToParamConnection.html create mode 100644 dom/media/webaudio/test/test_notAllowedToStartAudioContextGC.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_audioparam_distance.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_retrospective-exponentialRampToValueAtTime.html create mode 100644 dom/media/webaudio/test/test_retrospective-linearRampToValueAtTime.html create mode 100644 dom/media/webaudio/test/test_retrospective-setTargetAtTime.html create mode 100644 dom/media/webaudio/test/test_retrospective-setValueAtTime.html create mode 100644 dom/media/webaudio/test/test_retrospective-setValueCurveAtTime.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_setValueCurveWithNonFiniteElements.html create mode 100644 dom/media/webaudio/test/test_singleSourceDest.html create mode 100644 dom/media/webaudio/test/test_slowStart.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/test_webAudio_muteTab.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/8kHz-320kbps-6ch.aac b/dom/media/webaudio/test/8kHz-320kbps-6ch.aac new file mode 100644 index 0000000000..8981d40dfd Binary files /dev/null and b/dom/media/webaudio/test/8kHz-320kbps-6ch.aac differ diff --git a/dom/media/webaudio/test/audio-expected.wav b/dom/media/webaudio/test/audio-expected.wav new file mode 100644 index 0000000000..1519270776 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 0000000000..68c90dfa1e 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 0000000000..bf00e5cdf2 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 0000000000..093f0197ae 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 0000000000..68dee3cf2b 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 0000000000..2a5a4bff89 --- /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 0000000000..fe93122d29 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 0000000000..1d819221fd --- /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 0000000000..c66d32c7f2 --- /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 0000000000..06fff98b18 --- /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 0000000000..795adf6012 --- /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 0000000000..98ff0c7756 --- /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 0000000000..8d115b2e8e --- /dev/null +++ b/dom/media/webaudio/test/blink/mochitest.ini @@ -0,0 +1,22 @@ +[DEFAULT] +tags = mtg 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 0000000000..45460e2768 --- /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 0000000000..024c2f50df --- /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 0000000000..5a71ce46e5 --- /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 0000000000..05c4c3a265 --- /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 0000000000..c2b6612034 --- /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 0000000000..a615574c2d --- /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 0000000000..c8f6815930 --- /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 0000000000..dcea18551a --- /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 0000000000..c1349f8e7e --- /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 0000000000..0fcbc5546e --- /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 0000000000..8e4727a37e --- /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 0000000000..cc170df2a5 --- /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 0000000000..0ef7a37e3b --- /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 0000000000..09782f73be --- /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/corsServer.sjs b/dom/media/webaudio/test/corsServer.sjs new file mode 100644 index 0000000000..45c694cf08 --- /dev/null +++ b/dom/media/webaudio/test/corsServer.sjs @@ -0,0 +1,26 @@ +function handleRequest(request, response) { + var file = Components.classes["@mozilla.org/file/directory_service;1"] + .getService(Components.interfaces.nsIProperties) + .get("CurWorkD", Components.interfaces.nsIFile); + 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/file_nodeCreationDocumentGone.html b/dom/media/webaudio/test/file_nodeCreationDocumentGone.html new file mode 100644 index 0000000000..aedf16702f --- /dev/null +++ b/dom/media/webaudio/test/file_nodeCreationDocumentGone.html @@ -0,0 +1,4 @@ + + diff --git a/dom/media/webaudio/test/generate-test-files.py b/dom/media/webaudio/test/generate-test-files.py new file mode 100755 index 0000000000..af4bc3bb49 --- /dev/null +++ b/dom/media/webaudio/test/generate-test-files.py @@ -0,0 +1,52 @@ +#!/usr/bin/env python3 + +import os + +rates = [44100, 48000] +channels = [1, 2] +duration = "0.5" +frequency = "1000" +volume = "-3dB" +name = "half-a-second" +formats = { + "aac-in-adts": [{"codec": "aac", "extension": "aac"}], + "mp3": [{"codec": "libmp3lame", "extension": "mp3"}], + "mp4": [ + { + "codec": "libopus", + "extension": "mp4", + }, + {"codec": "aac", "extension": "mp4"}, + ], + "ogg": [ + {"codec": "libvorbis", "extension": "ogg"}, + {"codec": "libopus", "extension": "opus"}, + ], + "flac": [ + {"codec": "flac", "extension": "flac"}, + ], + "webm": [ + {"codec": "libopus", "extension": "webm"}, + {"codec": "libvorbis", "extension": "webm"}, + ], +} + +for rate in rates: + for channel_count in channels: + wav_filename = "{}-{}ch-{}.wav".format(name, channel_count, rate) + wav_command = "sox -V -r {} -n -b 16 -c {} {} synth {} sin {} vol {}".format( + rate, channel_count, wav_filename, duration, frequency, volume + ) + print(wav_command) + os.system(wav_command) + for container, codecs in formats.items(): + for codec in codecs: + encoded_filename = "{}-{}ch-{}-{}.{}".format( + name, channel_count, rate, codec["codec"], codec["extension"] + ) + print(encoded_filename) + encoded_command = "ffmpeg -y -i {} -acodec {} {}".format( + wav_filename, codec["codec"], encoded_filename + ) + print(encoded_command) + os.system(encoded_command) diff --git a/dom/media/webaudio/test/half-a-second-1ch-44100-aac-afconvert.mp4 b/dom/media/webaudio/test/half-a-second-1ch-44100-aac-afconvert.mp4 new file mode 100644 index 0000000000..7e3b008376 Binary files /dev/null and b/dom/media/webaudio/test/half-a-second-1ch-44100-aac-afconvert.mp4 differ diff --git a/dom/media/webaudio/test/half-a-second-1ch-44100-aac.aac b/dom/media/webaudio/test/half-a-second-1ch-44100-aac.aac new file mode 100644 index 0000000000..28435589ae Binary files /dev/null and b/dom/media/webaudio/test/half-a-second-1ch-44100-aac.aac differ diff --git a/dom/media/webaudio/test/half-a-second-1ch-44100-aac.mp4 b/dom/media/webaudio/test/half-a-second-1ch-44100-aac.mp4 new file mode 100644 index 0000000000..c603635f6e Binary files /dev/null and b/dom/media/webaudio/test/half-a-second-1ch-44100-aac.mp4 differ diff --git a/dom/media/webaudio/test/half-a-second-1ch-44100-flac.flac b/dom/media/webaudio/test/half-a-second-1ch-44100-flac.flac new file mode 100644 index 0000000000..49f71674f5 Binary files /dev/null and b/dom/media/webaudio/test/half-a-second-1ch-44100-flac.flac differ diff --git a/dom/media/webaudio/test/half-a-second-1ch-44100-libmp3lame.mp3 b/dom/media/webaudio/test/half-a-second-1ch-44100-libmp3lame.mp3 new file mode 100644 index 0000000000..fb1ec45af2 Binary files /dev/null and b/dom/media/webaudio/test/half-a-second-1ch-44100-libmp3lame.mp3 differ diff --git a/dom/media/webaudio/test/half-a-second-1ch-44100-libopus.mp4 b/dom/media/webaudio/test/half-a-second-1ch-44100-libopus.mp4 new file mode 100644 index 0000000000..3a7df17582 Binary files /dev/null and b/dom/media/webaudio/test/half-a-second-1ch-44100-libopus.mp4 differ diff --git a/dom/media/webaudio/test/half-a-second-1ch-44100-libopus.opus b/dom/media/webaudio/test/half-a-second-1ch-44100-libopus.opus new file mode 100644 index 0000000000..304b9f9d1d Binary files /dev/null and b/dom/media/webaudio/test/half-a-second-1ch-44100-libopus.opus differ diff --git a/dom/media/webaudio/test/half-a-second-1ch-44100-libopus.webm b/dom/media/webaudio/test/half-a-second-1ch-44100-libopus.webm new file mode 100644 index 0000000000..71be30de9c Binary files /dev/null and b/dom/media/webaudio/test/half-a-second-1ch-44100-libopus.webm differ diff --git a/dom/media/webaudio/test/half-a-second-1ch-44100-libvorbis.ogg b/dom/media/webaudio/test/half-a-second-1ch-44100-libvorbis.ogg new file mode 100644 index 0000000000..ab5ec06e50 Binary files /dev/null and b/dom/media/webaudio/test/half-a-second-1ch-44100-libvorbis.ogg differ diff --git a/dom/media/webaudio/test/half-a-second-1ch-44100-libvorbis.webm b/dom/media/webaudio/test/half-a-second-1ch-44100-libvorbis.webm new file mode 100644 index 0000000000..b5142703ba Binary files /dev/null and b/dom/media/webaudio/test/half-a-second-1ch-44100-libvorbis.webm differ diff --git a/dom/media/webaudio/test/half-a-second-1ch-44100.wav b/dom/media/webaudio/test/half-a-second-1ch-44100.wav new file mode 100644 index 0000000000..0028a66007 Binary files /dev/null and b/dom/media/webaudio/test/half-a-second-1ch-44100.wav differ diff --git a/dom/media/webaudio/test/half-a-second-1ch-48000-aac.aac b/dom/media/webaudio/test/half-a-second-1ch-48000-aac.aac new file mode 100644 index 0000000000..e1c5ba4631 Binary files /dev/null and b/dom/media/webaudio/test/half-a-second-1ch-48000-aac.aac differ diff --git a/dom/media/webaudio/test/half-a-second-1ch-48000-aac.mp4 b/dom/media/webaudio/test/half-a-second-1ch-48000-aac.mp4 new file mode 100644 index 0000000000..089d2a93e1 Binary files /dev/null and b/dom/media/webaudio/test/half-a-second-1ch-48000-aac.mp4 differ diff --git a/dom/media/webaudio/test/half-a-second-1ch-48000-flac.flac b/dom/media/webaudio/test/half-a-second-1ch-48000-flac.flac new file mode 100644 index 0000000000..783bbf2c97 Binary files /dev/null and b/dom/media/webaudio/test/half-a-second-1ch-48000-flac.flac differ diff --git a/dom/media/webaudio/test/half-a-second-1ch-48000-libmp3lame.mp3 b/dom/media/webaudio/test/half-a-second-1ch-48000-libmp3lame.mp3 new file mode 100644 index 0000000000..f9dfe29a89 Binary files /dev/null and b/dom/media/webaudio/test/half-a-second-1ch-48000-libmp3lame.mp3 differ diff --git a/dom/media/webaudio/test/half-a-second-1ch-48000-libopus.mp4 b/dom/media/webaudio/test/half-a-second-1ch-48000-libopus.mp4 new file mode 100644 index 0000000000..eb48fdac1b Binary files /dev/null and b/dom/media/webaudio/test/half-a-second-1ch-48000-libopus.mp4 differ diff --git a/dom/media/webaudio/test/half-a-second-1ch-48000-libopus.opus b/dom/media/webaudio/test/half-a-second-1ch-48000-libopus.opus new file mode 100644 index 0000000000..1b7cefcb3f Binary files /dev/null and b/dom/media/webaudio/test/half-a-second-1ch-48000-libopus.opus differ diff --git a/dom/media/webaudio/test/half-a-second-1ch-48000-libopus.webm b/dom/media/webaudio/test/half-a-second-1ch-48000-libopus.webm new file mode 100644 index 0000000000..c06e5d7583 Binary files /dev/null and b/dom/media/webaudio/test/half-a-second-1ch-48000-libopus.webm differ diff --git a/dom/media/webaudio/test/half-a-second-1ch-48000-libvorbis.ogg b/dom/media/webaudio/test/half-a-second-1ch-48000-libvorbis.ogg new file mode 100644 index 0000000000..ad88da968c Binary files /dev/null and b/dom/media/webaudio/test/half-a-second-1ch-48000-libvorbis.ogg differ diff --git a/dom/media/webaudio/test/half-a-second-1ch-48000-libvorbis.webm b/dom/media/webaudio/test/half-a-second-1ch-48000-libvorbis.webm new file mode 100644 index 0000000000..d63e2c31d3 Binary files /dev/null and b/dom/media/webaudio/test/half-a-second-1ch-48000-libvorbis.webm differ diff --git a/dom/media/webaudio/test/half-a-second-1ch-48000.wav b/dom/media/webaudio/test/half-a-second-1ch-48000.wav new file mode 100644 index 0000000000..d1fcb21134 Binary files /dev/null and b/dom/media/webaudio/test/half-a-second-1ch-48000.wav differ diff --git a/dom/media/webaudio/test/half-a-second-2ch-44100-aac.aac b/dom/media/webaudio/test/half-a-second-2ch-44100-aac.aac new file mode 100644 index 0000000000..d2255e982b Binary files /dev/null and b/dom/media/webaudio/test/half-a-second-2ch-44100-aac.aac differ diff --git a/dom/media/webaudio/test/half-a-second-2ch-44100-aac.mp4 b/dom/media/webaudio/test/half-a-second-2ch-44100-aac.mp4 new file mode 100644 index 0000000000..fbdd17e416 Binary files /dev/null and b/dom/media/webaudio/test/half-a-second-2ch-44100-aac.mp4 differ diff --git a/dom/media/webaudio/test/half-a-second-2ch-44100-flac.flac b/dom/media/webaudio/test/half-a-second-2ch-44100-flac.flac new file mode 100644 index 0000000000..9cc57c24bd Binary files /dev/null and b/dom/media/webaudio/test/half-a-second-2ch-44100-flac.flac differ diff --git a/dom/media/webaudio/test/half-a-second-2ch-44100-libmp3lame.mp3 b/dom/media/webaudio/test/half-a-second-2ch-44100-libmp3lame.mp3 new file mode 100644 index 0000000000..399df50839 Binary files /dev/null and b/dom/media/webaudio/test/half-a-second-2ch-44100-libmp3lame.mp3 differ diff --git a/dom/media/webaudio/test/half-a-second-2ch-44100-libopus.mp4 b/dom/media/webaudio/test/half-a-second-2ch-44100-libopus.mp4 new file mode 100644 index 0000000000..242fb3e12e Binary files /dev/null and b/dom/media/webaudio/test/half-a-second-2ch-44100-libopus.mp4 differ diff --git a/dom/media/webaudio/test/half-a-second-2ch-44100-libopus.opus b/dom/media/webaudio/test/half-a-second-2ch-44100-libopus.opus new file mode 100644 index 0000000000..a9311b5f9c Binary files /dev/null and b/dom/media/webaudio/test/half-a-second-2ch-44100-libopus.opus differ diff --git a/dom/media/webaudio/test/half-a-second-2ch-44100-libopus.webm b/dom/media/webaudio/test/half-a-second-2ch-44100-libopus.webm new file mode 100644 index 0000000000..ca8876d5e1 Binary files /dev/null and b/dom/media/webaudio/test/half-a-second-2ch-44100-libopus.webm differ diff --git a/dom/media/webaudio/test/half-a-second-2ch-44100-libvorbis.ogg b/dom/media/webaudio/test/half-a-second-2ch-44100-libvorbis.ogg new file mode 100644 index 0000000000..edf76edf89 Binary files /dev/null and b/dom/media/webaudio/test/half-a-second-2ch-44100-libvorbis.ogg differ diff --git a/dom/media/webaudio/test/half-a-second-2ch-44100-libvorbis.webm b/dom/media/webaudio/test/half-a-second-2ch-44100-libvorbis.webm new file mode 100644 index 0000000000..b01575c526 Binary files /dev/null and b/dom/media/webaudio/test/half-a-second-2ch-44100-libvorbis.webm differ diff --git a/dom/media/webaudio/test/half-a-second-2ch-44100.wav b/dom/media/webaudio/test/half-a-second-2ch-44100.wav new file mode 100644 index 0000000000..ae37e12813 Binary files /dev/null and b/dom/media/webaudio/test/half-a-second-2ch-44100.wav differ diff --git a/dom/media/webaudio/test/half-a-second-2ch-48000-aac.aac b/dom/media/webaudio/test/half-a-second-2ch-48000-aac.aac new file mode 100644 index 0000000000..d26803d76f Binary files /dev/null and b/dom/media/webaudio/test/half-a-second-2ch-48000-aac.aac differ diff --git a/dom/media/webaudio/test/half-a-second-2ch-48000-aac.mp4 b/dom/media/webaudio/test/half-a-second-2ch-48000-aac.mp4 new file mode 100644 index 0000000000..d7e3140580 Binary files /dev/null and b/dom/media/webaudio/test/half-a-second-2ch-48000-aac.mp4 differ diff --git a/dom/media/webaudio/test/half-a-second-2ch-48000-flac.flac b/dom/media/webaudio/test/half-a-second-2ch-48000-flac.flac new file mode 100644 index 0000000000..624e5280ff Binary files /dev/null and b/dom/media/webaudio/test/half-a-second-2ch-48000-flac.flac differ diff --git a/dom/media/webaudio/test/half-a-second-2ch-48000-libmp3lame.mp3 b/dom/media/webaudio/test/half-a-second-2ch-48000-libmp3lame.mp3 new file mode 100644 index 0000000000..bd009ebfb4 Binary files /dev/null and b/dom/media/webaudio/test/half-a-second-2ch-48000-libmp3lame.mp3 differ diff --git a/dom/media/webaudio/test/half-a-second-2ch-48000-libopus.mp4 b/dom/media/webaudio/test/half-a-second-2ch-48000-libopus.mp4 new file mode 100644 index 0000000000..89e2b19256 Binary files /dev/null and b/dom/media/webaudio/test/half-a-second-2ch-48000-libopus.mp4 differ diff --git a/dom/media/webaudio/test/half-a-second-2ch-48000-libopus.opus b/dom/media/webaudio/test/half-a-second-2ch-48000-libopus.opus new file mode 100644 index 0000000000..1e3c72b7b2 Binary files /dev/null and b/dom/media/webaudio/test/half-a-second-2ch-48000-libopus.opus differ diff --git a/dom/media/webaudio/test/half-a-second-2ch-48000-libopus.webm b/dom/media/webaudio/test/half-a-second-2ch-48000-libopus.webm new file mode 100644 index 0000000000..c7306df2ef Binary files /dev/null and b/dom/media/webaudio/test/half-a-second-2ch-48000-libopus.webm differ diff --git a/dom/media/webaudio/test/half-a-second-2ch-48000-libvorbis.ogg b/dom/media/webaudio/test/half-a-second-2ch-48000-libvorbis.ogg new file mode 100644 index 0000000000..63e6d2bb87 Binary files /dev/null and b/dom/media/webaudio/test/half-a-second-2ch-48000-libvorbis.ogg differ diff --git a/dom/media/webaudio/test/half-a-second-2ch-48000-libvorbis.webm b/dom/media/webaudio/test/half-a-second-2ch-48000-libvorbis.webm new file mode 100644 index 0000000000..589370d6e2 Binary files /dev/null and b/dom/media/webaudio/test/half-a-second-2ch-48000-libvorbis.webm differ diff --git a/dom/media/webaudio/test/half-a-second-2ch-48000.wav b/dom/media/webaudio/test/half-a-second-2ch-48000.wav new file mode 100644 index 0000000000..e9fc21e30b Binary files /dev/null and b/dom/media/webaudio/test/half-a-second-2ch-48000.wav differ diff --git a/dom/media/webaudio/test/invalid.txt b/dom/media/webaudio/test/invalid.txt new file mode 100644 index 0000000000..c44840faf1 --- /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/invalidContent.flac b/dom/media/webaudio/test/invalidContent.flac new file mode 100644 index 0000000000..b2f4e1ff7a --- /dev/null +++ b/dom/media/webaudio/test/invalidContent.flac @@ -0,0 +1 @@ +fLaC diff --git a/dom/media/webaudio/test/layouttest-glue.js b/dom/media/webaudio/test/layouttest-glue.js new file mode 100644 index 0000000000..0ed0b9dc90 --- /dev/null +++ b/dom/media/webaudio/test/layouttest-glue.js @@ -0,0 +1,18 @@ +// 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 0000000000..0d303702eb --- /dev/null +++ b/dom/media/webaudio/test/mochitest.ini @@ -0,0 +1,215 @@ +[DEFAULT] +tags = mtg webaudio +subsuite = media +support-files = + 8kHz-320kbps-6ch.aac + audio-expected.wav + audio-mono-expected-2.wav + audio-mono-expected.wav + audio-quad.wav + audio.ogv + audiovideo.mp4 + audioBufferSourceNodeDetached_worker.js + corsServer.sjs + !/dom/events/test/event_leak_utils.js + file_nodeCreationDocumentGone.html + invalid.txt + invalidContent.flac + layouttest-glue.js + nil-packet.ogg + 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 + # See ./generate-test-files.py + half-a-second-1ch-44100-aac.aac + half-a-second-1ch-44100-aac.mp4 + half-a-second-1ch-44100-flac.flac + half-a-second-1ch-44100-libmp3lame.mp3 + half-a-second-1ch-44100-libopus.mp4 + half-a-second-1ch-44100-libopus.opus + half-a-second-1ch-44100-libopus.webm + half-a-second-1ch-44100-libvorbis.ogg + half-a-second-1ch-44100-libvorbis.webm + half-a-second-1ch-44100.wav + half-a-second-1ch-48000-aac.aac + half-a-second-1ch-48000-aac.mp4 + half-a-second-1ch-48000-flac.flac + half-a-second-1ch-48000-libmp3lame.mp3 + half-a-second-1ch-48000-libopus.mp4 + half-a-second-1ch-48000-libopus.opus + half-a-second-1ch-48000-libopus.webm + half-a-second-1ch-48000-libvorbis.ogg + half-a-second-1ch-48000-libvorbis.webm + half-a-second-1ch-48000.wav + half-a-second-2ch-44100-aac.aac + half-a-second-2ch-44100-aac.mp4 + half-a-second-2ch-44100-flac.flac + half-a-second-2ch-44100-libmp3lame.mp3 + half-a-second-2ch-44100-libopus.mp4 + half-a-second-2ch-44100-libopus.opus + half-a-second-2ch-44100-libopus.webm + half-a-second-2ch-44100-libvorbis.ogg + half-a-second-2ch-44100-libvorbis.webm + half-a-second-2ch-44100.wav + half-a-second-2ch-48000-aac.aac + half-a-second-2ch-48000-aac.mp4 + half-a-second-2ch-48000-flac.flac + half-a-second-2ch-48000-libmp3lame.mp3 + half-a-second-2ch-48000-libopus.mp4 + half-a-second-2ch-48000-libopus.opus + half-a-second-2ch-48000-libopus.webm + half-a-second-2ch-48000-libvorbis.ogg + half-a-second-2ch-48000-libvorbis.webm + half-a-second-2ch-48000.wav + half-a-second-1ch-44100-aac-afconvert.mp4 + sixteen-frames.mp3 # only 16 frames of valid audio + ../../webrtc/tests/mochitests/mediaStreamPlayback.js + ../../webrtc/tests/mochitests/head.js + +[test_analyserNode.html] +skip-if = !asan && toolkit != android # These are tested in web-platform-tests, except on ASan and Android which don't run WPT. +[test_analyserScale.html] +skip-if = !asan && toolkit != android # These are tested in web-platform-tests, except on ASan and Android which don't run WPT. +[test_analyserNodeOutput.html] +skip-if = !asan && toolkit != android # These are tested in web-platform-tests, except on ASan and Android which don't run WPT. +[test_analyserNodePassThrough.html] +[test_analyserNodeWithGain.html] +skip-if = !asan && toolkit != android # These are tested in web-platform-tests, except on ASan and Android which don't run WPT. +[test_analyserNodeMinimum.html] +skip-if = !asan && toolkit != android # These are tested in web-platform-tests, except on ASan and Android which don't run WPT. +[test_channelMergerNode.html] +[test_channelMergerNodeWithVolume.html] +[test_channelSplitterNode.html] +[test_channelSplitterNodeWithVolume.html] +[test_convolverNode.html] +[test_convolverNode_mono_mono.html] +[test_convolverNodeChannelCount.html] +[test_convolverNodeChannelInterpretationChanges.html] +[test_convolverNodeDelay.html] +[test_convolverNodeFiniteInfluence.html] +[test_convolverNodeOOM.html] +skip-if = asan + tsan # 1672869 +[test_convolverNodeNormalization.html] +[test_convolverNodePassThrough.html] +[test_convolverNodeWithGain.html] +[test_convolver-upmixing-1-channel-response.html] +# This is a copy of +# testing/web-platform/tests/webaudio/the-audio-api/the-convolvernode-interface/convolver-upmixing-1-channel-response.html, +# but WPT are not run with ASan or Android builds. +skip-if = !asan && toolkit != android +[test_currentTime.html] +[test_decodeAudioDataOnDetachedBuffer.html] +[test_decodeAudioDataPromise.html] +[test_decodeAudioError.html] +[test_decodeMultichannel.html] +[test_decodeOpusTail.html] +[test_decoderDelay.html] +[test_delayNode.html] +[test_delayNodeAtMax.html] +[test_delayNodeChannelChanges.html] +[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_delaynode-channel-count-1.html] +# This is a copy of +# testing/web-platform/tests/webaudio/the-audio-api/the-delaynode-interface/delaynode-channel-count-1.html +# but WPT are not run with ASan or Android builds. +skip-if = !asan && toolkit != android +[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_event_listener_leaks.html] +skip-if = (os == 'win' && processor == 'aarch64') # bug 1531927 +[test_gainNode.html] +[test_gainNodeInLoop.html] +[test_gainNodePassThrough.html] +[test_iirFilterNodePassThrough.html] +[test_maxChannelCount.html] +skip-if = (os == "win" && processor == "aarch64") # aarch64 due to 1538360 +[test_mixingRules.html] +[test_nodeToParamConnection.html] +[test_nodeCreationDocumentGone.html] +[test_notAllowedToStartAudioContextGC.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_pannerNode_audioparam_distance.html] +[test_pannerNodeAbove.html] +[test_pannerNodeAtZeroDistance.html] +[test_pannerNodeChannelCount.html] +[test_pannerNodeHRTFSymmetry.html] +[test_pannerNodeTail.html] +[test_pannerNode_maxDistance.html] +[test_slowStart.html] +[test_setValueCurveWithNonFiniteElements.html] +[test_stereoPannerNode.html] +[test_stereoPannerNodePassThrough.html] +[test_periodicWave.html] +[test_periodicWaveDisableNormalization.html] +[test_periodicWaveBandLimiting.html] +[test_retrospective-exponentialRampToValueAtTime.html] +[test_retrospective-linearRampToValueAtTime.html] +[test_retrospective-setTargetAtTime.html] +[test_retrospective-setValueAtTime.html] +[test_retrospective-setValueCurveAtTime.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] +skip-if = (os == "win" && processor == "aarch64") # aarch64 due to 1538360 +[test_stereoPanningWithGain.html] +[test_waveDecoder.html] +[test_waveShaper.html] +[test_waveShaperGain.html] +[test_waveShaperNoCurve.html] +[test_waveShaperPassThrough.html] +[test_waveShaperInvalidLengthCurve.html] +[test_WebAudioMemoryReporting.html] +[test_audioContextParams_sampleRate.html] +[test_webAudio_muteTab.html] +scheme = https +skip-if = os == 'mac' + os == 'win' + toolkit == 'android' # Bug 1404995, no loopback devices on some platforms +[test_audioContextParams_recordNonDefaultSampleRate.html] diff --git a/dom/media/webaudio/test/mochitest_audio.ini b/dom/media/webaudio/test/mochitest_audio.ini new file mode 100644 index 0000000000..8f6c35f9a7 --- /dev/null +++ b/dom/media/webaudio/test/mochitest_audio.ini @@ -0,0 +1,69 @@ +[DEFAULT] +tags = mtg 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 + !/dom/events/test/event_leak_utils.js + file_nodeCreationDocumentGone.html + invalid.txt + invalidContent.flac + layouttest-glue.js + nil-packet.ogg + 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 + ../../webrtc/tests/mochitests/mediaStreamPlayback.js + ../../webrtc/tests/mochitests/head.js + +[test_AudioBuffer.html] +[test_audioBufferSourceNode.html] +[test_audioBufferSourceNodeEnded.html] +[test_audioBufferSourceNodeLazyLoopParam.html] +[test_audioBufferSourceNodeLoop.html] +[test_audioBufferSourceNodeLoopStartEnd.html] +[test_audioBufferSourceNodeLoopStartEndSame.html] +[test_audioBufferSourceNodeDetached.html] +[test_audioBufferSourceNodeNoStart.html] +[test_audioBufferSourceNodeNullBuffer.html] +[test_audioBufferSourceNodeOffset.html] +[test_audioBufferSourceNodePassThrough.html] +[test_audioBufferSourceNodeRate.html] +[test_AudioContext.html] +[test_AudioContext_disabled.html] +[test_audioContextGC.html] +[test_audioContextSuspendResumeClose.html] +tags=capturestream +skip-if = (os == "win" && processor == "aarch64") # aarch64 due to 1539522 +[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_audioParamSetTargetAtTime.html] +[test_audioParamSetTargetAtTimeZeroTimeConstant.html] +[test_audioParamSetValueAtTime.html] +[test_audioParamTimelineDestinationOffset.html] diff --git a/dom/media/webaudio/test/mochitest_bugs.ini b/dom/media/webaudio/test/mochitest_bugs.ini new file mode 100644 index 0000000000..66b645673a --- /dev/null +++ b/dom/media/webaudio/test/mochitest_bugs.ini @@ -0,0 +1,65 @@ +[DEFAULT] +tags = mtg 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 + !/dom/events/test/event_leak_utils.js + file_nodeCreationDocumentGone.html + invalid.txt + invalidContent.flac + layouttest-glue.js + nil-packet.ogg + 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 + ../../webrtc/tests/mochitests/mediaStreamPlayback.js + ../../webrtc/tests/mochitests/head.js + +[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_bug867174.html] +[test_bug873335.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] +skip-if = true #Bug 1650930 +[test_bug1056032.html] +[test_bug1255618.html] +skip-if = (os == "win" && processor == "aarch64") # aarch64 due to 1538360 +[test_bug1267579.html] +[test_bug1355798.html] +[test_bug1447273.html] diff --git a/dom/media/webaudio/test/mochitest_media.ini b/dom/media/webaudio/test/mochitest_media.ini new file mode 100644 index 0000000000..be153c90c8 --- /dev/null +++ b/dom/media/webaudio/test/mochitest_media.ini @@ -0,0 +1,64 @@ +[DEFAULT] +tags = mtg 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 + !/dom/events/test/event_leak_utils.js + file_nodeCreationDocumentGone.html + invalid.txt + invalidContent.flac + layouttest-glue.js + nil-packet.ogg + 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 + ../../webrtc/tests/mochitests/mediaStreamPlayback.js + ../../webrtc/tests/mochitests/head.js + +[test_mediaDecoding.html] +[test_mediaElementAudioSourceNode.html] +tags=capturestream +[test_mediaElementAudioSourceNodeFidelity.html] +tags=capturestream +skip-if = (os == "win" && processor == "aarch64") # aarch64 due to 1538360 +[test_mediaElementAudioSourceNodePassThrough.html] +tags=capturestream +[test_mediaElementAudioSourceNodeVideo.html] +tags=capturestream + +[test_mediaElementAudioSourceNodeCrossOrigin.html] +tags=capturestream +[test_mediaStreamAudioDestinationNode.html] +[test_mediaStreamAudioSourceNode.html] +[test_mediaStreamAudioSourceNodeCrossOrigin.html] +tags=capturestream +[test_mediaStreamAudioSourceNodeNoGC.html] +skip-if = os == "mac" && debug # Bug 1756880 - lower frequency shutdown hangs +scheme=https + +[test_mediaStreamAudioSourceNodePassThrough.html] +[test_mediaStreamAudioSourceNodeResampling.html] +tags=capturestream +[test_mediaStreamTrackAudioSourceNode.html] +[test_mediaStreamTrackAudioSourceNodeVideo.html] +[test_mediaStreamTrackAudioSourceNodeCrossOrigin.html] diff --git a/dom/media/webaudio/test/nil-packet.ogg b/dom/media/webaudio/test/nil-packet.ogg new file mode 100644 index 0000000000..7b00b5a63e Binary files /dev/null and b/dom/media/webaudio/test/nil-packet.ogg differ diff --git a/dom/media/webaudio/test/noaudio.webm b/dom/media/webaudio/test/noaudio.webm new file mode 100644 index 0000000000..9207017fb6 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 0000000000..eb91020168 Binary files /dev/null and b/dom/media/webaudio/test/sine-440-10s.opus differ diff --git a/dom/media/webaudio/test/sixteen-frames.mp3 b/dom/media/webaudio/test/sixteen-frames.mp3 new file mode 100644 index 0000000000..1d15dcad59 Binary files /dev/null and b/dom/media/webaudio/test/sixteen-frames.mp3 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 0000000000..2faaa8258b 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 0000000000..d4e2647e42 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 0000000000..f9397a5106 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 0000000000..1a41623f81 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 0000000000..619d1e0844 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 0000000000..05957f679e --- /dev/null +++ b/dom/media/webaudio/test/test_AudioBuffer.html @@ -0,0 +1,104 @@ + + + + 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 0000000000..50aeee489e --- /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 0000000000..9c3651a883 --- /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 0000000000..e3d605cbcc --- /dev/null +++ b/dom/media/webaudio/test/test_AudioListener.html @@ -0,0 +1,26 @@ + + + + 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 0000000000..f032ed88f0 --- /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 0000000000..81fdd357c9 --- /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 0000000000..d9403566ae --- /dev/null +++ b/dom/media/webaudio/test/test_OfflineAudioContext.html @@ -0,0 +1,118 @@ + + + + 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 0000000000..8f05889d26 --- /dev/null +++ b/dom/media/webaudio/test/test_ScriptProcessorCollected1.html @@ -0,0 +1,77 @@ + + + + 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 0000000000..693e558304 --- /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 0000000000..0793eeb2cb --- /dev/null +++ b/dom/media/webaudio/test/test_analyserNode.html @@ -0,0 +1,178 @@ + + + + Test AnalyserNode + + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_analyserNodeMinimum.html b/dom/media/webaudio/test/test_analyserNodeMinimum.html new file mode 100644 index 0000000000..950fd1812b --- /dev/null +++ b/dom/media/webaudio/test/test_analyserNodeMinimum.html @@ -0,0 +1,51 @@ + + + + Test AnalyserNode when the input is silent + + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_analyserNodeOutput.html b/dom/media/webaudio/test/test_analyserNodeOutput.html new file mode 100644 index 0000000000..27b354e92d --- /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 0000000000..50ff94a8c7 --- /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 0000000000..fa0a2caa75 --- /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 0000000000..f11e4f2b28 --- /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 0000000000..fc7c0b48d1 --- /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 0000000000..e84c33e585 --- /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 0000000000..a11bb880a2 --- /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 0000000000..757d4487c4 --- /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 0000000000..10d5d99108 --- /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 0000000000..1ef08e0b83 --- /dev/null +++ b/dom/media/webaudio/test/test_audioBufferSourceNodeLoopStartEnd.html @@ -0,0 +1,48 @@ + + + + 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 0000000000..cfe054f838 --- /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 0000000000..e9a0472e2a --- /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 0000000000..b0b405b366 --- /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 0000000000..0411b74ce5 --- /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 0000000000..6cb0cccf99 --- /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 0000000000..85049bfd6d --- /dev/null +++ b/dom/media/webaudio/test/test_audioBufferSourceNodeRate.html @@ -0,0 +1,58 @@ + + + + Test AudioBufferSourceNode + + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_audioContextGC.html b/dom/media/webaudio/test/test_audioContextGC.html new file mode 100644 index 0000000000..be9990cfad --- /dev/null +++ b/dom/media/webaudio/test/test_audioContextGC.html @@ -0,0 +1,162 @@ + + + + Test inactive AudioContext is garbage collected + + + + + + + + diff --git a/dom/media/webaudio/test/test_audioContextParams_recordNonDefaultSampleRate.html b/dom/media/webaudio/test/test_audioContextParams_recordNonDefaultSampleRate.html new file mode 100644 index 0000000000..8177202117 --- /dev/null +++ b/dom/media/webaudio/test/test_audioContextParams_recordNonDefaultSampleRate.html @@ -0,0 +1,48 @@ + + + + + + + + +
+
+
+
+ + diff --git a/dom/media/webaudio/test/test_audioContextParams_sampleRate.html b/dom/media/webaudio/test/test_audioContextParams_sampleRate.html new file mode 100644 index 0000000000..280452403d --- /dev/null +++ b/dom/media/webaudio/test/test_audioContextParams_sampleRate.html @@ -0,0 +1,81 @@ + + + + + + +
+
+
+
+ + diff --git a/dom/media/webaudio/test/test_audioContextSuspendResumeClose.html b/dom/media/webaudio/test/test_audioContextSuspendResumeClose.html new file mode 100644 index 0000000000..36cf8f720c --- /dev/null +++ b/dom/media/webaudio/test/test_audioContextSuspendResumeClose.html @@ -0,0 +1,419 @@ + + + + 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 0000000000..e7a8b091ba --- /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 0000000000..85b8099e2e --- /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 0000000000..2416b5de14 --- /dev/null +++ b/dom/media/webaudio/test/test_audioParamExponentialRamp.html @@ -0,0 +1,58 @@ + + + + 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 0000000000..3977b94703 --- /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 0000000000..5ec26467e8 --- /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 0000000000..e21b58bb19 --- /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_audioParamSetTargetAtTime.html b/dom/media/webaudio/test/test_audioParamSetTargetAtTime.html new file mode 100644 index 0000000000..3328519f12 --- /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 0000000000..9982023c21 --- /dev/null +++ b/dom/media/webaudio/test/test_audioParamSetTargetAtTimeZeroTimeConstant.html @@ -0,0 +1,58 @@ + + + + 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 0000000000..18c02837e6 --- /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 0000000000..76db12f88a --- /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 0000000000..51e83f6088 --- /dev/null +++ b/dom/media/webaudio/test/test_badConnect.html @@ -0,0 +1,52 @@ + + + + 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 0000000000..561198c491 --- /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 0000000000..4db01b0b14 --- /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 0000000000..d97a753de9 --- /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 0000000000..847485ff88 --- /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 0000000000..ba38267e19 --- /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 0000000000..acdcba7c25 --- /dev/null +++ b/dom/media/webaudio/test/test_bug1113634.html @@ -0,0 +1,58 @@ + + + + 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 0000000000..f049b221e8 --- /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 0000000000..15e7351995 --- /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 0000000000..7003b345f5 --- /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_bug1355798.html b/dom/media/webaudio/test/test_bug1355798.html new file mode 100644 index 0000000000..9b46322bbc --- /dev/null +++ b/dom/media/webaudio/test/test_bug1355798.html @@ -0,0 +1,30 @@ + + + + Test PannerNode produces output even when the even when the distance is + from the listener is zero, and the cone gain is present, regression test for + bug 1355798. + + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_bug1447273.html b/dom/media/webaudio/test/test_bug1447273.html new file mode 100644 index 0000000000..f4b473d8ab --- /dev/null +++ b/dom/media/webaudio/test/test_bug1447273.html @@ -0,0 +1,175 @@ + + + + Test bug 1447273 - GainNode with a stereo input and changing volume + + + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_bug808374.html b/dom/media/webaudio/test/test_bug808374.html new file mode 100644 index 0000000000..b255c0b9c3 --- /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 0000000000..f205c7edf9 --- /dev/null +++ b/dom/media/webaudio/test/test_bug827541.html @@ -0,0 +1,24 @@ + + + + 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 0000000000..f3e6598116 --- /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 0000000000..17bf9a5700 --- /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 0000000000..24a527ccd5 --- /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 0000000000..90bd8f6985 --- /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 0000000000..e8db6b76e8 --- /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 0000000000..e5a5179530 --- /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_bug867174.html b/dom/media/webaudio/test/test_bug867174.html new file mode 100644 index 0000000000..e949bcec41 --- /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_bug873335.html b/dom/media/webaudio/test/test_bug873335.html new file mode 100644 index 0000000000..19fd6d4dae --- /dev/null +++ b/dom/media/webaudio/test/test_bug873335.html @@ -0,0 +1,22 @@ + + + + + + + + + diff --git a/dom/media/webaudio/test/test_bug875221.html b/dom/media/webaudio/test/test_bug875221.html new file mode 100644 index 0000000000..5eb017d011 --- /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 0000000000..95c8e0e236 --- /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 0000000000..4577232d71 --- /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 0000000000..f0ae559b05 --- /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 0000000000..bc9d167dcd --- /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 0000000000..69831c33b6 --- /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 0000000000..1450c19645 --- /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 0000000000..b62d34d6ba --- /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 0000000000..55b9ec0c0b --- /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 0000000000..d74845f821 --- /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 0000000000..c03f6deeaf --- /dev/null +++ b/dom/media/webaudio/test/test_channelSplitterNodeWithVolume.html @@ -0,0 +1,76 @@ + + + + Test ChannelSplitterNode + + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_convolver-upmixing-1-channel-response.html b/dom/media/webaudio/test/test_convolver-upmixing-1-channel-response.html new file mode 100644 index 0000000000..50bd594821 --- /dev/null +++ b/dom/media/webaudio/test/test_convolver-upmixing-1-channel-response.html @@ -0,0 +1,143 @@ + +Test that up-mixing signals in ConvolverNode processing is linear + + + diff --git a/dom/media/webaudio/test/test_convolverNode.html b/dom/media/webaudio/test/test_convolverNode.html new file mode 100644 index 0000000000..c1677aafab --- /dev/null +++ b/dom/media/webaudio/test/test_convolverNode.html @@ -0,0 +1,31 @@ + + + + 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 0000000000..03824578ea --- /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_convolverNodeChannelInterpretationChanges.html b/dom/media/webaudio/test/test_convolverNodeChannelInterpretationChanges.html new file mode 100644 index 0000000000..bede517b2e --- /dev/null +++ b/dom/media/webaudio/test/test_convolverNodeChannelInterpretationChanges.html @@ -0,0 +1,169 @@ + +Test up-mixing in ConvolverNode after ChannelInterpretation change + + + diff --git a/dom/media/webaudio/test/test_convolverNodeDelay.html b/dom/media/webaudio/test/test_convolverNodeDelay.html new file mode 100644 index 0000000000..2e8caf8027 --- /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 0000000000..1cfb51ce8a --- /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_convolverNodeNormalization.html b/dom/media/webaudio/test/test_convolverNodeNormalization.html new file mode 100644 index 0000000000..24cb7d1670 --- /dev/null +++ b/dom/media/webaudio/test/test_convolverNodeNormalization.html @@ -0,0 +1,83 @@ + +Test normalization of convolution buffers + + + diff --git a/dom/media/webaudio/test/test_convolverNodeOOM.html b/dom/media/webaudio/test/test_convolverNodeOOM.html new file mode 100644 index 0000000000..2983d2f65c --- /dev/null +++ b/dom/media/webaudio/test/test_convolverNodeOOM.html @@ -0,0 +1,46 @@ + + + + Test ConvolverNode with very large buffer that triggers an OOM + + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_convolverNodePassThrough.html b/dom/media/webaudio/test/test_convolverNodePassThrough.html new file mode 100644 index 0000000000..54682aee0c --- /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 0000000000..0762f16329 --- /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 0000000000..1585e1b619 --- /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 0000000000..66fdf42653 --- /dev/null +++ b/dom/media/webaudio/test/test_currentTime.html @@ -0,0 +1,27 @@ + + + + Test AudioContext.currentTime + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_decodeAudioDataOnDetachedBuffer.html b/dom/media/webaudio/test/test_decodeAudioDataOnDetachedBuffer.html new file mode 100644 index 0000000000..e7c6d2db0c --- /dev/null +++ b/dom/media/webaudio/test/test_decodeAudioDataOnDetachedBuffer.html @@ -0,0 +1,50 @@ + + + + + Bug 1308434 - Test DecodeAudioData on detached buffer + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_decodeAudioDataPromise.html b/dom/media/webaudio/test/test_decodeAudioDataPromise.html new file mode 100644 index 0000000000..139a686db1 --- /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_decodeAudioError.html b/dom/media/webaudio/test/test_decodeAudioError.html new file mode 100644 index 0000000000..f18b971ac4 --- /dev/null +++ b/dom/media/webaudio/test/test_decodeAudioError.html @@ -0,0 +1,74 @@ + + + + Test the decodeAudioData Errors + + + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_decodeMultichannel.html b/dom/media/webaudio/test/test_decodeMultichannel.html new file mode 100644 index 0000000000..a799c641ee --- /dev/null +++ b/dom/media/webaudio/test/test_decodeMultichannel.html @@ -0,0 +1,75 @@ + + + + + Test that we can decode multichannel file with webaudio and <audio> + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_decodeOpusTail.html b/dom/media/webaudio/test/test_decodeOpusTail.html new file mode 100644 index 0000000000..451b2b6a23 --- /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_decoderDelay.html b/dom/media/webaudio/test/test_decoderDelay.html
new file mode 100644
index 0000000000..d0fbfbed29
--- /dev/null
+++ b/dom/media/webaudio/test/test_decoderDelay.html
@@ -0,0 +1,144 @@
+
+
+
+  
+  Test that decoder delay is handled
+  
+  
+
+
+  
+
+
diff --git a/dom/media/webaudio/test/test_delayNode.html b/dom/media/webaudio/test/test_delayNode.html
new file mode 100644
index 0000000000..89172aa86f
--- /dev/null
+++ b/dom/media/webaudio/test/test_delayNode.html
@@ -0,0 +1,101 @@
+
+
+
+  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 0000000000..3d0afba0ac --- /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 0000000000..d40c792ef7 --- /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 0000000000..82c5f62504 --- /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 0000000000..0c2d1db30a --- /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 0000000000..235a55a4c8 --- /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 0000000000..a511a4a3ff --- /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 0000000000..c6723f643d --- /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 0000000000..60cca276c0 --- /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 0000000000..da5f02b052 --- /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 0000000000..af075c7439 --- /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_delaynode-channel-count-1.html b/dom/media/webaudio/test/test_delaynode-channel-count-1.html new file mode 100644 index 0000000000..dd964ef9e3 --- /dev/null +++ b/dom/media/webaudio/test/test_delaynode-channel-count-1.html @@ -0,0 +1,104 @@ + +Test that DelayNode output channelCount matches that of the delayed input + + + diff --git a/dom/media/webaudio/test/test_disconnectAll.html b/dom/media/webaudio/test/test_disconnectAll.html new file mode 100644 index 0000000000..f67b969949 --- /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 0000000000..bfa4f92312 --- /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 0000000000..533091f920 --- /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 0000000000..54fde4df8d --- /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 0000000000..e6ec9d941c --- /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 0000000000..566a84edbd --- /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 0000000000..478768c62d --- /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 0000000000..dff1562d7a --- /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 0000000000..9a7fe354a9 --- /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 0000000000..05b6887a53 --- /dev/null +++ b/dom/media/webaudio/test/test_dynamicsCompressorNode.html @@ -0,0 +1,68 @@ + + + + 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 0000000000..9e8d794547 --- /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 0000000000..7e6487e3f8 --- /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_event_listener_leaks.html b/dom/media/webaudio/test/test_event_listener_leaks.html new file mode 100644 index 0000000000..a3bcc9259e --- /dev/null +++ b/dom/media/webaudio/test/test_event_listener_leaks.html @@ -0,0 +1,47 @@ + + + + + Bug 1450358 - Test AudioContext event listener leak conditions + + + + + + +
+ + + diff --git a/dom/media/webaudio/test/test_gainNode.html b/dom/media/webaudio/test/test_gainNode.html new file mode 100644 index 0000000000..77b0ae88b0 --- /dev/null +++ b/dom/media/webaudio/test/test_gainNode.html @@ -0,0 +1,72 @@ + + + + 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 0000000000..90dedc0ef4 --- /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 0000000000..5a973ccaa2 --- /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 0000000000..ab54499e04 --- /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 0000000000..1a4e5c856e --- /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 0000000000..d796ef6add --- /dev/null +++ b/dom/media/webaudio/test/test_mediaDecoding.html @@ -0,0 +1,388 @@ + + + + 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 0000000000..36e1e9f2cc --- /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 0000000000..778658b332 --- /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 0000000000..42d6d6a045 --- /dev/null +++ b/dom/media/webaudio/test/test_mediaElementAudioSourceNodeFidelity.html @@ -0,0 +1,137 @@ + + + + + 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 0000000000..5ee12b16ad
--- /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 0000000000..dcb85f12cb --- /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 0000000000..fd0ce8141b --- /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 0000000000..eaa8a564b9
--- /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 0000000000..d79ce50ab8 --- /dev/null +++ b/dom/media/webaudio/test/test_mediaStreamAudioSourceNodeCrossOrigin.html @@ -0,0 +1,60 @@ + + + + + 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 0000000000..7920af9f7b --- /dev/null +++ b/dom/media/webaudio/test/test_mediaStreamAudioSourceNodeNoGC.html @@ -0,0 +1,116 @@ + + + + + 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 0000000000..379bfdbc6a --- /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 0000000000..efacf1ecc5 --- /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_mediaStreamTrackAudioSourceNode.html b/dom/media/webaudio/test/test_mediaStreamTrackAudioSourceNode.html new file mode 100644 index 0000000000..350e9e0fab --- /dev/null +++ b/dom/media/webaudio/test/test_mediaStreamTrackAudioSourceNode.html @@ -0,0 +1,54 @@ + + + + + Test MediaStreamTrackAudioSourceNode processing is correct + + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_mediaStreamTrackAudioSourceNodeCrossOrigin.html b/dom/media/webaudio/test/test_mediaStreamTrackAudioSourceNodeCrossOrigin.html new file mode 100644 index 0000000000..313cd424c0 --- /dev/null +++ b/dom/media/webaudio/test/test_mediaStreamTrackAudioSourceNodeCrossOrigin.html @@ -0,0 +1,53 @@ + + + + +Test MediaStreamTrackAudioSourceNode doesn't get data from cross-origin media resources + + + + +
+
+
+ diff --git a/dom/media/webaudio/test/test_mediaStreamTrackAudioSourceNodeVideo.html b/dom/media/webaudio/test/test_mediaStreamTrackAudioSourceNodeVideo.html new file mode 100644 index 0000000000..b98cfc6a4f --- /dev/null +++ b/dom/media/webaudio/test/test_mediaStreamTrackAudioSourceNodeVideo.html @@ -0,0 +1,27 @@ + + + + + Test MediaStreamTrackAudioSourceNode throw video track + + + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_mixingRules.html b/dom/media/webaudio/test/test_mixingRules.html new file mode 100644 index 0000000000..719175fbfb --- /dev/null +++ b/dom/media/webaudio/test/test_mixingRules.html @@ -0,0 +1,402 @@ + + + + Testcase for AudioNode channel up-mix/down-mix rules + + + + + + + + + + + diff --git a/dom/media/webaudio/test/test_nodeCreationDocumentGone.html b/dom/media/webaudio/test/test_nodeCreationDocumentGone.html new file mode 100644 index 0000000000..07a4f7a97d --- /dev/null +++ b/dom/media/webaudio/test/test_nodeCreationDocumentGone.html @@ -0,0 +1,34 @@ + + + + Test whether we can create an AudioContext interface + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_nodeToParamConnection.html b/dom/media/webaudio/test/test_nodeToParamConnection.html new file mode 100644 index 0000000000..8a77e7d0a2 --- /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_notAllowedToStartAudioContextGC.html b/dom/media/webaudio/test/test_notAllowedToStartAudioContextGC.html new file mode 100644 index 0000000000..b8715c1644 --- /dev/null +++ b/dom/media/webaudio/test/test_notAllowedToStartAudioContextGC.html @@ -0,0 +1,57 @@ + + + + Test GC for not-allow-to-start audio context + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_offlineDestinationChannelCountLess.html b/dom/media/webaudio/test/test_offlineDestinationChannelCountLess.html new file mode 100644 index 0000000000..8ff1deac4b --- /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 0000000000..fa38114e2b --- /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 0000000000..e2a47a4e1e --- /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 0000000000..69a6655ff1 --- /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 0000000000..c46c0fea13 --- /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 0000000000..63c0848d06 --- /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 0000000000..4df129170f --- /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 0000000000..e4b4944703 --- /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 0000000000..7f4d3ea915 --- /dev/null +++ b/dom/media/webaudio/test/test_pannerNode.html @@ -0,0 +1,71 @@ + + + + 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 0000000000..5931fa04de --- /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 0000000000..a0c20f01fe --- /dev/null +++ b/dom/media/webaudio/test/test_pannerNodeAtZeroDistance.html @@ -0,0 +1,149 @@ + + + + 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 0000000000..9cb90f32da --- /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 0000000000..abd03b3898 --- /dev/null +++ b/dom/media/webaudio/test/test_pannerNodeHRTFSymmetry.html @@ -0,0 +1,107 @@ + + + + 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 0000000000..d8c809a2e2 --- /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 0000000000..1f6483b581 --- /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_audioparam_distance.html b/dom/media/webaudio/test/test_pannerNode_audioparam_distance.html new file mode 100644 index 0000000000..2d955de19d --- /dev/null +++ b/dom/media/webaudio/test/test_pannerNode_audioparam_distance.html @@ -0,0 +1,43 @@ + + + + Distance effect of a PannerNode with the position set via AudioParams (Bug 1472550) + + + + + +
+
+
+ + 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 0000000000..127a87b254 --- /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 0000000000..b5286e56e1 --- /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 0000000000..7b8a6ab12c --- /dev/null +++ b/dom/media/webaudio/test/test_periodicWave.html @@ -0,0 +1,130 @@ + + + + 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 0000000000..70fbb09e2a --- /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 0000000000..229d48282e --- /dev/null +++ b/dom/media/webaudio/test/test_periodicWaveDisableNormalization.html @@ -0,0 +1,98 @@ + + + + Test PeriodicWave disableNormalization Parameter + + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_retrospective-exponentialRampToValueAtTime.html b/dom/media/webaudio/test/test_retrospective-exponentialRampToValueAtTime.html new file mode 100644 index 0000000000..20d3d59faf --- /dev/null +++ b/dom/media/webaudio/test/test_retrospective-exponentialRampToValueAtTime.html @@ -0,0 +1,51 @@ + + +Test exponentialRampToValue with end time in the past + + + diff --git a/dom/media/webaudio/test/test_retrospective-linearRampToValueAtTime.html b/dom/media/webaudio/test/test_retrospective-linearRampToValueAtTime.html new file mode 100644 index 0000000000..1594a30bd1 --- /dev/null +++ b/dom/media/webaudio/test/test_retrospective-linearRampToValueAtTime.html @@ -0,0 +1,51 @@ + + +Test linearRampToValue with end time in the past + + + diff --git a/dom/media/webaudio/test/test_retrospective-setTargetAtTime.html b/dom/media/webaudio/test/test_retrospective-setTargetAtTime.html new file mode 100644 index 0000000000..9b04fe22bb --- /dev/null +++ b/dom/media/webaudio/test/test_retrospective-setTargetAtTime.html @@ -0,0 +1,51 @@ + + +Test setTargetAtTime with start time in the past + + + diff --git a/dom/media/webaudio/test/test_retrospective-setValueAtTime.html b/dom/media/webaudio/test/test_retrospective-setValueAtTime.html new file mode 100644 index 0000000000..b9657ef211 --- /dev/null +++ b/dom/media/webaudio/test/test_retrospective-setValueAtTime.html @@ -0,0 +1,54 @@ + +Test setValueAtTime with startTime in the past + + + diff --git a/dom/media/webaudio/test/test_retrospective-setValueCurveAtTime.html b/dom/media/webaudio/test/test_retrospective-setValueCurveAtTime.html new file mode 100644 index 0000000000..008b240129 --- /dev/null +++ b/dom/media/webaudio/test/test_retrospective-setValueCurveAtTime.html @@ -0,0 +1,49 @@ + + +Test SetValueCurve with start time in the past + + + diff --git a/dom/media/webaudio/test/test_scriptProcessorNode.html b/dom/media/webaudio/test/test_scriptProcessorNode.html new file mode 100644 index 0000000000..ec263755cb --- /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 0000000000..5e9a9960b7 --- /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 0000000000..fb45895380 --- /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 0000000000..5d2d8170e2 --- /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 0000000000..f4b25d49dd --- /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 0000000000..ec695f952b --- /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 0000000000..5c03a8a911 --- /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_setValueCurveWithNonFiniteElements.html b/dom/media/webaudio/test/test_setValueCurveWithNonFiniteElements.html new file mode 100644 index 0000000000..28829e1ec2 --- /dev/null +++ b/dom/media/webaudio/test/test_setValueCurveWithNonFiniteElements.html @@ -0,0 +1,60 @@ + + + + + Bug 1308437 - setValueCurve should throw on non-finite elements + + + + +
+
+
+ + \ No newline at end of file diff --git a/dom/media/webaudio/test/test_singleSourceDest.html b/dom/media/webaudio/test/test_singleSourceDest.html new file mode 100644 index 0000000000..fd4de50f5d --- /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_slowStart.html b/dom/media/webaudio/test/test_slowStart.html new file mode 100644 index 0000000000..17de7351c1 --- /dev/null +++ b/dom/media/webaudio/test/test_slowStart.html @@ -0,0 +1,48 @@ + + + + Test AudioContext.currentTime + + + + +
+
+
+ + diff --git a/dom/media/webaudio/test/test_stereoPannerNode.html b/dom/media/webaudio/test/test_stereoPannerNode.html new file mode 100644 index 0000000000..d08e1640b2 --- /dev/null +++ b/dom/media/webaudio/test/test_stereoPannerNode.html @@ -0,0 +1,295 @@ + + + + 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 0000000000..2d774d366b --- /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 0000000000..94dfa3bb92 --- /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 0000000000..65c429f2ba --- /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 0000000000..9d2f1b3fa2 --- /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 0000000000..45411eca02 --- /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 0000000000..0901521a7b --- /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 0000000000..2da0b511af --- /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 0000000000..d34add9c90 --- /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/test_webAudio_muteTab.html b/dom/media/webaudio/test/test_webAudio_muteTab.html new file mode 100644 index 0000000000..ced5c20c9d --- /dev/null +++ b/dom/media/webaudio/test/test_webAudio_muteTab.html @@ -0,0 +1,95 @@ + + + + + + +
+
+
+
+ + 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 0000000000..a11aaf1cbf 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 0000000000..6854c9d898 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 0000000000..94e0014858 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 0000000000..703d885892 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 0000000000..f45ce33a58 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 0000000000..8fe471666c 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 0000000000..e4c564abbd 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 0000000000..ad4d0466da 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 0000000000..62954394d3 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 0000000000..a0b8247888 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 0000000000..dd8ce7fc54 --- /dev/null +++ b/dom/media/webaudio/test/webaudio.js @@ -0,0 +1,319 @@ +// Helpers for Web Audio tests + +function expectException(func, exceptionCode) { + var threw = false; + try { + func(); + } catch (ex) { + threw = true; + is(ex.constructor.name, "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) { + 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