Index: talk/app/webrtc/peerconnectioninterface_unittest.cc |
diff --git a/talk/app/webrtc/peerconnectioninterface_unittest.cc b/talk/app/webrtc/peerconnectioninterface_unittest.cc |
index 5e88658a4e25ce3c464853dfbba53a1335829c63..771ae39d2440f048603e004122125f3517403681 100644 |
--- a/talk/app/webrtc/peerconnectioninterface_unittest.cc |
+++ b/talk/app/webrtc/peerconnectioninterface_unittest.cc |
@@ -1572,6 +1572,23 @@ TEST_F(PeerConnectionInterfaceTest, ReceiveUpdatedAudioOfferWithBadCodecs) { |
CreateAnswerAsLocalDescription(); |
} |
+// Test that we can use SetConfiguration to change the ICE servers of the |
+// PortAllocator. |
+TEST_F(PeerConnectionInterfaceTest, SetConfigurationChangesIceServers) { |
+ CreatePeerConnection(); |
+ |
+ PeerConnectionInterface::RTCConfiguration config; |
+ PeerConnectionInterface::IceServer server; |
+ server.uri = "stun:test_hostname"; |
+ config.servers.push_back(server); |
+ EXPECT_TRUE(pc_->SetConfiguration(config)); |
+ |
+ cricket::FakePortAllocator* allocator = |
+ port_allocator_factory_->last_created_allocator(); |
+ EXPECT_EQ(1u, allocator->stun_servers().size()); |
+ EXPECT_EQ("test_hostname", allocator->stun_servers().begin()->hostname()); |
+} |
+ |
// Test that PeerConnection::Close changes the states to closed and all remote |
// tracks change state to ended. |
TEST_F(PeerConnectionInterfaceTest, CloseAndTestStreamsAndStates) { |