Bug 1149298 - Part 1: Test cases. r=drno

This commit is contained in:
Byron Campen [:bwc] 2015-03-30 15:46:49 -07:00
parent 900854f647
commit 30912960d8
2 changed files with 45 additions and 0 deletions

View File

@ -522,6 +522,12 @@ var commandsPeerConnectionOfferAnswer = [
},
function PC_REMOTE_CHECK_STATS(test) {
return checkAllTrackStats(test.pcRemote);
},
function PC_LOCAL_WAIT_FOR_END_OF_TRICKLE(test) {
return test.pcLocal.endOfTrickleIce;
},
function PC_REMOTE_WAIT_FOR_END_OF_TRICKLE(test) {
return test.pcRemote.endOfTrickleIce;
}
];

View File

@ -1814,6 +1814,45 @@ TEST_F(IceConnectTest, RemoveAndAddStream) {
ASSERT_TRUE_WAIT(p2_->ice_complete(), 1000);
}
TEST_F(IceConnectTest, RemoveStreamBeforeGather) {
AddStream("first", 1);
AddStream("second", 1);
ASSERT_TRUE(Gather(0));
RemoveStream(0);
WaitForGather();
ConnectTrickle();
RealisticTrickleDelay(p1_->ControlTrickle(1));
RealisticTrickleDelay(p2_->ControlTrickle(1));
ASSERT_TRUE_WAIT(p1_->ice_complete(), 1000);
ASSERT_TRUE_WAIT(p2_->ice_complete(), 1000);
}
TEST_F(IceConnectTest, RemoveStreamDuringGather) {
AddStream("first", 1);
AddStream("second", 1);
RemoveStream(0);
ASSERT_TRUE(Gather());
ConnectTrickle();
RealisticTrickleDelay(p1_->ControlTrickle(1));
RealisticTrickleDelay(p2_->ControlTrickle(1));
ASSERT_TRUE_WAIT(p1_->ice_complete(), 1000);
ASSERT_TRUE_WAIT(p2_->ice_complete(), 1000);
}
TEST_F(IceConnectTest, RemoveStreamDuringConnect) {
AddStream("first", 1);
AddStream("second", 1);
ASSERT_TRUE(Gather());
ConnectTrickle();
RealisticTrickleDelay(p1_->ControlTrickle(0));
RealisticTrickleDelay(p2_->ControlTrickle(0));
RealisticTrickleDelay(p1_->ControlTrickle(1));
RealisticTrickleDelay(p2_->ControlTrickle(1));
RemoveStream(0);
ASSERT_TRUE_WAIT(p1_->ice_complete(), 1000);
ASSERT_TRUE_WAIT(p2_->ice_complete(), 1000);
}
TEST_F(IceConnectTest, TestConnectRealTrickleOneStreamOneComponent) {
AddStream("first", 1);
AddStream("second", 1);