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); |