equal
deleted
inserted
replaced
519 delete iDecryptedPayload; |
519 delete iDecryptedPayload; |
520 delete iTestPayload160Bits; |
520 delete iTestPayload160Bits; |
521 delete iTestMKI128Bits; |
521 delete iTestMKI128Bits; |
522 delete iTestAuthTag80Bits; |
522 delete iTestAuthTag80Bits; |
523 |
523 |
|
524 iDecryptedPayload = NULL; |
|
525 iTestPayload160Bits = NULL; |
|
526 iTestMKI128Bits = NULL; |
|
527 iTestAuthTag80Bits = NULL; |
|
528 |
524 delete iStreamIn; |
529 delete iStreamIn; |
525 delete iStreamOut; |
530 delete iStreamOut; |
526 delete iSRTPSession; |
531 delete iSRTPSession; |
527 |
532 |
|
533 iStreamIn = NULL; |
|
534 iStreamOut = NULL; |
|
535 iSRTPSession = NULL; |
|
536 |
528 delete iRFC3711_SessionEncrKey128bits; |
537 delete iRFC3711_SessionEncrKey128bits; |
529 delete iRFC3711_SessionSaltKey128bits; |
538 delete iRFC3711_SessionSaltKey128bits; |
530 delete iRFC3711_SessionAuthKey128bits; |
539 delete iRFC3711_SessionAuthKey128bits; |
531 iRFC3711_TestMasterKey128bits.Zero(); |
540 |
|
541 iRFC3711_SessionEncrKey128bits = NULL; |
|
542 iRFC3711_SessionSaltKey128bits = NULL; |
|
543 iRFC3711_SessionAuthKey128bits = NULL; |
|
544 |
|
545 |
|
546 iRFC3711_TestMasterKey128bits.Zero(); |
532 iRFC3711_TestMasterSalt112bits.Zero(); |
547 iRFC3711_TestMasterSalt112bits.Zero(); |
533 iMKI.Zero(); |
548 iMKI.Zero(); |
534 |
549 |
535 |
550 |
536 } |
551 } |
645 iSession->iCommNet->iSender[ERTPPort]->iStatus = TRequestStatus(); |
660 iSession->iCommNet->iSender[ERTPPort]->iStatus = TRequestStatus(); |
646 User::WaitForRequest( status ); |
661 User::WaitForRequest( status ); |
647 RTP_EUNIT_ASSERT_EQUALS(status, KErrNone) |
662 RTP_EUNIT_ASSERT_EQUALS(status, KErrNone) |
648 } |
663 } |
649 |
664 |
650 void UT_CRtpSessionSrtp::UT_CRtpSessionSrtp_SendRtpPacket_1L( ) |
665 void UT_CRtpSessionSrtp::UT_CRtpSessionSrtp_SendRtpPacket_OneL( ) |
651 { |
666 { |
652 //Test more branch |
667 //Test more branch |
653 TInt error( KErrNone ); |
668 TInt error( KErrNone ); |
654 |
669 |
655 // Initialise lots of values |
670 // Initialise lots of values |
681 iSession->iCommNet->iSender[ERTPPort]->iStatus = TRequestStatus(); |
696 iSession->iCommNet->iSender[ERTPPort]->iStatus = TRequestStatus(); |
682 User::WaitForRequest( status ); |
697 User::WaitForRequest( status ); |
683 RTP_EUNIT_ASSERT_EQUALS(status, KErrNone) |
698 RTP_EUNIT_ASSERT_EQUALS(status, KErrNone) |
684 } |
699 } |
685 |
700 |
686 void UT_CRtpSessionSrtp::UT_CRtpSessionSrtp_SendRtpPacket_1AL( ) |
701 void UT_CRtpSessionSrtp::UT_CRtpSessionSrtp_SendRtpPacket_OneAL( ) |
687 { |
702 { |
688 TInt error( KErrNone ); |
703 TInt error( KErrNone ); |
689 |
704 |
690 // Initialise lots of values |
705 // Initialise lots of values |
691 TRtpSendHeader header; |
706 TRtpSendHeader header; |
755 error = iSession->SendRtpPacket( iTranstreamId, header, data); |
770 error = iSession->SendRtpPacket( iTranstreamId, header, data); |
756 RTP_EUNIT_ASSERT_EQUALS(error, KErrNone); |
771 RTP_EUNIT_ASSERT_EQUALS(error, KErrNone); |
757 |
772 |
758 } |
773 } |
759 |
774 |
760 void UT_CRtpSessionSrtp::UT_CRtpSessionSrtp_SendRtpPacket_2AL( ) |
775 void UT_CRtpSessionSrtp::UT_CRtpSessionSrtp_SendRtpPacket_TwoAL( ) |
761 { |
776 { |
762 TInt error( KErrNone ); |
777 TInt error( KErrNone ); |
763 |
778 |
764 // Initialise lots of values |
779 // Initialise lots of values |
765 TRtpSendHeader header; |
780 TRtpSendHeader header; |
869 CleanupStack::PopAndDestroy( packet ); |
884 CleanupStack::PopAndDestroy( packet ); |
870 CleanupStack::PopAndDestroy( streamOut ); |
885 CleanupStack::PopAndDestroy( streamOut ); |
871 |
886 |
872 } |
887 } |
873 |
888 |
874 void UT_CRtpSessionSrtp::UT_CRtpSessionSrtp_OnRtpReceived_1L( ) |
889 void UT_CRtpSessionSrtp::UT_CRtpSessionSrtp_OnRtpReceived_OneL( ) |
875 { |
890 { |
876 |
891 |
877 //cover more branch |
892 //cover more branch |
878 TRtpSSRC ssrcOut( 5678 ); |
893 TRtpSSRC ssrcOut( 5678 ); |
879 |
894 |
920 CleanupStack::PopAndDestroy( packet ); |
935 CleanupStack::PopAndDestroy( packet ); |
921 CleanupStack::PopAndDestroy( streamOut ); |
936 CleanupStack::PopAndDestroy( streamOut ); |
922 |
937 |
923 } |
938 } |
924 |
939 |
925 void UT_CRtpSessionSrtp::UT_CRtpSessionSrtp_SendSRTCPReport() |
940 void UT_CRtpSessionSrtp::UT_CRtpSessionSrtp_SendSRTCPReportL() |
926 { |
941 { |
927 TInt error( KErrNone ); |
942 TInt error( KErrNone ); |
928 TRtpSSRC ssrcOut( 1234 ); |
943 TRtpSSRC ssrcOut( 1234 ); |
929 TBuf8<5> data; |
944 TBuf8<5> data; |
930 data.Format( _L8( "foo" ) ); |
945 data.Format( _L8( "foo" ) ); |
988 CleanupStack::PopAndDestroy( packet ); |
1003 CleanupStack::PopAndDestroy( packet ); |
989 CleanupStack::PopAndDestroy( streamOut ); |
1004 CleanupStack::PopAndDestroy( streamOut ); |
990 |
1005 |
991 } |
1006 } |
992 |
1007 |
993 void UT_CRtpSessionSrtp::UT_CRtpSessionSrtp_OnRtcpReceived() |
1008 void UT_CRtpSessionSrtp::UT_CRtpSessionSrtp_OnRtcpReceivedL() |
994 { |
1009 { |
995 HBufC8* encSrtcpPacket =HBufC8::NewLC(KRTCPPacket().Length()); |
1010 HBufC8* encSrtcpPacket =HBufC8::NewLC(KRTCPPacket().Length()); |
996 *encSrtcpPacket=KRTCPPacket; |
1011 *encSrtcpPacket=KRTCPPacket; |
997 Hex(*encSrtcpPacket); |
1012 Hex(*encSrtcpPacket); |
998 TInt len= KRTCPPacket().Length(); |
1013 TInt len= KRTCPPacket().Length(); |
1102 EUNIT_TEST( |
1117 EUNIT_TEST( |
1103 "SendRtpPacket3 - test ", |
1118 "SendRtpPacket3 - test ", |
1104 "CRtpSessionSrtp", |
1119 "CRtpSessionSrtp", |
1105 "SendRtpPacket", |
1120 "SendRtpPacket", |
1106 "FUNCTIONALITY", |
1121 "FUNCTIONALITY", |
1107 SetupL, UT_CRtpSessionSrtp_SendRtpPacket_1L, Teardown) |
1122 SetupL, UT_CRtpSessionSrtp_SendRtpPacket_OneL, Teardown) |
1108 |
1123 |
1109 EUNIT_TEST( |
1124 EUNIT_TEST( |
1110 "SendRtpPacket4 - test ", |
1125 "SendRtpPacket4 - test ", |
1111 "CRtpSessionSrtp", |
1126 "CRtpSessionSrtp", |
1112 "SendRtpPacket", |
1127 "SendRtpPacket", |
1113 "FUNCTIONALITY", |
1128 "FUNCTIONALITY", |
1114 SetupL, UT_CRtpSessionSrtp_SendRtpPacket_1AL, Teardown) |
1129 SetupL, UT_CRtpSessionSrtp_SendRtpPacket_OneAL, Teardown) |
1115 |
1130 |
1116 EUNIT_TEST( |
1131 EUNIT_TEST( |
1117 "SendRtpPacket5 - test ", |
1132 "SendRtpPacket5 - test ", |
1118 "CRtpSessionSrtp", |
1133 "CRtpSessionSrtp", |
1119 "SendRtpPacket", |
1134 "SendRtpPacket", |
1123 EUNIT_TEST( |
1138 EUNIT_TEST( |
1124 "SendRtpPacket6 - test ", |
1139 "SendRtpPacket6 - test ", |
1125 "CRtpSessionSrtp", |
1140 "CRtpSessionSrtp", |
1126 "SendRtpPacket", |
1141 "SendRtpPacket", |
1127 "FUNCTIONALITY", |
1142 "FUNCTIONALITY", |
1128 SetupL, UT_CRtpSessionSrtp_SendRtpPacket_2AL, Teardown) |
1143 SetupL, UT_CRtpSessionSrtp_SendRtpPacket_TwoAL, Teardown) |
1129 |
1144 |
1130 EUNIT_TEST( |
1145 EUNIT_TEST( |
1131 "OnRtpReceived1 - test ", |
1146 "OnRtpReceived1 - test ", |
1132 "CRtpSessionSrtp", |
1147 "CRtpSessionSrtp", |
1133 "OnRtpReceived", |
1148 "OnRtpReceived", |
1137 EUNIT_TEST( |
1152 EUNIT_TEST( |
1138 "OnRtpReceived2 - test ", |
1153 "OnRtpReceived2 - test ", |
1139 "CRtpSessionSrtp", |
1154 "CRtpSessionSrtp", |
1140 "OnRtpReceived", |
1155 "OnRtpReceived", |
1141 "FUNCTIONALITY", |
1156 "FUNCTIONALITY", |
1142 SetupL, UT_CRtpSessionSrtp_OnRtpReceived_1L, Teardown) |
1157 SetupL, UT_CRtpSessionSrtp_OnRtpReceived_OneL, Teardown) |
1143 |
1158 |
1144 EUNIT_TEST( |
1159 EUNIT_TEST( |
1145 "SendSRTCPReport ", |
1160 "SendSRTCPReport ", |
1146 "CRtpSessionSrtp", |
1161 "CRtpSessionSrtp", |
1147 "SendSRTCPReport", |
1162 "SendSRTCPReport", |
1148 "FUNCTIONALITY", |
1163 "FUNCTIONALITY", |
1149 SetupL, UT_CRtpSessionSrtp_SendSRTCPReport, Teardown) |
1164 SetupL, UT_CRtpSessionSrtp_SendSRTCPReportL, Teardown) |
1150 EUNIT_TEST( |
1165 EUNIT_TEST( |
1151 "OnRtcpReceived ", |
1166 "OnRtcpReceived ", |
1152 "CRtpSessionSrtp", |
1167 "CRtpSessionSrtp", |
1153 "OnRtcpReceived", |
1168 "OnRtcpReceived", |
1154 "FUNCTIONALITY", |
1169 "FUNCTIONALITY", |
1155 SetupL, UT_CRtpSessionSrtp_OnRtcpReceived, Teardown) |
1170 SetupL, UT_CRtpSessionSrtp_OnRtcpReceivedL, Teardown) |
1156 |
1171 |
1157 |
1172 |
1158 EUNIT_END_TEST_TABLE |
1173 EUNIT_END_TEST_TABLE |
1159 |
1174 |
1160 // END OF FILE |
1175 // END OF FILE |