diff --git a/dom/media/webaudio/test/test_mediaStreamAudioDestinationNode.html b/dom/media/webaudio/test/test_mediaStreamAudioDestinationNode.html index dbab11e6d929..5aa1a7910506 100644 --- a/dom/media/webaudio/test/test_mediaStreamAudioDestinationNode.html +++ b/dom/media/webaudio/test/test_mediaStreamAudioDestinationNode.html @@ -34,9 +34,15 @@ addLoadEvent(function() { is(elem.played.length, 1, "should have a played interval"); is(elem.played.start(0), 0, "should have played immediately"); isnot(elem.played.end(0), 0, "should have played for a non-zero interval"); - SimpleTest.finish(); + + // This will end the media element. + dest.stream.getTracks()[0].stop(); }, 2000); }; + elem.onended = function() { + ok(true, "media element ended after destination track.stop()"); + SimpleTest.finish(); + }; source.start(0); elem.play();