using new syntax for first gUM param
authorDominique Hazael-Massieux <dom@w3.org>
Thu, 30 May 2013 15:57:20 +0200
changeset 40 dd43e3cbd9ee
parent 39 1491f380b3b5
child 41 9864a60c24a4
using new syntax for first gUM param
minor corrections
submitted/W3C/stream-ended.html
--- a/submitted/W3C/stream-ended.html	Thu May 30 15:53:43 2013 +0200
+++ b/submitted/W3C/stream-ended.html	Thu May 30 15:57:20 2013 +0200
@@ -9,7 +9,7 @@
 <body>
 <p>When prompted, accept to share your video stream.</p>
 <h1>Description</h1>
-<p>This test checks that the LocalMediaStream object returned by the success callback in getUserMedia has a ended set to false at start, and triggers "onended" when it is set to true.</p>
+<p>This test checks that the MediaStream object returned by the success callback in getUserMedia has a ended set to false at start, and triggers "onended" when it is set to true.</p>
 
 <div id='log'></div>
 <script src=/resources/testharness.js></script>
@@ -17,17 +17,16 @@
 <script src=featuredetection.js></script>
 <script src=prefix.js></script>
 <script>
-var t = async_test("Tests that a MediaStream handles ended correctly");
+var t = async_test("Tests that a MediaStream handles ended correctly", {timeout:10000});
 t.step(function () {
-  navigator.getUserMedia("video", t.step_func(function (stream) {
+  navigator.getUserMedia({video:true}, t.step_func(function (stream) {
     assert_true(!stream.ended, "the media stream starts with ended set to false");
     stream.addEventListener("ended", t.step_func(function() {
       assert_true(stream.ended, "stream.ended now set to true");
-      assert_true(true, "ended event triggered");
       t.done();
       }), false);
     stream.ended = true;
-  }));
+  }), function (error) {});
 });
 </script>
 </body>