starting to reorganize in subdirectories matching sections
authorDominique Hazael-Massieux <dom@w3.org>
Fri, 07 Jun 2013 20:07:28 +0900
changeset 77 f32d432459ab
parent 76 1c27f2e417fe
child 78 bff9ea5af509
starting to reorganize in subdirectories matching sections
submitted/W3C/assertions.txt
submitted/W3C/audio.html
submitted/W3C/disabled-audio-silence.html
submitted/W3C/disabled-video-black.html
submitted/W3C/mediastream-addtrack.html
submitted/W3C/mediastream-constructor.html
submitted/W3C/mediastream-finished-add.html
submitted/W3C/mediastream-gettrackid.html
submitted/W3C/mediastream-id.html
submitted/W3C/mediastream-removetrack.html
submitted/W3C/mediastreamtrack-end.html
submitted/W3C/mediastreamtracklist-add.html
submitted/W3C/mediastreamtracklist-finished.html
submitted/W3C/mediastreamtracklist-remove.html
submitted/W3C/mediastreamtracklist.html
submitted/W3C/stream-api/introduction/disabled-audio-silence.html
submitted/W3C/stream-api/introduction/disabled-video-black.html
submitted/W3C/stream-api/mediastream/audio.html
submitted/W3C/stream-api/mediastream/mediastream-addtrack.html
submitted/W3C/stream-api/mediastream/mediastream-finished-add.html
submitted/W3C/stream-api/mediastream/mediastream-gettrackid.html
submitted/W3C/stream-api/mediastream/mediastream-id.html
submitted/W3C/stream-api/mediastream/mediastream-removetrack.html
submitted/W3C/stream-api/mediastream/stream-ended.html
submitted/W3C/stream-api/mediastream/video.html
submitted/W3C/stream-api/mediastreamtrack/mediastreamtrack-end.html
submitted/W3C/stream-ended.html
submitted/W3C/video.html
--- a/submitted/W3C/assertions.txt	Tue Jun 04 18:50:54 2013 +0200
+++ b/submitted/W3C/assertions.txt	Fri Jun 07 20:07:28 2013 +0900
@@ -26,6 +26,7 @@
 = stream-ended.html
 
 * [If a MediaStream] is being created using the MediaStream() constructor whose arguments are lists of MediaStreamTrack objects that are all ended, in which case the MediaStream object MUST be created with its ended attribute set to true.
+= mediastream-constructor.html
 
 * When a MediaStream object is created, the user agent MUST generate a globally unique identifier string, and MUST initialize the object's id attribute to that string. Such strings MUST only use characters in the ranges U+0021, U+0023 to U+0027, U+002A to U+002B, U+002D to U+002E, U+0030 to U+0039, U+0041 to U+005A, U+005E to U+007E, and MUST be 36 characters long.
 The id attribute MUST return the value to which it was initialized when the object was created.
@@ -45,6 +46,7 @@
 = mediastream-finished-add.html
 
 * mediastream clone algorithm
+> dependent on mediastreamtrack clone algorithm
 
 * The getAudioTracks() method MUST return a sequence that represents a snapshot of all the MediaStreamTrack objects in this stream's track set whose kind is equal to "audio"
 = audio.html
@@ -59,3 +61,8 @@
 = mediastream-removetrack.html
 = mediastream-finished-add.html
 
+* mediastreamtrack end algorithm
+= mediastreamtrack-end.html
+
+* When track constraints change, a user agent must queue a task to evaluate those changes when the task queue is next serviced
+> lacks proper algorithm, see https://www.w3.org/Bugs/Public/show_bug.cgi?id=22273
--- a/submitted/W3C/audio.html	Tue Jun 04 18:50:54 2013 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-<!doctype html>
-<html>
-<head>
-<title>getUserMedia({audio:true}) creates a stream with at least an audio track</title>
-<link rel="author" title="Dominique Hazael-Massieux" href="mailto:dom@w3.org"/>
-<link rel="help" href="http://dev.w3.org/2011/webrtc/editor/getusermedia.html#navigatorusermedia">
-<link rel='stylesheet' href='/resources/testharness.css' media='all'/>
-</head>
-<body>
-<p>When prompted, accept to share your audio stream.</p>
-<h1>Description</h1>
-<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>
-<script src=/resources/testharnessreport.js></script>
-<script src=featuredetection.js></script>
-<script src=prefix.js></script>
-<script>
-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 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.getAudioTracks()[0].kind, "audio", "getAudioTracks() returns a sequence of tracks whose kind is 'audio'");
-    assert_equals(stream.getVideoTracks().length, 0, "the media stream has zero video track");
-    t.done();
-  }));
-});
-</script>
-</body>
-</html>
--- a/submitted/W3C/disabled-audio-silence.html	Tue Jun 04 18:50:54 2013 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-<!doctype html>
-<html>
-<head>
-<title>A disabled audio track is rendered as silence</title>
-<link rel="author" title="Dominique Hazael-Massieux" href="mailto:dom@w3.org"/>
-<link rel="help" href="http://dev.w3.org/2011/webrtc/editor/getusermedia.html#navigatorusermedia">
-<link rel='stylesheet' href='/resources/testharness.css' media='all'/>
-</head>
-<body>
-<p>When prompted, accept to share your audio stream.</p>
-<h1>Description</h1>
-<p>This test checks that a disabled audio track in a MediaStream is rendered as silence. It relies on the <a href="https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html">Web Audio API</a>.</p>
-
-<div id='log'></div>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=featuredetection.js></script>
-<script src=prefix.js></script>
-<script>
-var t = async_test("Tests that a disabled audio track in a MediaStream is rendered as silence", {timeout: 200000});
-var aud = document.getElementById("aud");
-t.step(function() {
-  navigator.getUserMedia({audio: true}, t.step_func(function (stream) {
-    // TODO remove when prefixes are gone
-    var api = BrowserHasFeature(window, "AudioContext");
-    if (!window.AudioContext && undefined !== api) {
-       window.AudioContext = api;
-    } 
-    var ctx = new AudioContext();
-    var streamSource = ctx.createMediaStreamSource(stream);
-    var silenceDetector = ctx.createScriptProcessor(1024);
-    var count = 10;
-    silenceDetector.onaudioprocess = t.step_func(function (e) { 
-       var buffer1 = e.inputBuffer.getChannelData(0);   
-       var buffer2 = e.inputBuffer.getChannelData(1);  
-       var out = e.outputBuffer.getChannelData(0);
-       out = new Float32Array(buffer1);
-       for (var i = 0; i < buffer1.length; i++) {
-          assert_equals(buffer1[i], 0, "Audio buffer entry #" + i + " in channel 0 is silent");
-       }
-       for (var i = 0; i < buffer2.length; i++) {
-          assert_equals(buffer2[i], 0, "Audio buffer entry #" + i + " in channel 1 is silent");
-       }
-       count--;
-       if (count === 0) {
-         silenceDetector.onaudioprocess = null;
-         t.done();
-        }
-    });
-    stream.getAudioTracks()[0].enabled = false;
-
-    streamSource.connect(silenceDetector);
-    silenceDetector.connect(ctx.destination);
-  }), function(error) {});
-});
-</script>
-</body>
-</html>
--- a/submitted/W3C/disabled-video-black.html	Tue Jun 04 18:50:54 2013 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-<!doctype html>
-<html>
-<head>
-<title>A disabled video track is rendered as blackness</title>
-<link rel="author" title="Dominique Hazael-Massieux" href="mailto:dom@w3.org"/>
-<link rel="help" href="http://dev.w3.org/2011/webrtc/editor/getusermedia.html#navigatorusermedia">
-<link rel='stylesheet' href='/resources/testharness.css' media='all'/>
-</head>
-<body>
-<p>When prompted, accept to share your video stream.</p>
-<h1>Description</h1>
-<p>This test checks that a disabled video track in a MediaStream is rendered as blackness.</p>
-<video id="vid"></video>
-
-<div id='log'></div>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=featuredetection.js></script>
-<script src=prefix.js></script>
-<script>
-var vid = document.getElementById("vid");
-var cv = document.createElement("canvas");
-var t = async_test("Tests that a disabled video track in a MediaStream is rendered as blackness", {timeout: 10000});
-t.step(function() {
-  navigator.getUserMedia({video: true}, t.step_func(function (stream) {
-    // TODO remove when prefixes are gone
-    var srcObjName = FeatureNameInBrowser(vid, "srcObject");
-    var testOncePlaying = function() {
-       vid.removeEventListener("timeupdate", testOncePlaying, false);
-       stream.getVideoTracks()[0].enabled = false;
-       cv.width = vid.offsetWidth;
-       cv.height = vid.offsetHeight;
-       var ctx = cv.getContext("2d");
-       ctx.drawImage(vid,0,0);
-       var imageData = ctx.getImageData(0, 0, cv.width, cv.height);
-       for (var i = 0; i < imageData.data.length; i+=4) {
-	   assert_equals(imageData.data[i], 0, "No red component in pixel #" + i);
-	   assert_equals(imageData.data[i + 1], 0, "No green component in pixel #" + i);
-	   assert_equals(imageData.data[i + 2], 0, "No blue component in pixel #" + i);
-	   assert_equals(imageData.data[i + 3], 255, "No transparency in pixel #" + i);
-       }
-       t.done();
-    }
-    vid[srcObjName] = stream;
-    vid.play();
-    vid.addEventListener("timeupdate", t.step_func(testOncePlaying), false);
-
-  }), function(error) {});
-});
-</script>
-</body>
-</html>
--- a/submitted/W3C/mediastream-addtrack.html	Tue Jun 04 18:50:54 2013 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,55 +0,0 @@
-<!doctype html>
-<html>
-<head>
-<title>Adding a track to a MediaStream</title>
-<link rel="author" title="Dominique Hazael-Massieux" href="mailto:dom@w3.org"/>
-<link rel="help" href="http://dev.w3.org/2011/webrtc/editor/getusermedia.html#widl-MediaStreamTrackList-add-void-MediaStreamTrack-track">
-<link rel='stylesheet' href='/resources/testharness.css' media='all'/>
-</head>
-<body>
-<p>When prompted, accept to share your audio stream, then your video stream.</p>
-<h1>Description</h1>
-<p>This test checks that adding a track to a MediaStream works as expected.</p>
-
-<div id='log'></div>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=featuredetection.js></script>
-<script src=prefix.js></script>
-<script>
-var t = async_test("Tests that adding a track to a MediaStream works as expected", {timeout: 20000}); // longer timeout since requires double user interaction
-t.step(function () {
-  var audio, video;
-
-  navigator.getUserMedia({audio: true}, gotAudio, function(error) {});
-  function gotAudio(stream) {
-    audio = stream;
-    navigator.getUserMedia({video: true}, gotVideo, function(error) {});
-  }
-
-  function gotVideo(stream) {
-    video = stream;
-    t.step(function () {
-       assert_equals(video.getAudioTracks().length, 0, "video mediastream starts with no audio track");
-       video.addTrack(audio.getAudioTracks()[0]);
-       assert_equals(video.getAudioTracks().length, 1, "video mediastream has now one audio track");
-       video.addTrack(audio.getAudioTracks()[0]);
-       assert_equals(video.getAudioTracks().length, 1, "video mediastream still has one audio track"); // If track is already in stream's track set, then abort these steps.
-
-    });
-    audio.onaddtrack = t.step_func(function () {
-       assert_unreached("onaddtrack is not fired when the script directly modified the track of a mediastream");
-    });
-    t.step(function () {
-       assert_equals(audio.getVideoTracks().length, 0, "audio mediastream starts with no video track");
-       audio.addTrack(video.getVideoTracks()[0]);
-       assert_equals(audio.getVideoTracks().length, 1, "audio mediastream now has one video track");
-    });
-    t.step(function () {
-       t.done();
-    });
-  }
-});
-</script>
-</body>
-</html>
--- a/submitted/W3C/mediastream-constructor.html	Tue Jun 04 18:50:54 2013 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-<!doctype html>
-<html>
-<head>
-<title>MediaStream constructor algorithm</title>
-<link rel="author" title="Dominique Hazael-Massieux" href="mailto:dom@w3.org"/>
-<link rel="help" href="http://dev.w3.org/2011/webrtc/editor/getusermedia.html#navigatorusermedia">
-<link rel='stylesheet' href='/resources/testharness.css' media='all'/>
-</head>
-<body>
-<p>When prompted, accept to share your video and audio stream.</p>
-<h1>Description</h1>
-<p>This test checks that the MediaStream constructor follows the algorithm set in the spec.</p>
-
-<div id='log'></div>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=featuredetection.js></script>
-<script src=prefix.js></script>
-<script>
-var t = async_test("Tests that a MediaStream constructor follows the algorithm set in the spec", {timeout: 10000});
-t.step(function() {
-  navigator.getUserMedia({video: true, audio:true}, t.step_func(function (stream) {
-    var stream1 = new MediaStream();
-    assert_not_equals(stream.id, stream1.id, "Two different MediaStreams have different ids");
-    var stream2 = new MediaStream(stream);
-    assert_not_equals(stream.id, stream2.id, "A MediaStream constructed from another have different ids");
-    var audioTrack1 = stream.getAudioTracks()[0];
-    var videoTrack = stream.getVideoTracks()[0];
-    assert_equals(audioTrack1, stream2.getAudioTracks()[0], "A MediaStream constructed from another share the same audio track");
-    assert_equals(videoTrack, stream2.getVideoTracks()[0], "A MediaStream constructed from another share the same video track");
-    var stream4 = new MediaStream([audioTrack1]);
-    assert_equals(stream4.getTrackById(audioTrack1.id), audioTrack1, "a non-ended track gets added via the MediaStream constructor");
-
-    var audioTrack2 = audioTrack1.clone();
-    audioTrack2.addEventListener("ended", t.step_func(function () {      
-      var stream3 = new MediaStream([audioTrack2, videoTrack]);
-      assert_equals(stream3.getTrackById(audioTrack2.id), null, "an ended track doesn't get added via the MediaStream constructor");
-      assert_equals(stream3.getTrackById(videoTrack.id), videoTrack, "a non-ended track gets added via the MediaStream constructor even if the previous track was ended");
-      var stream5 = new MediaStream([audioTrack2]);
-     assert_true(stream5.ended, "a MediaStream created using the MediaStream() constructor whose arguments are lists of MediaStreamTrack objects that are all ended, the MediaStream object MUST be created with its ended attribute set to true");
-      t.done();
-    }, false);
-    audioTrack2.stop();
-  }), function(error) {});
-});
-</script>
-</body>
-</html>
--- a/submitted/W3C/mediastream-finished-add.html	Tue Jun 04 18:50:54 2013 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-<!doctype html>
-<html>
-<head>
-<title>Adding a track to a finished MediaStream</title>
-<link rel="author" title="Dominique Hazael-Massieux" href="mailto:dom@w3.org"/>
-<link rel="help" href="http://dev.w3.org/2011/webrtc/editor/getusermedia.html#widl-MediaStreamTrackList-add-void-MediaStreamTrack-track">
-<link rel='stylesheet' href='/resources/testharness.css' media='all'/>
-</head>
-<body>
-<p>When prompted, accept to share your audio stream, then your video stream.</p>
-<h1>Description</h1>
-<p>This test checks that adding a track to a finished MediaStream raises an INVALID_STATE_ERR exception.</p>
-
-<div id='log'></div>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=featuredetection.js></script>
-<script src=prefix.js></script>
-<script>
-var t = async_test("Tests that an addition to a finished MediaStream raises an exception", {timeout:20000});
-t.step(function () {
-  var audio, video;
-
-  navigator.getUserMedia({audio:true}, gotAudio, function() {});
-  function gotAudio(stream) {
-    audio = stream;
-    navigator.getUserMedia({video:true}, gotVideo, function() {});
-  }
-
-  function gotVideo(stream) {
-    video = stream;
-    t.step(function () {
-       audio.getAudioTracks()[0].stop();
-       assert_true(audio.ended, "Audio stream is ended after stopping its only audio track");
-       assert_throws("INVALID_STATE_ERR", function () {
-          video.addTrack(audio.getAudioTracks()[0]);
-          }, "Adding a track from a finished stream raises an INVALID_STATE_ERR exception");
-       assert_throws("INVALID_STATE_ERR", function () {
-          audio.removeTrack(audio.getAudioTracks()[0]);
-          }, "Removing a track from a finished stream raises an INVALID_STATE_ERR exception");
-     });
-    t.done();
-  }
-});
-</script>
-</body>
-</html>
--- a/submitted/W3C/mediastream-gettrackid.html	Tue Jun 04 18:50:54 2013 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-<!doctype html>
-<html>
-<head>
-<title>Retrieving a track from a MediaStream</title>
-<link rel="author" title="Dominique Hazael-Massieux" href="mailto:dom@w3.org"/>
-<link rel="help" href="http://dev.w3.org/2011/webrtc/editor/getusermedia.html#widl-MediaStreamTrackList-add-void-MediaStreamTrack-track">
-<link rel='stylesheet' href='/resources/testharness.css' media='all'/>
-</head>
-<body>
-<p>When prompted, accept to share your video stream.</p>
-<h1>Description</h1>
-<p>This test checks that MediaStream.getTrackById behaves as expected</p>
-
-<div id='log'></div>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=featuredetection.js></script>
-<script src=prefix.js></script>
-<script>
-var t = async_test("Tests that MediaStream.getTrackById works as expected", {timeout: 10000});
-t.step(function () {
-  navigator.getUserMedia({video: true}, t.step_func(gotVideo), function(error) {});
-  function gotVideo(stream) {
-    var track = stream.getVideoTracks()[0];
-    assert_equals(track, stream.getTrackById(track.id), "getTrackById returns track of given id");
-    assert_equals(stream.getTrackById(track.id + "foo"), null, "getTrackById of inexistant id  returns null");
-    t.done();
-  }
-});
-</script>
-</body>
-</html>
--- a/submitted/W3C/mediastream-id.html	Tue Jun 04 18:50:54 2013 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-<!doctype html>
-<html>
-<head>
-<title>getUserMedia() creates a stream with a proper id</title>
-<link rel="author" title="Dominique Hazael-Massieux" href="mailto:dom@w3.org"/>
-<link rel="help" href="http://dev.w3.org/2011/webrtc/editor/getusermedia.html#navigatorusermedia">
-<link rel='stylesheet' href='/resources/testharness.css' media='all'/>
-</head>
-<body>
-<p>When prompted, accept to share your video stream.</p>
-<h1>Description</h1>
-<p>This test checks that the MediaStream object returned by the success callback in getUserMedia has a correct id.</p>
-
-<div id='log'></div>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=featuredetection.js></script>
-<script src=prefix.js></script>
-<script>
-var t = async_test("Tests that a MediaStream with a correct id is returned");
-var allowedCharacters = /^[\u0021\u0023-\u0027\u002A-\u002B\u002D-\u002E\u0030-\u0039\u0041-\u005A\u005E-\u007E]*$/;
-if (window.navigator.getUserMedia) { 
-  navigator.getUserMedia({video:true}, function (stream) {
-  t.step(function () { 
-     assert_true(stream.id.length === 36, "the media stream id has 36 characters");
-     assert_regexp_match(stream.id, allowedCharacters, "the media stream id uses the set of allowed characters");
-  });
-  t.done();
-});
-}
-</script>
-</body>
-</html>
--- a/submitted/W3C/mediastream-removetrack.html	Tue Jun 04 18:50:54 2013 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-<!doctype html>
-<html>
-<head>
-<title>Removing a track from a MediaStream</title>
-<link rel="author" title="Dominique Hazael-Massieux" href="mailto:dom@w3.org"/>
-<link rel="help" href="http://dev.w3.org/2011/webrtc/editor/getusermedia.html#widl-MediaStreamTrackList-remove-void-MediaStreamTrack-track">
-<link rel='stylesheet' href='/resources/testharness.css' media='all'/>
-</head>
-<body>
-<p>When prompted, accept to share your audio stream, then your video stream.</p>
-<h1>Description</h1>
-<p>This test checks that removinging a track from a MediaStream works as expected.</p>
-
-<div id='log'></div>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=featuredetection.js></script>
-<script src=prefix.js></script>
-<script>
-var t = async_test("Tests that a removal from a MediaStream works as expected", {timeout:10000});
-t.step(function () {
-  var audio;
-  navigator.getUserMedia({audio:true}, gotAudio, function() {});
-  function gotAudio(stream) { 
-     audio = stream;
-     navigator.getUserMedia({video:true}, gotVideo, function() {});
-  }
-
-  function gotVideo(stream) {
-    console.log(stream);
-    var video = stream;
-    console.log(video);
-    video.onremovetrack = function () {
-       assert_unreached("onremovetrack is not triggered when removal of track is triggered by the script itself");
-    };
-    t.step(function () {
-       assert_equals(video.getVideoTracks().length, 1, "video mediastream starts with one video track");
-       video.removeTrack(video.getVideoTracks()[0]);
-       assert_equals(video.getVideoTracks().length, 0, "video mediastream has no video track left");
-       video.removeTrack(audio.getAudioTracks()[0]); // should not throw
-    });
-    t.step(function() {
-       t.done();
-   });
-  }
-});
-</script>
-</body>
-</html>
--- a/submitted/W3C/mediastreamtrack-end.html	Tue Jun 04 18:50:54 2013 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,57 +0,0 @@
-<!doctype html>
-<html>
-<head>
-<title>Test that mediastreamtrack are properly ended</title>
-<link rel="author" title="Dominique Hazael-Massieux" href="mailto:dom@w3.org"/>
-<link rel="help" href="http://dev.w3.org/2011/webrtc/editor/getusermedia.html#mediastreamtrack">
-<link rel='stylesheet' href='/resources/testharness.css' media='all'/>
-</head>
-<body>
-<p>When prompted, accept to share your video and audio stream, and then revoke that permission.</p>
-<h1>Description</h1>
-<p>This test checks that the video and audio tracks of LocalMediaStream object returned by the success callback in getUserMedia are correctly set into ended state when permission is revoked.</p>
-
-<div id='log'></div>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=featuredetection.js></script>
-<script src=prefix.js></script>
-<script>
-var t = async_test("Tests that the video MediaStreamTrack objects are properly ended on permission revocation", {timeout: 10000}); // longer timeout since requires user interaction
-t.step(function () {
-  navigator.getUserMedia({audio: true,video: true}, t.step_func(function (stream) {
-    for (var i = 0 ; i < stream.videoTracks.length ; i++) {
-      var track = stream.videoTracks[i];
-	assert_equals(track.readyState, track.LIVE, "The video track object #" + i + " is in live state");
-    }
-    for (var i = 0 ; i < stream.audioTracks.length ; i++) {
-      var track = stream.audioTracks[i];
-      assert_equals(track.readyState, track.LIVE, "The audio track object #" + i + " is in live state");
-    }
-    t.step(function () {
-      stream.audioTracks[0].readyState = stream.audioTracks[0].ENDED;
-      assert_equals(track.readyState, track.ENDED, "The audio track object #0 is in ended state");
-      stream.audioTracks[0].onended = function () { 
-        assert_unreached("The ended event is not supposed to be sent since the track was already in ended state");
-        t.done();
-      };
-    });
-    t.step(function () {
-      stream.videoTracks[0].onended = t.step_func(function () { 
-        assert_true(true, "Video track #0 has been ended as expected");
-        t.done();
-      });
-      for (var i = 0 ; i < stream.videoTracks.length ; i++) {
-        var track = stream.videoTracks[i];
-        assert_equals(track.readyState, track.ENDED, "The video track object #" + i + " is in ended state");
-      }
-      for (var i = 1 ; i < stream.audioTracks.length ; i++) {
-        var track = stream.audioTracks[i];
-        assert_equals(track.readyState, track.ENDED, "The audio track object #" + i + " is in ended state");
-      }
-    });
-  }));
-});
-</script>
-</body>
-</html>
--- a/submitted/W3C/mediastreamtracklist-add.html	Tue Jun 04 18:50:54 2013 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-<!doctype html>
-<html>
-<head>
-<title>Adding a track to a MediaStreamTrackList</title>
-<link rel="author" title="Dominique Hazael-Massieux" href="mailto:dom@w3.org"/>
-<link rel="help" href="http://dev.w3.org/2011/webrtc/editor/getusermedia.html#widl-MediaStreamTrackList-add-void-MediaStreamTrack-track">
-<link rel='stylesheet' href='/resources/testharness.css' media='all'/>
-</head>
-<body>
-<p>When prompted, accept to share your audio stream, then your video stream.</p>
-<h1>Description</h1>
-<p>This test checks that adding a track to a MediaStreamTrackList works as expected.</p>
-
-<div id='log'></div>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=featuredetection.js></script>
-<script src=prefix.js></script>
-<script>
-var t = async_test("Tests that an addition to a MediaStreamTrackList works as expected", {timeout: 10000}); // longer timeout since requires double user interaction
-t.step(function () {
-  var audio, video;
-
-  navigator.getUserMedia({audio: true}, gotAudio);
-  function gotAudio(stream) {
-    audio = stream;
-    navigator.getUserMedia({video: true}, gotVideo);
-  }
-
-  function gotVideo(stream) {
-    video = stream;
-    t.step(function () {
-       assert_equals(video.audioTracks.length, 0, "video mediastream starts with no audio track");
-       video.audioTracks.add(audio.audioTracks[0]);
-       assert_equals(video.audioTracks.length, 1, "video mediastream has now one audio track");
-       video.audioTracks.add(audio.audioTracks[0]);
-       assert_equals(video.audioTracks.length, 1, "video mediastream still has one audio track");
-    });
-    audio.onaddtrack = t.step_func(function () {
-       assert_true(true, "onaddtrack is triggered on adding a track");
-       t.done();
-    });
-    t.step(function () {
-       assert_equals(audio.videoTracks.length, 0, "audio mediastream starts with no video track");
-       audio.videoTracks.add(video.videoTracks[1]);
-       assert_equals(audio.videoTracks.length, 1, "audio mediastream now has one video track");
-    });
-  }
-});
-</script>
-</body>
-</html>
--- a/submitted/W3C/mediastreamtracklist-finished.html	Tue Jun 04 18:50:54 2013 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-<!doctype html>
-<html>
-<head>
-<title>Adding a track to a finished MediaStream</title>
-<link rel="author" title="Dominique Hazael-Massieux" href="mailto:dom@w3.org"/>
-<link rel="help" href="http://dev.w3.org/2011/webrtc/editor/getusermedia.html#widl-MediaStreamTrackList-add-void-MediaStreamTrack-track">
-<link rel='stylesheet' href='/resources/testharness.css' media='all'/>
-</head>
-<body>
-<p>When prompted, accept to share your audio stream, then your video stream.</p>
-<h1>Description</h1>
-<p>This test checks that adding a track to a finished MediaStream raises an INVALID_STATE_ERR exception.</p>
-
-<div id='log'></div>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=featuredetection.js></script>
-<script src=prefix.js></script>
-<script>
-var t = async_test("Tests that an addition to a finished MediaStream raises an exception", {timeout:20000});
-t.step(function () {
-  var audio, video;
-
-  navigator.getUserMedia({audio:true}, gotAudio, function() {});
-  function gotAudio(stream) {
-    audio = stream;
-    navigator.getUserMedia({video:true}, gotVideo, function() {});
-  }
-
-  function gotVideo(stream) {
-    video = stream;
-    t.step(function () {
-       audio.getAudioTracks()[0].stop();
-       assert_true(audio.ended, "Audio stream is ended after stopping its only audio track");
-       assert_throws("INVALID_STATE_ERR", function () {
-          video.addTrack(audio.getAudioTracks()[0]);
-          }, "Adding a track from a finished stream raises an INVALID_STATE_ERR exception");
-       assert_throws("INVALID_STATE_ERR", function () {
-          audio.removeTrack(audio.getAudioTracks()[0]);
-          }, "Removing a track from a finished stream raises an INVALID_STATE_ERR exception");
-     });
-    t.done();
-  }
-});
-</script>
-</body>
-</html>
--- a/submitted/W3C/mediastreamtracklist-remove.html	Tue Jun 04 18:50:54 2013 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-<!doctype html>
-<html>
-<head>
-<title>Removing a track from a MediaStreamTrackList</title>
-<link rel="author" title="Dominique Hazael-Massieux" href="mailto:dom@w3.org"/>
-<link rel="help" href="http://dev.w3.org/2011/webrtc/editor/getusermedia.html#widl-MediaStreamTrackList-remove-void-MediaStreamTrack-track">
-<link rel='stylesheet' href='/resources/testharness.css' media='all'/>
-</head>
-<body>
-<p>When prompted, accept to share your audio stream, then your video stream.</p>
-<h1>Description</h1>
-<p>This test checks that removinging a track from a MediaStreamTrackList works as expected.</p>
-
-<div id='log'></div>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=featuredetection.js></script>
-<script src=prefix.js></script>
-<script>
-var t = async_test("Tests that a removal from a MediaStreamTrackList works as expected");
-t.step(function () {
-  var video;
-
-  navigator.getUserMedia({video:true}, gotVideo);
-
-  function gotVideo(stream) {
-    video = stream;
-    t.step(function () {
-       assert_equals(video.videoTracks.length, 1, "video mediastream starts with one video track");
-       video.videoTracks.remove(video.videoTracks[0]);
-       assert_equals(video.videoTracks.length, 0, "video mediastream has now one audio track");
-       // TODO: add a test that removing a non existent track is a no-op
-    });
-    audio.onremovetrack = function () {
-       assert_true(true, "onremovetrack is triggered on removal of a track");
-       t.done();
-    };
-  }
-});
-</script>
-</body>
-</html>
--- a/submitted/W3C/mediastreamtracklist.html	Tue Jun 04 18:50:54 2013 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-<!doctype html>
-<html>
-<head>
-<title>Adding a track to a MediaStreamTrackList</title>
-<link rel="author" title="Dominique Hazael-Massieux" href="mailto:dom@w3.org"/>
-<link rel="help" href="http://dev.w3.org/2011/webrtc/editor/getusermedia.html#navigatorusermedia">
-<link rel='stylesheet' href='/resources/testharness.css' media='all'/>
-</head>
-<body>
-<p>When prompted, accept to share your audio stream, then your video stream.</p>
-<h1>Description</h1>
-<p>This test checks that adding a track to a MediaStreamTrackList works as expected.</p>
-
-<div id='log'></div>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=featuredetection.js></script>
-<script src=prefix.js></script>
-<script>
-var t = async_test("Tests that an addition to a MediaStreamTrackList works as expected");
-t.step(function () {
-  var audio, video;
-
-  navigator.getUserMedia({audio:true}, gotAudio);
-  function gotAudio(stream) {
-    audio = stream;
-    navigator.getUserMedia({video:true}, gotVideo);
-  }
-
-  function gotVideo(stream) {
-    video = stream;
-    t.step(function () {
-       assert_equals(video.audioTracks.length, 0, "video mediastream starts with no audio track");
-       video.audioTracks.add(audio.audioTracks[0]);
-       assert_equals(video.audioTracks.length, 1, "video mediastream has now one audio track");
-       video.audioTracks.add(audio.audioTracks[0]);
-       assert_equals(video.audioTracks.length, 1, "video mediastream still has one audio track");
-    });
-    audio.onaddtrack = function () {
-       assert_true(true, "onaddtrack is triggered on adding a track");
-       t.done();
-    };
-    t.step(function () {
-       assert_equals(audio.videoTracks.length, 0, "audio mediastream starts with no video track");
-       audio.videoTracks.add(video.videoTracks[1]);
-       assert_equals(audio.videoTracks.length, 1, "audio mediastream now has one video track");
-    });
-  }
-});
-</script>
-</body>
-</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/submitted/W3C/stream-api/introduction/disabled-audio-silence.html	Fri Jun 07 20:07:28 2013 +0900
@@ -0,0 +1,58 @@
+<!doctype html>
+<html>
+<head>
+<title>A disabled audio track is rendered as silence</title>
+<link rel="author" title="Dominique Hazael-Massieux" href="mailto:dom@w3.org"/>
+<link rel="help" href="http://dev.w3.org/2011/webrtc/editor/getusermedia.html#navigatorusermedia">
+<link rel='stylesheet' href='/resources/testharness.css' media='all'/>
+</head>
+<body>
+<p>When prompted, accept to share your audio stream.</p>
+<h1>Description</h1>
+<p>This test checks that a disabled audio track in a MediaStream is rendered as silence. It relies on the <a href="https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html">Web Audio API</a>.</p>
+
+<div id='log'></div>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src=featuredetection.js></script>
+<script src=prefix.js></script>
+<script>
+var t = async_test("Tests that a disabled audio track in a MediaStream is rendered as silence", {timeout: 200000});
+var aud = document.getElementById("aud");
+t.step(function() {
+  navigator.getUserMedia({audio: true}, t.step_func(function (stream) {
+    // TODO remove when prefixes are gone
+    var api = BrowserHasFeature(window, "AudioContext");
+    if (!window.AudioContext && undefined !== api) {
+       window.AudioContext = api;
+    } 
+    var ctx = new AudioContext();
+    var streamSource = ctx.createMediaStreamSource(stream);
+    var silenceDetector = ctx.createScriptProcessor(1024);
+    var count = 10;
+    silenceDetector.onaudioprocess = t.step_func(function (e) { 
+       var buffer1 = e.inputBuffer.getChannelData(0);   
+       var buffer2 = e.inputBuffer.getChannelData(1);  
+       var out = e.outputBuffer.getChannelData(0);
+       out = new Float32Array(buffer1);
+       for (var i = 0; i < buffer1.length; i++) {
+          assert_equals(buffer1[i], 0, "Audio buffer entry #" + i + " in channel 0 is silent");
+       }
+       for (var i = 0; i < buffer2.length; i++) {
+          assert_equals(buffer2[i], 0, "Audio buffer entry #" + i + " in channel 1 is silent");
+       }
+       count--;
+       if (count === 0) {
+         silenceDetector.onaudioprocess = null;
+         t.done();
+        }
+    });
+    stream.getAudioTracks()[0].enabled = false;
+
+    streamSource.connect(silenceDetector);
+    silenceDetector.connect(ctx.destination);
+  }), function(error) {});
+});
+</script>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/submitted/W3C/stream-api/introduction/disabled-video-black.html	Fri Jun 07 20:07:28 2013 +0900
@@ -0,0 +1,52 @@
+<!doctype html>
+<html>
+<head>
+<title>A disabled video track is rendered as blackness</title>
+<link rel="author" title="Dominique Hazael-Massieux" href="mailto:dom@w3.org"/>
+<link rel="help" href="http://dev.w3.org/2011/webrtc/editor/getusermedia.html#navigatorusermedia">
+<link rel='stylesheet' href='/resources/testharness.css' media='all'/>
+</head>
+<body>
+<p>When prompted, accept to share your video stream.</p>
+<h1>Description</h1>
+<p>This test checks that a disabled video track in a MediaStream is rendered as blackness.</p>
+<video id="vid"></video>
+
+<div id='log'></div>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src=featuredetection.js></script>
+<script src=prefix.js></script>
+<script>
+var vid = document.getElementById("vid");
+var cv = document.createElement("canvas");
+var t = async_test("Tests that a disabled video track in a MediaStream is rendered as blackness", {timeout: 10000});
+t.step(function() {
+  navigator.getUserMedia({video: true}, t.step_func(function (stream) {
+    // TODO remove when prefixes are gone
+    var srcObjName = FeatureNameInBrowser(vid, "srcObject");
+    var testOncePlaying = function() {
+       vid.removeEventListener("timeupdate", testOncePlaying, false);
+       stream.getVideoTracks()[0].enabled = false;
+       cv.width = vid.offsetWidth;
+       cv.height = vid.offsetHeight;
+       var ctx = cv.getContext("2d");
+       ctx.drawImage(vid,0,0);
+       var imageData = ctx.getImageData(0, 0, cv.width, cv.height);
+       for (var i = 0; i < imageData.data.length; i+=4) {
+	   assert_equals(imageData.data[i], 0, "No red component in pixel #" + i);
+	   assert_equals(imageData.data[i + 1], 0, "No green component in pixel #" + i);
+	   assert_equals(imageData.data[i + 2], 0, "No blue component in pixel #" + i);
+	   assert_equals(imageData.data[i + 3], 255, "No transparency in pixel #" + i);
+       }
+       t.done();
+    }
+    vid[srcObjName] = stream;
+    vid.play();
+    vid.addEventListener("timeupdate", t.step_func(testOncePlaying), false);
+
+  }), function(error) {});
+});
+</script>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/submitted/W3C/stream-api/mediastream/audio.html	Fri Jun 07 20:07:28 2013 +0900
@@ -0,0 +1,34 @@
+<!doctype html>
+<html>
+<head>
+<title>getUserMedia({audio:true}) creates a stream with at least an audio track</title>
+<link rel="author" title="Dominique Hazael-Massieux" href="mailto:dom@w3.org"/>
+<link rel="help" href="http://dev.w3.org/2011/webrtc/editor/getusermedia.html#navigatorusermedia">
+<link rel='stylesheet' href='/resources/testharness.css' media='all'/>
+</head>
+<body>
+<p>When prompted, accept to share your audio stream.</p>
+<h1>Description</h1>
+<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>
+<script src=/resources/testharnessreport.js></script>
+<script src=featuredetection.js></script>
+<script src=prefix.js></script>
+<script>
+var astream;
+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) {
+    astream = stream;
+    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.getAudioTracks()[0].kind, "audio", "getAudioTracks() returns a sequence of tracks whose kind is 'audio'");
+    assert_equals(stream.getVideoTracks().length, 0, "the media stream has zero video track");
+    t.done();
+  }));
+});
+</script>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/submitted/W3C/stream-api/mediastream/mediastream-addtrack.html	Fri Jun 07 20:07:28 2013 +0900
@@ -0,0 +1,55 @@
+<!doctype html>
+<html>
+<head>
+<title>Adding a track to a MediaStream</title>
+<link rel="author" title="Dominique Hazael-Massieux" href="mailto:dom@w3.org"/>
+<link rel="help" href="http://dev.w3.org/2011/webrtc/editor/getusermedia.html#widl-MediaStreamTrackList-add-void-MediaStreamTrack-track">
+<link rel='stylesheet' href='/resources/testharness.css' media='all'/>
+</head>
+<body>
+<p>When prompted, accept to share your audio stream, then your video stream.</p>
+<h1>Description</h1>
+<p>This test checks that adding a track to a MediaStream works as expected.</p>
+
+<div id='log'></div>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src=featuredetection.js></script>
+<script src=prefix.js></script>
+<script>
+var t = async_test("Tests that adding a track to a MediaStream works as expected", {timeout: 20000}); // longer timeout since requires double user interaction
+t.step(function () {
+  var audio, video;
+
+  navigator.getUserMedia({audio: true}, gotAudio, function(error) {});
+  function gotAudio(stream) {
+    audio = stream;
+    navigator.getUserMedia({video: true}, gotVideo, function(error) {});
+  }
+
+  function gotVideo(stream) {
+    video = stream;
+    t.step(function () {
+       assert_equals(video.getAudioTracks().length, 0, "video mediastream starts with no audio track");
+       video.addTrack(audio.getAudioTracks()[0]);
+       assert_equals(video.getAudioTracks().length, 1, "video mediastream has now one audio track");
+       video.addTrack(audio.getAudioTracks()[0]);
+       assert_equals(video.getAudioTracks().length, 1, "video mediastream still has one audio track"); // If track is already in stream's track set, then abort these steps.
+
+    });
+    audio.onaddtrack = t.step_func(function () {
+       assert_unreached("onaddtrack is not fired when the script directly modified the track of a mediastream");
+    });
+    t.step(function () {
+       assert_equals(audio.getVideoTracks().length, 0, "audio mediastream starts with no video track");
+       audio.addTrack(video.getVideoTracks()[0]);
+       assert_equals(audio.getVideoTracks().length, 1, "audio mediastream now has one video track");
+    });
+    t.step(function () {
+       t.done();
+    });
+  }
+});
+</script>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/submitted/W3C/stream-api/mediastream/mediastream-finished-add.html	Fri Jun 07 20:07:28 2013 +0900
@@ -0,0 +1,47 @@
+<!doctype html>
+<html>
+<head>
+<title>Adding a track to a finished MediaStream</title>
+<link rel="author" title="Dominique Hazael-Massieux" href="mailto:dom@w3.org"/>
+<link rel="help" href="http://dev.w3.org/2011/webrtc/editor/getusermedia.html#widl-MediaStreamTrackList-add-void-MediaStreamTrack-track">
+<link rel='stylesheet' href='/resources/testharness.css' media='all'/>
+</head>
+<body>
+<p>When prompted, accept to share your audio stream, then your video stream.</p>
+<h1>Description</h1>
+<p>This test checks that adding a track to a finished MediaStream raises an INVALID_STATE_ERR exception.</p>
+
+<div id='log'></div>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src=featuredetection.js></script>
+<script src=prefix.js></script>
+<script>
+var t = async_test("Tests that an addition to a finished MediaStream raises an exception", {timeout:20000});
+t.step(function () {
+  var audio, video;
+
+  navigator.getUserMedia({audio:true}, gotAudio, function() {});
+  function gotAudio(stream) {
+    audio = stream;
+    navigator.getUserMedia({video:true}, gotVideo, function() {});
+  }
+
+  function gotVideo(stream) {
+    video = stream;
+    t.step(function () {
+       audio.getAudioTracks()[0].stop();
+       assert_true(audio.ended, "Audio stream is ended after stopping its only audio track");
+       assert_throws("INVALID_STATE_ERR", function () {
+          video.addTrack(audio.getAudioTracks()[0]);
+          }, "Adding a track from a finished stream raises an INVALID_STATE_ERR exception");
+       assert_throws("INVALID_STATE_ERR", function () {
+          audio.removeTrack(audio.getAudioTracks()[0]);
+          }, "Removing a track from a finished stream raises an INVALID_STATE_ERR exception");
+     });
+    t.done();
+  }
+});
+</script>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/submitted/W3C/stream-api/mediastream/mediastream-gettrackid.html	Fri Jun 07 20:07:28 2013 +0900
@@ -0,0 +1,32 @@
+<!doctype html>
+<html>
+<head>
+<title>Retrieving a track from a MediaStream</title>
+<link rel="author" title="Dominique Hazael-Massieux" href="mailto:dom@w3.org"/>
+<link rel="help" href="http://dev.w3.org/2011/webrtc/editor/getusermedia.html#widl-MediaStreamTrackList-add-void-MediaStreamTrack-track">
+<link rel='stylesheet' href='/resources/testharness.css' media='all'/>
+</head>
+<body>
+<p>When prompted, accept to share your video stream.</p>
+<h1>Description</h1>
+<p>This test checks that MediaStream.getTrackById behaves as expected</p>
+
+<div id='log'></div>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src=featuredetection.js></script>
+<script src=prefix.js></script>
+<script>
+var t = async_test("Tests that MediaStream.getTrackById works as expected", {timeout: 10000});
+t.step(function () {
+  navigator.getUserMedia({video: true}, t.step_func(gotVideo), function(error) {});
+  function gotVideo(stream) {
+    var track = stream.getVideoTracks()[0];
+    assert_equals(track, stream.getTrackById(track.id), "getTrackById returns track of given id");
+    assert_equals(stream.getTrackById(track.id + "foo"), null, "getTrackById of inexistant id  returns null");
+    t.done();
+  }
+});
+</script>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/submitted/W3C/stream-api/mediastream/mediastream-id.html	Fri Jun 07 20:07:28 2013 +0900
@@ -0,0 +1,33 @@
+<!doctype html>
+<html>
+<head>
+<title>getUserMedia() creates a stream with a proper id</title>
+<link rel="author" title="Dominique Hazael-Massieux" href="mailto:dom@w3.org"/>
+<link rel="help" href="http://dev.w3.org/2011/webrtc/editor/getusermedia.html#navigatorusermedia">
+<link rel='stylesheet' href='/resources/testharness.css' media='all'/>
+</head>
+<body>
+<p>When prompted, accept to share your video stream.</p>
+<h1>Description</h1>
+<p>This test checks that the MediaStream object returned by the success callback in getUserMedia has a correct id.</p>
+
+<div id='log'></div>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src=featuredetection.js></script>
+<script src=prefix.js></script>
+<script>
+var t = async_test("Tests that a MediaStream with a correct id is returned");
+var allowedCharacters = /^[\u0021\u0023-\u0027\u002A-\u002B\u002D-\u002E\u0030-\u0039\u0041-\u005A\u005E-\u007E]*$/;
+if (window.navigator.getUserMedia) { 
+  navigator.getUserMedia({video:true}, function (stream) {
+  t.step(function () { 
+     assert_true(stream.id.length === 36, "the media stream id has 36 characters");
+     assert_regexp_match(stream.id, allowedCharacters, "the media stream id uses the set of allowed characters");
+  });
+  t.done();
+});
+}
+</script>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/submitted/W3C/stream-api/mediastream/mediastream-removetrack.html	Fri Jun 07 20:07:28 2013 +0900
@@ -0,0 +1,49 @@
+<!doctype html>
+<html>
+<head>
+<title>Removing a track from a MediaStream</title>
+<link rel="author" title="Dominique Hazael-Massieux" href="mailto:dom@w3.org"/>
+<link rel="help" href="http://dev.w3.org/2011/webrtc/editor/getusermedia.html#widl-MediaStreamTrackList-remove-void-MediaStreamTrack-track">
+<link rel='stylesheet' href='/resources/testharness.css' media='all'/>
+</head>
+<body>
+<p>When prompted, accept to share your audio stream, then your video stream.</p>
+<h1>Description</h1>
+<p>This test checks that removinging a track from a MediaStream works as expected.</p>
+
+<div id='log'></div>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src=featuredetection.js></script>
+<script src=prefix.js></script>
+<script>
+var t = async_test("Tests that a removal from a MediaStream works as expected", {timeout:10000});
+t.step(function () {
+  var audio;
+  navigator.getUserMedia({audio:true}, gotAudio, function() {});
+  function gotAudio(stream) { 
+     audio = stream;
+     navigator.getUserMedia({video:true}, gotVideo, function() {});
+  }
+
+  function gotVideo(stream) {
+    console.log(stream);
+    var video = stream;
+    console.log(video);
+    video.onremovetrack = function () {
+       assert_unreached("onremovetrack is not triggered when removal of track is triggered by the script itself");
+    };
+    t.step(function () {
+       assert_equals(video.getVideoTracks().length, 1, "video mediastream starts with one video track");
+       video.removeTrack(video.getVideoTracks()[0]);
+       assert_equals(video.getVideoTracks().length, 0, "video mediastream has no video track left");
+       video.removeTrack(audio.getAudioTracks()[0]); // should not throw
+    });
+    t.step(function() {
+       t.done();
+   });
+  }
+});
+</script>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/submitted/W3C/stream-api/mediastream/stream-ended.html	Fri Jun 07 20:07:28 2013 +0900
@@ -0,0 +1,35 @@
+<!doctype html>
+<html>
+<head>
+<title>getUserMedia({video:true}) creates a stream with ended set to false</title>
+<link rel="author" title="Dominique Hazael-Massieux" href="mailto:dom@w3.org"/>
+<link rel="help" href="http://dev.w3.org/2011/webrtc/editor/getusermedia.html#attributes">
+<link rel='stylesheet' href='/resources/testharness.css' media='all'/>
+</head>
+<body>
+<p>When prompted, accept to share your video stream.</p>
+<h1>Description</h1>
+<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>
+<script src=/resources/testharnessreport.js></script>
+<script src=featuredetection.js></script>
+<script src=prefix.js></script>
+<script>
+var t = async_test("Tests that a MediaStream handles ended correctly", {timeout:10000});
+t.step(function () {
+  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");
+      t.done();
+      }), false);
+    stream.ended = true;
+    assert_true(!stream.ended, "stream.ended should remain false");
+    stream.getVideoTracks()[0].stop();
+  }), function (error) {});
+});
+</script>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/submitted/W3C/stream-api/mediastream/video.html	Fri Jun 07 20:07:28 2013 +0900
@@ -0,0 +1,32 @@
+<!doctype html>
+<html>
+<head>
+<title>getUserMedia({video:true}) creates a stream with one video track</title>
+<link rel="author" title="Dominique Hazael-Massieux" href="mailto:dom@w3.org"/>
+<link rel="help" href="http://dev.w3.org/2011/webrtc/editor/getusermedia.html#navigatorusermedia">
+<link rel='stylesheet' href='/resources/testharness.css' media='all'/>
+</head>
+<body>
+<p>When prompted, accept to share your video stream.</p>
+<h1>Description</h1>
+<p>This test checks that the MediaStream object returned by the success callback in getUserMedia has exactly one video track and no audio.</p>
+
+<div id='log'></div>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src=featuredetection.js></script>
+<script src=prefix.js></script>
+<script>
+var t = async_test("Tests that a MediaStream with at least one video track is returned");
+t.step(function() {
+  navigator.getUserMedia({video: true}, t.step_func(function (stream) {
+    assert_true(stream instanceof MediaStream, "getUserMedia success callback comes with a MediaStream object");
+    assert_equals(stream.getAudioTracks().length, 0, "the media stream has zero audio track");
+    assert_equals(stream.getVideoTracks().length, 1, "the media stream has exactly one video track");
+    assert_equals(stream.getVideoTracks()[0].kind, "video", "getAudioTracks() returns a sequence of tracks whose kind is 'video'");
+    t.done();
+  }), function(error) {});
+});
+</script>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/submitted/W3C/stream-api/mediastreamtrack/mediastreamtrack-end.html	Fri Jun 07 20:07:28 2013 +0900
@@ -0,0 +1,38 @@
+<!doctype html>
+<html>
+<head>
+<title>Test that mediastreamtrack are properly ended</title>
+<link rel="author" title="Dominique Hazael-Massieux" href="mailto:dom@w3.org"/>
+<link rel="help" href="http://dev.w3.org/2011/webrtc/editor/getusermedia.html#mediastreamtrack">
+<link rel='stylesheet' href='/resources/testharness.css' media='all'/>
+</head>
+<body>
+<p>When prompted, accept to share your video and audio stream, and then revoke that permission.</p>
+<h1>Description</h1>
+<p>This test checks that the video and audio tracks of MediaStream object returned by the success callback in getUserMedia are correctly set into ended state when permission is revoked.</p>
+
+<div id='log'></div>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src=featuredetection.js></script>
+<script src=prefix.js></script>
+<script>
+var t = async_test("Tests that the video MediaStreamTrack objects are properly ended on permission revocation", {timeout: 20000}); // longer timeout since requires user interaction
+t.step(function () {
+  navigator.getUserMedia({audio: true,video: true}, t.step_func(function (stream) {
+    var vidTrack = stream.getVideoTracks()[0];
+    assert_equals(vidTrack.readyState, "live", "The video track object is in live state");
+    var audTrack = stream.getAudioTracks()[0];
+    assert_equals(audTrack.readyState, "live", "The audio track object is in live state");
+    vidTrack.onended = t.step_func(function () { 
+        assert_equals(vidTrack.readyState, "ended", "Video track has been ended as expected");
+        assert_equals(audTrack.readyState, "ended", "Audio track has been ended as expected");
+        assert_true(stream.ended, "MediaStream has been ended as expected");
+        t.done();
+      });
+    }), function (error) {}
+  );
+});
+</script>
+</body>
+</html>
--- a/submitted/W3C/stream-ended.html	Tue Jun 04 18:50:54 2013 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-<!doctype html>
-<html>
-<head>
-<title>getUserMedia({video:true}) creates a stream with ended set to false</title>
-<link rel="author" title="Dominique Hazael-Massieux" href="mailto:dom@w3.org"/>
-<link rel="help" href="http://dev.w3.org/2011/webrtc/editor/getusermedia.html#attributes">
-<link rel='stylesheet' href='/resources/testharness.css' media='all'/>
-</head>
-<body>
-<p>When prompted, accept to share your video stream.</p>
-<h1>Description</h1>
-<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>
-<script src=/resources/testharnessreport.js></script>
-<script src=featuredetection.js></script>
-<script src=prefix.js></script>
-<script>
-var t = async_test("Tests that a MediaStream handles ended correctly", {timeout:10000});
-t.step(function () {
-  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");
-      t.done();
-      }), false);
-    stream.ended = true;
-    assert_true(!stream.ended, "stream.ended should remain false");
-    stream.getVideoTracks()[0].stop();
-  }), function (error) {});
-});
-</script>
-</body>
-</html>
--- a/submitted/W3C/video.html	Tue Jun 04 18:50:54 2013 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-<!doctype html>
-<html>
-<head>
-<title>getUserMedia({video:true}) creates a stream with one video track</title>
-<link rel="author" title="Dominique Hazael-Massieux" href="mailto:dom@w3.org"/>
-<link rel="help" href="http://dev.w3.org/2011/webrtc/editor/getusermedia.html#navigatorusermedia">
-<link rel='stylesheet' href='/resources/testharness.css' media='all'/>
-</head>
-<body>
-<p>When prompted, accept to share your video stream.</p>
-<h1>Description</h1>
-<p>This test checks that the MediaStream object returned by the success callback in getUserMedia has exactly one video track and no audio.</p>
-
-<div id='log'></div>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=featuredetection.js></script>
-<script src=prefix.js></script>
-<script>
-var t = async_test("Tests that a MediaStream with at least one video track is returned");
-t.step(function() {
-  navigator.getUserMedia({video: true}, t.step_func(function (stream) {
-    assert_true(stream instanceof MediaStream, "getUserMedia success callback comes with a MediaStream object");
-    assert_equals(stream.getAudioTracks().length, 0, "the media stream has zero audio track");
-    assert_equals(stream.getVideoTracks().length, 1, "the media stream has exactly one video track");
-    assert_equals(stream.getVideoTracks()[0].kind, "video", "getAudioTracks() returns a sequence of tracks whose kind is 'video'");
-    t.done();
-  }), function(error) {});
-});
-</script>
-</body>
-</html>