Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(421)

Side by Side Diff: LayoutTests/fast/mediastream/RTCPeerConnection-remotestreams.html

Issue 827673002: Add MediaStream.active attribute (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../../resources/js-test.js"></script> 4 <script src="../../resources/js-test.js"></script>
5 </head> 5 </head>
6 <body> 6 <body>
7 <script> 7 <script>
8 description("Tests that an RTCPeerConnection can signal that remote streams are added and removed."); 8 description("Tests that an RTCPeerConnection can signal that remote streams are added and removed.");
9 9
10 var pc = null; 10 var pc = null;
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 pc.addStream(local_stream); 51 pc.addStream(local_stream);
52 52
53 sessionDescription = new RTCSessionDescription({type:"answer", sdp:"remote"} ); 53 sessionDescription = new RTCSessionDescription({type:"answer", sdp:"remote"} );
54 shouldNotThrow('pc.setRemoteDescription(sessionDescription, requestSucceeded 1, requestFailedUnexpectedly);'); 54 shouldNotThrow('pc.setRemoteDescription(sessionDescription, requestSucceeded 1, requestFailedUnexpectedly);');
55 } 55 }
56 56
57 function onAddStream(event) { 57 function onAddStream(event) {
58 testPassed('remote stream was added'); 58 testPassed('remote stream was added');
59 shouldBeEqualToNumber('event.stream.getVideoTracks().length', 1); 59 shouldBeEqualToNumber('event.stream.getVideoTracks().length', 1);
60 shouldBeEqualToNumber('event.stream.getAudioTracks().length', 1); 60 shouldBeEqualToNumber('event.stream.getAudioTracks().length', 1);
61 shouldBeTrue('event.stream.active')
61 pc.removeStream(local_stream); 62 pc.removeStream(local_stream);
62 } 63 }
63 64
64 function onRemoveStream(event) { 65 function onRemoveStream(event) {
65 testPassed('remote stream was removed'); 66 testPassed('remote stream was removed');
66 shouldBeEqualToNumber('event.stream.getVideoTracks().length', 0); 67 shouldBeEqualToNumber('event.stream.getVideoTracks().length', 0);
67 shouldBeEqualToNumber('event.stream.getAudioTracks().length', 0); 68 shouldBeEqualToNumber('event.stream.getAudioTracks().length', 0);
69 shouldBeFalse('event.stream.active')
68 } 70 }
69 71
70 pc = new webkitRTCPeerConnection(null, null); 72 pc = new webkitRTCPeerConnection(null, null);
71 pc.onaddstream = onAddStream; 73 pc.onaddstream = onAddStream;
72 pc.onremovestream = onRemoveStream; 74 pc.onremovestream = onRemoveStream;
73 getUserMedia({audio:true, video:true}, gotStream); 75 getUserMedia({audio:true, video:true}, gotStream);
74 76
75 77
76 window.jsTestIsAsync = true; 78 window.jsTestIsAsync = true;
77 window.successfullyParsed = true; 79 window.successfullyParsed = true;
78 </script> 80 </script>
79 </body> 81 </body>
80 </html> 82 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698