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

--HG--
extra : rebase_source : a29be5c74c4bddfe672159b0de12a61e8540b9df
This commit is contained in:
Byron Campen [:bwc] 2015-03-30 15:46:49 -07:00
Родитель 831b749b58
Коммит 3ff500ee41
2 изменённых файлов: 45 добавлений и 0 удалений

Просмотреть файл

@ -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;
}
];

Просмотреть файл

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