| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| 11 #include <memory> | 11 #include <memory> |
| 12 | 12 |
| 13 #include "webrtc/p2p/base/basicpacketsocketfactory.h" | 13 #include "webrtc/p2p/base/basicpacketsocketfactory.h" |
| 14 #include "webrtc/p2p/base/jseptransport.h" |
| 14 #include "webrtc/p2p/base/relayport.h" | 15 #include "webrtc/p2p/base/relayport.h" |
| 15 #include "webrtc/p2p/base/stunport.h" | 16 #include "webrtc/p2p/base/stunport.h" |
| 16 #include "webrtc/p2p/base/tcpport.h" | 17 #include "webrtc/p2p/base/tcpport.h" |
| 17 #include "webrtc/p2p/base/testrelayserver.h" | 18 #include "webrtc/p2p/base/testrelayserver.h" |
| 18 #include "webrtc/p2p/base/teststunserver.h" | 19 #include "webrtc/p2p/base/teststunserver.h" |
| 19 #include "webrtc/p2p/base/testturnserver.h" | 20 #include "webrtc/p2p/base/testturnserver.h" |
| 20 #include "webrtc/p2p/base/transport.h" | |
| 21 #include "webrtc/p2p/base/turnport.h" | 21 #include "webrtc/p2p/base/turnport.h" |
| 22 #include "webrtc/base/arraysize.h" | 22 #include "webrtc/base/arraysize.h" |
| 23 #include "webrtc/base/buffer.h" | 23 #include "webrtc/base/buffer.h" |
| 24 #include "webrtc/base/crc32.h" | 24 #include "webrtc/base/crc32.h" |
| 25 #include "webrtc/base/gunit.h" | 25 #include "webrtc/base/gunit.h" |
| 26 #include "webrtc/base/helpers.h" | 26 #include "webrtc/base/helpers.h" |
| 27 #include "webrtc/base/logging.h" | 27 #include "webrtc/base/logging.h" |
| 28 #include "webrtc/base/natserver.h" | 28 #include "webrtc/base/natserver.h" |
| 29 #include "webrtc/base/natsocketfactory.h" | 29 #include "webrtc/base/natsocketfactory.h" |
| 30 #include "webrtc/base/physicalsocketserver.h" | 30 #include "webrtc/base/physicalsocketserver.h" |
| (...skipping 2714 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2745 port->CreateConnection(candidate, Port::ORIGIN_MESSAGE); | 2745 port->CreateConnection(candidate, Port::ORIGIN_MESSAGE); |
| 2746 EXPECT_NE(conn1, conn2); | 2746 EXPECT_NE(conn1, conn2); |
| 2747 conn_in_use = port->GetConnection(address); | 2747 conn_in_use = port->GetConnection(address); |
| 2748 EXPECT_EQ(conn2, conn_in_use); | 2748 EXPECT_EQ(conn2, conn_in_use); |
| 2749 EXPECT_EQ(2u, conn_in_use->remote_candidate().generation()); | 2749 EXPECT_EQ(2u, conn_in_use->remote_candidate().generation()); |
| 2750 | 2750 |
| 2751 // Make sure the new connection was not deleted. | 2751 // Make sure the new connection was not deleted. |
| 2752 rtc::Thread::Current()->ProcessMessages(300); | 2752 rtc::Thread::Current()->ProcessMessages(300); |
| 2753 EXPECT_TRUE(port->GetConnection(address) != nullptr); | 2753 EXPECT_TRUE(port->GetConnection(address) != nullptr); |
| 2754 } | 2754 } |
| OLD | NEW |