| OLD | NEW |
| 1 <!doctype html> | 1 <!doctype html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <title>A disabled video track is rendered as blackness</title> | 4 <title>A disabled video track is rendered as blackness</title> |
| 5 <link rel="author" title="Dominique Hazael-Massieux" href="mailto:dom@w3.org"/> | 5 <link rel="author" title="Dominique Hazael-Massieux" href="mailto:dom@w3.org"/> |
| 6 <link rel="help" href="http://dev.w3.org/2011/webrtc/editor/getusermedia.html#in
troduction"> | 6 <link rel="help" href="http://dev.w3.org/2011/webrtc/editor/getusermedia.html#in
troduction"> |
| 7 <link rel="help" href="http://dev.w3.org/2011/webrtc/editor/getusermedia.html#me
diastreams-as-media-elements"> | 7 <link rel="help" href="http://dev.w3.org/2011/webrtc/editor/getusermedia.html#me
diastreams-as-media-elements"> |
| 8 <link rel='stylesheet' href='../../../../../resources/testharness.css' media='al
l'/> | |
| 9 </head> | 8 </head> |
| 10 <body> | 9 <body> |
| 11 <p class="instructions" style="display:none">When prompted, accept to share your
video stream.</p> | 10 <p class="instructions" style="display:none">When prompted, accept to share your
video stream.</p> |
| 12 <h1 class="instructions" style="display:none">Description</h1> | 11 <h1 class="instructions" style="display:none">Description</h1> |
| 13 <p class="instructions" style="display:none">This test checks that a disabled vi
deo track in a | 12 <p class="instructions" style="display:none">This test checks that a disabled vi
deo track in a |
| 14 MediaStream is rendered as blackness.</p> | 13 MediaStream is rendered as blackness.</p> |
| 15 <video id="vid"></video> | 14 <video id="vid"></video> |
| 16 | 15 |
| 17 <div id='log'></div> | 16 <div id='log'></div> |
| 18 <script src=../../../../../resources/testharness.js></script> | 17 <script src=../../../resources/testharness.js></script> |
| 19 <script src=../../../../../resources/testharnessreport.js></script> | 18 <script src=../../../resources/testharnessreport.js></script> |
| 20 <script src="../../../../../resources/vendor-prefix.js" data-prefixed-objects='[
{"ancestors":["navigator"], "name":"getUserMedia"}]' data-prefixed-prototypes='[
{"ancestors":["HTMLMediaElement"],"name":"srcObject"}]'></script> | 19 <script src="../../../resources/vendor-prefix.js" data-prefixed-objects='[{"ance
stors":["navigator"], "name":"getUserMedia"}]' data-prefixed-prototypes='[{"ance
stors":["HTMLMediaElement"],"name":"srcObject"}]'></script> |
| 21 <script> | 20 <script> |
| 22 var vid = document.getElementById("vid"); | 21 var vid = document.getElementById("vid"); |
| 23 var cv = document.createElement("canvas"); | 22 var cv = document.createElement("canvas"); |
| 24 var t = async_test("Tests that a disabled video track in a MediaStream is render
ed as blackness", {timeout: 10000}); | 23 var t = async_test("Tests that a disabled video track in a MediaStream is render
ed as blackness", {timeout: 10000}); |
| 25 t.step(function() { | 24 t.step(function() { |
| 26 navigator.getUserMedia( | 25 navigator.getUserMedia( |
| 27 {video: true}, | 26 {video: true}, |
| 28 t.step_func(function (stream) { | 27 t.step_func(function (stream) { |
| 29 var testOncePlaying = function() { | 28 var testOncePlaying = function() { |
| 30 if (stream.getVideoTracks()[0].enabled) { | 29 if (stream.getVideoTracks()[0].enabled) { |
| (...skipping 17 matching lines...) Expand all Loading... |
| 48 } | 47 } |
| 49 vid.srcObject = stream; | 48 vid.srcObject = stream; |
| 50 vid.play(); | 49 vid.play(); |
| 51 vid.addEventListener("timeupdate", t.step_func(testOncePlaying), false); | 50 vid.addEventListener("timeupdate", t.step_func(testOncePlaying), false); |
| 52 }), | 51 }), |
| 53 function(error) {}); | 52 function(error) {}); |
| 54 }); | 53 }); |
| 55 </script> | 54 </script> |
| 56 </body> | 55 </body> |
| 57 </html> | 56 </html> |
| OLD | NEW |