PeerConnectionTest(java): remove the obsolete magical names of streams & tracks.

BUG=1253
R=wu@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/7929005

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5478 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
fischman@webrtc.org 2014-02-03 19:15:44 +00:00
parent a06ebab1e1
commit 6e08228525

View File

@ -203,8 +203,8 @@ public class PeerConnectionTest extends TestCase {
assertEquals(expectedAddStreamLabels.removeFirst(), stream.label()); assertEquals(expectedAddStreamLabels.removeFirst(), stream.label());
assertEquals(1, stream.videoTracks.size()); assertEquals(1, stream.videoTracks.size());
assertEquals(1, stream.audioTracks.size()); assertEquals(1, stream.audioTracks.size());
assertTrue(stream.videoTracks.get(0).id().endsWith("LMSv0")); assertTrue(stream.videoTracks.get(0).id().endsWith("VideoTrack"));
assertTrue(stream.audioTracks.get(0).id().endsWith("LMSa0")); assertTrue(stream.audioTracks.get(0).id().endsWith("AudioTrack"));
assertEquals("video", stream.videoTracks.get(0).kind()); assertEquals("video", stream.videoTracks.get(0).kind());
assertEquals("audio", stream.audioTracks.get(0).kind()); assertEquals("audio", stream.audioTracks.get(0).kind());
VideoRenderer renderer = createVideoRenderer(this); VideoRenderer renderer = createVideoRenderer(this);
@ -533,16 +533,11 @@ public class PeerConnectionTest extends TestCase {
VideoSource videoSource = factory.createVideoSource( VideoSource videoSource = factory.createVideoSource(
VideoCapturer.create(""), new MediaConstraints()); VideoCapturer.create(""), new MediaConstraints());
// TODO(fischman): the track ids here and in the addTracksToPC() call
// below hard-code the <mediaStreamLabel>[av]<index> scheme used in the
// serialized SDP, because the C++ API doesn't auto-translate.
// Drop |label| params from {Audio,Video}Track-related APIs once
// https://code.google.com/p/webrtc/issues/detail?id=1253 is fixed.
offeringExpectations.expectSetSize(); offeringExpectations.expectSetSize();
offeringExpectations.expectRenegotiationNeeded(); offeringExpectations.expectRenegotiationNeeded();
WeakReference<MediaStream> oLMS = addTracksToPC( WeakReference<MediaStream> oLMS = addTracksToPC(
factory, offeringPC, videoSource, "oLMS", "oLMSv0", "oLMSa0", factory, offeringPC, videoSource, "offeredMediaStream",
offeringExpectations); "offeredVideoTrack", "offeredAudioTrack", offeringExpectations);
offeringExpectations.expectRenegotiationNeeded(); offeringExpectations.expectRenegotiationNeeded();
DataChannel offeringDC = offeringPC.createDataChannel( DataChannel offeringDC = offeringPC.createDataChannel(
@ -560,7 +555,7 @@ public class PeerConnectionTest extends TestCase {
sdpLatch = new SdpObserverLatch(); sdpLatch = new SdpObserverLatch();
answeringExpectations.expectSignalingChange( answeringExpectations.expectSignalingChange(
SignalingState.HAVE_REMOTE_OFFER); SignalingState.HAVE_REMOTE_OFFER);
answeringExpectations.expectAddStream("oLMS"); answeringExpectations.expectAddStream("offeredMediaStream");
// SCTP DataChannels are announced via OPEN messages over the established // SCTP DataChannels are announced via OPEN messages over the established
// connection (not via SDP), so answeringExpectations can only register // connection (not via SDP), so answeringExpectations can only register
// expecting the channel during ICE, below. // expecting the channel during ICE, below.
@ -573,8 +568,8 @@ public class PeerConnectionTest extends TestCase {
answeringExpectations.expectSetSize(); answeringExpectations.expectSetSize();
answeringExpectations.expectRenegotiationNeeded(); answeringExpectations.expectRenegotiationNeeded();
WeakReference<MediaStream> aLMS = addTracksToPC( WeakReference<MediaStream> aLMS = addTracksToPC(
factory, answeringPC, videoSource, "aLMS", "aLMSv0", "aLMSa0", factory, answeringPC, videoSource, "answeredMediaStream",
answeringExpectations); "answeredVideoTrack", "answeredAudioTrack", answeringExpectations);
sdpLatch = new SdpObserverLatch(); sdpLatch = new SdpObserverLatch();
answeringPC.createAnswer(sdpLatch, new MediaConstraints()); answeringPC.createAnswer(sdpLatch, new MediaConstraints());
@ -602,7 +597,7 @@ public class PeerConnectionTest extends TestCase {
assertNull(sdpLatch.getSdp()); assertNull(sdpLatch.getSdp());
sdpLatch = new SdpObserverLatch(); sdpLatch = new SdpObserverLatch();
offeringExpectations.expectSignalingChange(SignalingState.STABLE); offeringExpectations.expectSignalingChange(SignalingState.STABLE);
offeringExpectations.expectAddStream("aLMS"); offeringExpectations.expectAddStream("answeredMediaStream");
offeringPC.setRemoteDescription(sdpLatch, answerSdp); offeringPC.setRemoteDescription(sdpLatch, answerSdp);
assertTrue(sdpLatch.await()); assertTrue(sdpLatch.await());
assertNull(sdpLatch.getSdp()); assertNull(sdpLatch.getSdp());