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

Unified Diff: webrtc/api/peerconnectioninterface_unittest.cc

Issue 2504103002: Adding GetConfiguration to PeerConnection. (Closed)
Patch Set: Fixing typo in comment. Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/api/peerconnectioninterface.h ('k') | webrtc/api/peerconnectionproxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/peerconnectioninterface_unittest.cc
diff --git a/webrtc/api/peerconnectioninterface_unittest.cc b/webrtc/api/peerconnectioninterface_unittest.cc
index a4a11e1252e5720d5cc71386a43bb125c7f5cb7d..bde7d1f3b06c72540d9c339e86c9d2837743ecb9 100644
--- a/webrtc/api/peerconnectioninterface_unittest.cc
+++ b/webrtc/api/peerconnectioninterface_unittest.cc
@@ -1166,6 +1166,32 @@ TEST_F(PeerConnectionInterfaceTest,
EXPECT_TRUE(raw_port_allocator->initialized());
}
+// Check that GetConfiguration returns the configuration the PeerConnection was
+// constructed with, before SetConfiguration is called.
+TEST_F(PeerConnectionInterfaceTest, GetConfigurationAfterCreatePeerConnection) {
+ PeerConnectionInterface::RTCConfiguration config;
+ config.type = PeerConnectionInterface::kRelay;
+ CreatePeerConnection(config, nullptr);
+
+ PeerConnectionInterface::RTCConfiguration returned_config =
+ pc_->GetConfiguration();
+ EXPECT_EQ(PeerConnectionInterface::kRelay, returned_config.type);
+}
+
+// Check that GetConfiguration returns the last configuration passed into
+// SetConfiguration.
+TEST_F(PeerConnectionInterfaceTest, GetConfigurationAfterSetConfiguration) {
+ CreatePeerConnection();
+
+ PeerConnectionInterface::RTCConfiguration config;
+ config.type = PeerConnectionInterface::kRelay;
+ EXPECT_TRUE(pc_->SetConfiguration(config));
+
+ PeerConnectionInterface::RTCConfiguration returned_config =
+ pc_->GetConfiguration();
+ EXPECT_EQ(PeerConnectionInterface::kRelay, returned_config.type);
+}
+
TEST_F(PeerConnectionInterfaceTest, AddStreams) {
CreatePeerConnection();
AddVideoStream(kStreamLabel1);
« no previous file with comments | « webrtc/api/peerconnectioninterface.h ('k') | webrtc/api/peerconnectionproxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698