summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorronghuawu@chromium.org <ronghuawu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-31 13:49:59 +0000
committerronghuawu@chromium.org <ronghuawu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-31 13:49:59 +0000
commitbc283e13693260a986454f6b8b176e406ac8b670 (patch)
tree850386bcedb3a133794e8d2b3421308dc8533e54
parent44013f6828207c9b179f29cd8bb1559d6e81c28c (diff)
downloadchromium_src-bc283e13693260a986454f6b8b176e406ac8b670.zip
chromium_src-bc283e13693260a986454f6b8b176e406ac8b670.tar.gz
chromium_src-bc283e13693260a986454f6b8b176e406ac8b670.tar.bz2
Hook up JSEP PrAnswer.
BUG=http://code.google.com/p/webrtc/issues/detail?id=456 TEST=content_unittests Review URL: https://chromiumcodereview.appspot.com/10443090 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@139780 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--content/renderer/media/peer_connection_handler_jsep.cc4
-rw-r--r--content/renderer/media/peer_connection_handler_jsep_unittest.cc16
2 files changed, 17 insertions, 3 deletions
diff --git a/content/renderer/media/peer_connection_handler_jsep.cc b/content/renderer/media/peer_connection_handler_jsep.cc
index 21ebe31d..21c4eac 100644
--- a/content/renderer/media/peer_connection_handler_jsep.cc
+++ b/content/renderer/media/peer_connection_handler_jsep.cc
@@ -351,8 +351,8 @@ bool PeerConnectionHandlerJsep::GetNativeAction(
*native_action = webrtc::PeerConnectionInterface::kOffer;
break;
case ActionSDPPRanswer:
- VLOG(1) << "Action PRANSWER not supported yet";
- return false;
+ *native_action = webrtc::PeerConnectionInterface::kPrAnswer;
+ break;
case ActionSDPAnswer:
*native_action = webrtc::PeerConnectionInterface::kAnswer;
break;
diff --git a/content/renderer/media/peer_connection_handler_jsep_unittest.cc b/content/renderer/media/peer_connection_handler_jsep_unittest.cc
index be2e3b2..28c9a43 100644
--- a/content/renderer/media/peer_connection_handler_jsep_unittest.cc
+++ b/content/renderer/media/peer_connection_handler_jsep_unittest.cc
@@ -172,10 +172,24 @@ TEST_F(PeerConnectionHandlerJsepTest, Basic) {
EXPECT_EQ(UTF16ToUTF8(sdp), UTF16ToUTF8(description.initialSDP()));
// Set remote description.
- action = PeerConnectionHandlerJsep::ActionSDPAnswer;
sdp = "test sdp 2";
description.reset();
description.initialize(sdp);
+
+ // PrAnswer
+ action = PeerConnectionHandlerJsep::ActionSDPPRanswer;
+ EXPECT_TRUE(pc_handler_->setRemoteDescription(action, description));
+ EXPECT_EQ(webrtc::PeerConnectionInterface::kPrAnswer,
+ mock_peer_connection_->action());
+ EXPECT_EQ(UTF16ToUTF8(sdp), mock_peer_connection_->description_sdp());
+ // Get remote description.
+ description.reset();
+ description = pc_handler_->remoteDescription();
+ EXPECT_FALSE(description.isNull());
+ EXPECT_EQ(UTF16ToUTF8(sdp), UTF16ToUTF8(description.initialSDP()));
+
+ // Answer
+ action = PeerConnectionHandlerJsep::ActionSDPAnswer;
EXPECT_TRUE(pc_handler_->setRemoteDescription(action, description));
EXPECT_EQ(webrtc::PeerConnectionInterface::kAnswer,
mock_peer_connection_->action());