--- a/submitted/W3C/audio.html Thu May 30 16:06:16 2013 +0200
+++ b/submitted/W3C/audio.html Thu May 30 16:16:37 2013 +0200
@@ -9,7 +9,7 @@
<body>
<p>When prompted, accept to share your audio stream.</p>
<h1>Description</h1>
-<p>This test checks that the LocalMediaStream object returned by the success callback in getUserMedia has at least one audio track.</p>
+<p>This test checks that the MediaStream object returned by the success callback in getUserMedia has exactly one audio track.</p>
<div id='log'></div>
<script src=/resources/testharness.js></script>
@@ -17,12 +17,12 @@
<script src=featuredetection.js></script>
<script src=prefix.js></script>
<script>
-var t = async_test("Tests that a MediaStream with at least one audio track is returned");
+var t = async_test("Tests that a MediaStream with exactly one audio track is returned", {timeout: 10000});
t.step(function() {
navigator.getUserMedia({audio:true}, t.step_func(function (stream) {
- assert_true(stream instanceof LocalMediaStream, "getUserMedia success callback comes with a LocalMediaStream object");
- assert_true(stream.audioTracks.length >= 1, "the media stream has at least one audio track");
- assert_equals(stream.videoTracks.length, 0, "the media stream has zero video track");
+ assert_true(stream instanceof MediaStream, "getUserMedia success callback comes with a MediaStream object");
+ assert_equals(stream.getAudioTracks().length, 1, "the media stream has exactly one audio track");
+ assert_equals(stream.getVideoTracks().length, 0, "the media stream has zero video track");
t.done();
}));
});