Bug 1164061 - Backout signaling unittest changes for tmmbr r=jesup
authorEthan Hugg <ethanhugg@gmail.com>
Tue, 12 May 2015 09:15:00 -0700
changeset 244154 beb2c4d01135febca797f77c87e04c012c3cd773
parent 244153 18b0d062f5dd9af3138913e9ad09e63eff4add32
child 244155 346c13c3d8affc425c1619d0e6fc94d23bf2049a
push id59854
push userrjesup@wgate.com
push dateSat, 16 May 2015 06:18:15 +0000
treeherdermozilla-inbound@beb2c4d01135 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjesup
bugs1164061
milestone41.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1164061 - Backout signaling unittest changes for tmmbr r=jesup
media/webrtc/signaling/test/signaling_unittests.cpp
--- a/media/webrtc/signaling/test/signaling_unittests.cpp
+++ b/media/webrtc/signaling/test/signaling_unittests.cpp
@@ -902,17 +902,16 @@ class SignalingAgent {
   explicit SignalingAgent(const std::string &aName,
     const std::string stun_addr = g_stun_server_address,
     uint16_t stun_port = g_stun_server_port) :
     pc(nullptr),
     name(aName),
     mBundleEnabled(true),
     mExpectedFrameRequestType(VideoSessionConduit::FrameRequestPli),
     mExpectNack(true),
-    mExpectTmmbr(true),
     mExpectRtcpMuxAudio(true),
     mExpectRtcpMuxVideo(true),
     mRemoteDescriptionSet(false) {
     cfg_.addStunServer(stun_addr, stun_port);
 
     PeerConnectionImpl *pcImpl =
       PeerConnectionImpl::CreatePeerConnection();
     EXPECT_TRUE(pcImpl);
@@ -1197,17 +1196,16 @@ class SignalingAgent {
       ASSERT_TRUE(pipeline->IsVideo()) << "Remote track " << trackId
                                        << " was not video";
       mozilla::MediaSessionConduit *conduit = pipeline->Conduit();
       ASSERT_TRUE(conduit);
       ASSERT_EQ(conduit->type(), mozilla::MediaSessionConduit::VIDEO);
       mozilla::VideoSessionConduit *video_conduit =
         static_cast<mozilla::VideoSessionConduit*>(conduit);
       ASSERT_EQ(mExpectNack, video_conduit->UsingNackBasic());
-      ASSERT_EQ(mExpectTmmbr, video_conduit->UsingTmmbr());
       ASSERT_EQ(mExpectedFrameRequestType,
                 video_conduit->FrameRequestMethod());
       ASSERT_EQ(mExpectRtcpMuxVideo, pipeline->IsDoingRtcpMux())
         << "Pipeline for remote track " << trackId
         << " is" << (mExpectRtcpMuxVideo ? " not " : " ") << "using rtcp-mux";
       // No checking for video RTP yet, since we don't have support for fake
       // video here yet. (bug 1142320)
     } else {
@@ -1546,17 +1544,16 @@ public:
   std::string offer_;
   std::string answer_;
   std::vector<nsRefPtr<DOMMediaStream>> domMediaStreams_;
   IceConfiguration cfg_;
   const std::string name;
   bool mBundleEnabled;
   VideoSessionConduit::FrameRequestType mExpectedFrameRequestType;
   bool mExpectNack;
-  bool mExpectTmmbr;
   bool mExpectRtcpMuxAudio;
   bool mExpectRtcpMuxVideo;
   bool mRemoteDescriptionSet;
 
   std::map<Msid, SdpMediaSection::MediaType> mAddedTracks;
 
   typedef struct {
     std::string candidate;
@@ -1988,17 +1985,16 @@ public:
     // Double-check that the offered SDP matches what we expect
     CheckRtcpFbSdp(sdpWrapper.getSdp(), feedback);
 
     return sdpWrapper.getSdp();
   }
 
   void TestRtcpFbAnswer(const std::set<std::string>& feedback,
       bool expectNack,
-      bool expectTmmbr,
       VideoSessionConduit::FrameRequestType frameRequestType) {
     EnsureInit();
     OfferOptions options;
 
     a1_->CreateOffer(options, OFFER_AV);
     a1_->SetLocal(TestObserver::OFFER, a1_->offer());
 
     a2_->SetRemote(TestObserver::OFFER, a1_->offer());
@@ -2007,41 +2003,38 @@ public:
     a2_->SetLocal(TestObserver::ANSWER, a2_->answer());
 
     std::string modifiedAnswer(HardcodeRtcpFb(a2_->answer(), feedback));
 
     a1_->SetRemote(TestObserver::ANSWER, modifiedAnswer);
 
     a1_->SetExpectedFrameRequestType(frameRequestType);
     a1_->mExpectNack = expectNack;
-    a1_->mExpectTmmbr = expectTmmbr;
 
     WaitForCompleted();
     CheckPipelines();
 
     CloseStreams();
   }
 
   void TestRtcpFbOffer(
       const std::set<std::string>& feedback,
       bool expectNack,
-      bool expectTmmbr,
       VideoSessionConduit::FrameRequestType frameRequestType) {
     EnsureInit();
     OfferOptions options;
 
     a1_->CreateOffer(options, OFFER_AV);
     a1_->SetLocal(TestObserver::OFFER, a1_->offer());
 
     std::string modifiedOffer = HardcodeRtcpFb(a1_->offer(), feedback);
 
     a2_->SetRemote(TestObserver::OFFER, modifiedOffer);
     a2_->SetExpectedFrameRequestType(frameRequestType);
     a2_->mExpectNack = expectNack;
-    a2_->mExpectTmmbr = expectTmmbr;
 
     a2_->CreateAnswer(OFFER_AV | ANSWER_AV);
 
     a2_->SetLocal(TestObserver::ANSWER, a2_->answer());
     a1_->SetRemote(TestObserver::ANSWER, a2_->answer());
 
     WaitForCompleted();
 
@@ -3389,161 +3382,145 @@ TEST_P(SignalingTest, FullCallAudioNoMux
 }
 
 // TODO: Move to jsep_sesion_unittest
 TEST_P(SignalingTest, RtcpFbInOffer)
 {
   EnsureInit();
   OfferOptions options;
   a1_->CreateOffer(options, OFFER_AV);
-  const char *expected[] = { "nack", "nack pli", "ccm fir", "ccm tmmbr" };
+  const char *expected[] = { "nack", "nack pli", "ccm fir" };
   CheckRtcpFbSdp(a1_->offer(), ARRAY_TO_SET(std::string, expected));
 }
 
 TEST_P(SignalingTest, RtcpFbOfferAll)
 {
-  const char *feedbackTypes[] = { "nack", "nack pli", "ccm fir", "ccm tmmbr" };
+  const char *feedbackTypes[] = { "nack", "nack pli", "ccm fir" };
   TestRtcpFbOffer(ARRAY_TO_SET(std::string, feedbackTypes),
                   true,
-                  true,
                   VideoSessionConduit::FrameRequestPli);
 }
 
 TEST_P(SignalingTest, RtcpFbOfferNoNackBasic)
 {
-  const char *feedbackTypes[] = { "nack pli", "ccm fir", "ccm tmmbr" };
+  const char *feedbackTypes[] = { "nack pli", "ccm fir" };
   TestRtcpFbOffer(ARRAY_TO_SET(std::string, feedbackTypes),
                   false,
-                  true,
                   VideoSessionConduit::FrameRequestPli);
 }
 
 TEST_P(SignalingTest, RtcpFbOfferNoNackPli)
 {
   const char *feedbackTypes[] = { "nack", "ccm fir" };
   TestRtcpFbOffer(ARRAY_TO_SET(std::string, feedbackTypes),
                   true,
-                  false,
                   VideoSessionConduit::FrameRequestFir);
 }
 
 TEST_P(SignalingTest, RtcpFbOfferNoCcmFir)
 {
   const char *feedbackTypes[] = { "nack", "nack pli" };
   TestRtcpFbOffer(ARRAY_TO_SET(std::string, feedbackTypes),
                   true,
-                  false,
                   VideoSessionConduit::FrameRequestPli);
 }
 
 TEST_P(SignalingTest, RtcpFbOfferNoNack)
 {
   const char *feedbackTypes[] = { "ccm fir" };
   TestRtcpFbOffer(ARRAY_TO_SET(std::string, feedbackTypes),
                   false,
-                  false,
                   VideoSessionConduit::FrameRequestFir);
 }
 
 TEST_P(SignalingTest, RtcpFbOfferNoFrameRequest)
 {
   const char *feedbackTypes[] = { "nack" };
   TestRtcpFbOffer(ARRAY_TO_SET(std::string, feedbackTypes),
                   true,
-                  false,
                   VideoSessionConduit::FrameRequestNone);
 }
 
 TEST_P(SignalingTest, RtcpFbOfferPliOnly)
 {
   const char *feedbackTypes[] = { "nack pli" };
   TestRtcpFbOffer(ARRAY_TO_SET(std::string, feedbackTypes),
                   false,
-                  false,
                   VideoSessionConduit::FrameRequestPli);
 }
 
 TEST_P(SignalingTest, RtcpFbOfferNoFeedback)
 {
   const char *feedbackTypes[] = { };
   TestRtcpFbOffer(ARRAY_TO_SET(std::string, feedbackTypes),
                   false,
-                  false,
                   VideoSessionConduit::FrameRequestNone);
 }
 
 TEST_P(SignalingTest, RtcpFbAnswerAll)
 {
   const char *feedbackTypes[] = { "nack", "nack pli", "ccm fir" };
   TestRtcpFbAnswer(ARRAY_TO_SET(std::string, feedbackTypes),
                   true,
-                  false,
                   VideoSessionConduit::FrameRequestPli);
 }
 
 TEST_P(SignalingTest, RtcpFbAnswerNoNackBasic)
 {
   const char *feedbackTypes[] = { "nack pli", "ccm fir" };
   TestRtcpFbAnswer(ARRAY_TO_SET(std::string, feedbackTypes),
                   false,
-                  false,
                   VideoSessionConduit::FrameRequestPli);
 }
 
 TEST_P(SignalingTest, RtcpFbAnswerNoNackPli)
 {
   const char *feedbackTypes[] = { "nack", "ccm fir" };
   TestRtcpFbAnswer(ARRAY_TO_SET(std::string, feedbackTypes),
                   true,
-                  false,
                   VideoSessionConduit::FrameRequestFir);
 }
 
 TEST_P(SignalingTest, RtcpFbAnswerNoCcmFir)
 {
   const char *feedbackTypes[] = { "nack", "nack pli" };
   TestRtcpFbAnswer(ARRAY_TO_SET(std::string, feedbackTypes),
                   true,
-                  false,
                   VideoSessionConduit::FrameRequestPli);
 }
 
 TEST_P(SignalingTest, RtcpFbAnswerNoNack)
 {
   const char *feedbackTypes[] = { "ccm fir" };
   TestRtcpFbAnswer(ARRAY_TO_SET(std::string, feedbackTypes),
                   false,
-                  false,
                   VideoSessionConduit::FrameRequestFir);
 }
 
 TEST_P(SignalingTest, RtcpFbAnswerNoFrameRequest)
 {
   const char *feedbackTypes[] = { "nack" };
   TestRtcpFbAnswer(ARRAY_TO_SET(std::string, feedbackTypes),
                   true,
-                  false,
                   VideoSessionConduit::FrameRequestNone);
 }
 
 TEST_P(SignalingTest, RtcpFbAnswerPliOnly)
 {
   const char *feedbackTypes[] = { "nack pli" };
   TestRtcpFbAnswer(ARRAY_TO_SET(std::string, feedbackTypes),
-                  false,
-                  false,
+                  0,
                   VideoSessionConduit::FrameRequestPli);
 }
 
 TEST_P(SignalingTest, RtcpFbAnswerNoFeedback)
 {
   const char *feedbackTypes[] = { };
   TestRtcpFbAnswer(ARRAY_TO_SET(std::string, feedbackTypes),
-                  false,
-                  false,
+                  0,
                   VideoSessionConduit::FrameRequestNone);
 }
 
 // In this test we will change the offer SDP's a=setup value
 // from actpass to passive.  This will make the answer do active.
 TEST_P(SignalingTest, AudioCallForceDtlsRoles)
 {
   EnsureInit();
@@ -4386,22 +4363,16 @@ TEST_P(SignalingTest, UseNonPrefferedPay
                  "\r\na=rtcp-fb:121 nack pli");
 
   match = answer.find("\r\na=rtcp-fb:120 ccm fir");
   ASSERT_NE(std::string::npos, match);
   answer.replace(match,
                  strlen("\r\na=rtcp-fb:121 ccm fir"),
                  "\r\na=rtcp-fb:121 ccm fir");
 
-  match = answer.find("\r\na=rtcp-fb:120 ccm tmmbr");
-  ASSERT_NE(std::string::npos, match);
-  answer.replace(match,
-                 strlen("\r\na=rtcp-fb:121 ccm tmmbr"),
-                 "\r\na=rtcp-fb:121 ccm tmmbr");
-
   std::cout << "Modified SDP " << std::endl
             << indent(answer) << std::endl;
 
   a2_->SetLocal(TestObserver::ANSWER, answer, false);
 
   ASSERT_EQ(a2_->pObserver->lastStatusCode,
             PeerConnectionImpl::kNoError);