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

Side by Side Diff: chrome/test/data/webrtc/peerconnection_rtp.js

Issue 2813443003: Revert of RTCRtpReceiver.getContributingSources() added. (Closed)
Patch Set: Created 3 years, 8 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
« no previous file with comments | « no previous file | content/renderer/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /** 1 /**
2 * Copyright 2017 The Chromium Authors. All rights reserved. 2 * Copyright 2017 The Chromium Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be 3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file. 4 * found in the LICENSE file.
5 */ 5 */
6 6
7 // Public interface to tests. These are expected to be called with 7 // Public interface to tests. These are expected to be called with
8 // ExecuteJavascript invocations from the browser tests and will return answers 8 // ExecuteJavascript invocations from the browser tests and will return answers
9 // through the DOM automation controller. 9 // through the DOM automation controller.
10 10
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 if (peerConnection_().getReceivers().length != remoteTracks.size) 57 if (peerConnection_().getReceivers().length != remoteTracks.size)
58 throw failTest('The number of receivers and tracks are not the same.'); 58 throw failTest('The number of receivers and tracks are not the same.');
59 59
60 let receivers = new Set(); 60 let receivers = new Set();
61 let receiverTracks = new Set(); 61 let receiverTracks = new Set();
62 peerConnection_().getReceivers().forEach(function(receiver) { 62 peerConnection_().getReceivers().forEach(function(receiver) {
63 if (receiver == null) 63 if (receiver == null)
64 throw failTest('receiver is null or undefined.'); 64 throw failTest('receiver is null or undefined.');
65 if (receiver.track == null) 65 if (receiver.track == null)
66 throw failTest('receiver.track is null or undefined.'); 66 throw failTest('receiver.track is null or undefined.');
67 if (receiver.getContributingSources().length != 0)
68 throw failTest('receiver.getContributingSources() is not empty.');
69 receivers.add(receiver); 67 receivers.add(receiver);
70 receiverTracks.add(receiver.track); 68 receiverTracks.add(receiver.track);
71 }); 69 });
72 if (receiverTracks.size != receivers.size) 70 if (receiverTracks.size != receivers.size)
73 throw failTest('receiverTracks.size != receivers.size'); 71 throw failTest('receiverTracks.size != receivers.size');
74 72
75 if (!setEquals_(receiverTracks, remoteTracks)) { 73 if (!setEquals_(receiverTracks, remoteTracks)) {
76 throw failTest('The set of receiver tracks is not equal to the set of ' + 74 throw failTest('The set of receiver tracks is not equal to the set of ' +
77 'stream tracks.'); 75 'stream tracks.');
78 } 76 }
(...skipping 20 matching lines...) Expand all
99 if (a == null) 97 if (a == null)
100 return b == null; 98 return b == null;
101 if (a.size != b.size) 99 if (a.size != b.size)
102 return false; 100 return false;
103 a.forEach(function(value) { 101 a.forEach(function(value) {
104 if (!b.has(value)) 102 if (!b.has(value))
105 return false; 103 return false;
106 }); 104 });
107 return true; 105 return true;
108 } 106 }
OLDNEW
« no previous file with comments | « no previous file | content/renderer/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698