зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1220441 - Improve gather trickle ice unit tests. r=bwc r=mjf
--HG-- extra : transplant_source : %60%F7%F7%11%21%C1%10L%19u%C4M%11%40%E6%0F%D9%0AO%C5
This commit is contained in:
Родитель
85550613ed
Коммит
8420475130
|
@ -2001,10 +2001,9 @@ TEST_F(IceGatherTest, TestStunServerReturnsLoopbackAddrV6) {
|
|||
|
||||
TEST_F(IceGatherTest, TestStunServerTrickle) {
|
||||
UseFakeStunUdpServerWithResponse("192.0.2.1", 3333);
|
||||
TestStunServer::GetInstance(AF_INET)->SetActive(false);
|
||||
TestStunServer::GetInstance(AF_INET)->SetDropInitialPackets(3);
|
||||
Gather(0);
|
||||
ASSERT_FALSE(StreamHasMatchingCandidate(0, "192.0.2.1"));
|
||||
TestStunServer::GetInstance(AF_INET)->SetActive(true);
|
||||
WaitForGather();
|
||||
ASSERT_TRUE(StreamHasMatchingCandidate(0, "192.0.2.1"));
|
||||
}
|
||||
|
@ -2042,23 +2041,20 @@ TEST_F(IceGatherTest, TestFakeStunServerNoNatDefaultRouteOnly) {
|
|||
|
||||
TEST_F(IceGatherTest, TestStunTcpServerTrickle) {
|
||||
UseFakeStunTcpServerWithResponse("192.0.3.1", 3333);
|
||||
TestStunTcpServer::GetInstance(AF_INET)->SetActive(false);
|
||||
TestStunServer::GetInstance(AF_INET)->SetDelay(500);
|
||||
Gather(0);
|
||||
ASSERT_FALSE(StreamHasMatchingCandidate(0, " 192.0.3.1 ", " tcptype "));
|
||||
TestStunTcpServer::GetInstance(AF_INET)->SetActive(true);
|
||||
WaitForGather();
|
||||
ASSERT_TRUE(StreamHasMatchingCandidate(0, " 192.0.3.1 ", " tcptype "));
|
||||
}
|
||||
|
||||
TEST_F(IceGatherTest, TestStunTcpAndUdpServerTrickle) {
|
||||
UseFakeStunUdpTcpServersWithResponse("192.0.2.1", 3333, "192.0.3.1", 3333);
|
||||
TestStunServer::GetInstance(AF_INET)->SetActive(false);
|
||||
TestStunTcpServer::GetInstance(AF_INET)->SetActive(false);
|
||||
TestStunServer::GetInstance(AF_INET)->SetDropInitialPackets(3);
|
||||
TestStunTcpServer::GetInstance(AF_INET)->SetDelay(500);
|
||||
Gather(0);
|
||||
ASSERT_FALSE(StreamHasMatchingCandidate(0, "192.0.2.1", "UDP"));
|
||||
ASSERT_FALSE(StreamHasMatchingCandidate(0, " 192.0.3.1 ", " tcptype "));
|
||||
TestStunServer::GetInstance(AF_INET)->SetActive(true);
|
||||
TestStunTcpServer::GetInstance(AF_INET)->SetActive(true);
|
||||
WaitForGather();
|
||||
ASSERT_TRUE(StreamHasMatchingCandidate(0, "192.0.2.1", "UDP"));
|
||||
ASSERT_TRUE(StreamHasMatchingCandidate(0, " 192.0.3.1 ", " tcptype "));
|
||||
|
|
Загрузка…
Ссылка в новой задаче