diff --git a/dom/media/test/mochitest.ini b/dom/media/test/mochitest.ini
index be3c35d56cad..5978169403cb 100644
--- a/dom/media/test/mochitest.ini
+++ b/dom/media/test/mochitest.ini
@@ -728,6 +728,8 @@ skip-if = android_version >= '23' # bug 1424903
skip-if = android_version >= '23' # bug 1424903
[test_autoplay_policy_web_audio_mediaElementAudioSourceNode.html]
skip-if = android_version >= '23' # bug 1424903
+[test_autoplay_policy_web_audio_AudioParamStream.html]
+skip-if = android_version >= '23' # bug 1424903
[test_buffered.html]
skip-if = android_version == '22' # bug 1308388, android(bug 1232305)
[test_bug448534.html]
diff --git a/dom/media/test/test_autoplay_policy_web_audio_AudioParamStream.html b/dom/media/test/test_autoplay_policy_web_audio_AudioParamStream.html
new file mode 100644
index 000000000000..6142928c06eb
--- /dev/null
+++ b/dom/media/test/test_autoplay_policy_web_audio_AudioParamStream.html
@@ -0,0 +1,170 @@
+
+
+
+ Autoplay policy test : suspend/resume the AudioParam's stream
+
+
+
+
+
+
diff --git a/dom/media/webaudio/AudioParam.h b/dom/media/webaudio/AudioParam.h
index eb7c6c2aaaac..70ca42c2cfc3 100644
--- a/dom/media/webaudio/AudioParam.h
+++ b/dom/media/webaudio/AudioParam.h
@@ -148,6 +148,10 @@ class AudioParam final : public nsWrapperCache, public AudioParamTimeline {
float MaxValue() const { return mMaxValue; }
+ bool IsStreamSuspended() const {
+ return mStream ? mStream->IsSuspended() : false;
+ }
+
const nsTArray& InputNodes() const {
return mInputNodes;
}
diff --git a/dom/webidl/AudioParam.webidl b/dom/webidl/AudioParam.webidl
index c9dbff50b0cf..dacb49c67e40 100644
--- a/dom/webidl/AudioParam.webidl
+++ b/dom/webidl/AudioParam.webidl
@@ -55,3 +55,9 @@ partial interface AudioParam {
[ChromeOnly]
readonly attribute DOMString name;
};
+
+partial interface AudioParam {
+ // This attribute is used for mochitest only.
+ [ChromeOnly]
+ readonly attribute boolean isStreamSuspended;
+};