Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(870)

Unified Diff: webrtc/video/payload_router_unittest.cc

Issue 2405173006: Remove deprected functions from EncodedImageCallback and RtpRtcp (Closed)
Patch Set: fix android Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/test/fake_encoder.cc ('k') | webrtc/video/video_send_stream_tests.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video/payload_router_unittest.cc
diff --git a/webrtc/video/payload_router_unittest.cc b/webrtc/video/payload_router_unittest.cc
index 5b87554a54574298c1d0a844ed21bdc1771764af..fa5c35d6dbab09b0ed5d4187cfd9f4f42b45c138 100644
--- a/webrtc/video/payload_router_unittest.cc
+++ b/webrtc/video/payload_router_unittest.cc
@@ -45,7 +45,9 @@ TEST(PayloadRouterTest, SendOnOneModule) {
encoded_image.capture_time_ms_, &payload,
encoded_image._length, nullptr, _, _))
.Times(0);
- EXPECT_EQ(-1, payload_router.Encoded(encoded_image, nullptr, nullptr));
+ EXPECT_NE(
+ EncodedImageCallback::Result::OK,
+ payload_router.OnEncodedImage(encoded_image, nullptr, nullptr).error);
payload_router.set_active(true);
EXPECT_CALL(rtp, SendOutgoingData(encoded_image._frameType, payload_type,
@@ -53,7 +55,9 @@ TEST(PayloadRouterTest, SendOnOneModule) {
encoded_image.capture_time_ms_, &payload,
encoded_image._length, nullptr, _, _))
.Times(1);
- EXPECT_EQ(0, payload_router.Encoded(encoded_image, nullptr, nullptr));
+ EXPECT_EQ(
+ EncodedImageCallback::Result::OK,
+ payload_router.OnEncodedImage(encoded_image, nullptr, nullptr).error);
payload_router.set_active(false);
EXPECT_CALL(rtp, SendOutgoingData(encoded_image._frameType, payload_type,
@@ -61,7 +65,9 @@ TEST(PayloadRouterTest, SendOnOneModule) {
encoded_image.capture_time_ms_, &payload,
encoded_image._length, nullptr, _, _))
.Times(0);
- EXPECT_EQ(-1, payload_router.Encoded(encoded_image, nullptr, nullptr));
+ EXPECT_NE(
+ EncodedImageCallback::Result::OK,
+ payload_router.OnEncodedImage(encoded_image, nullptr, nullptr).error);
payload_router.set_active(true);
EXPECT_CALL(rtp, SendOutgoingData(encoded_image._frameType, payload_type,
@@ -69,7 +75,9 @@ TEST(PayloadRouterTest, SendOnOneModule) {
encoded_image.capture_time_ms_, &payload,
encoded_image._length, nullptr, _, _))
.Times(1);
- EXPECT_EQ(0, payload_router.Encoded(encoded_image, nullptr, nullptr));
+ EXPECT_EQ(
+ EncodedImageCallback::Result::OK,
+ payload_router.OnEncodedImage(encoded_image, nullptr, nullptr).error);
}
TEST(PayloadRouterTest, SendSimulcast) {
@@ -103,7 +111,9 @@ TEST(PayloadRouterTest, SendSimulcast) {
encoded_image._length, nullptr, _, _))
.Times(1);
EXPECT_CALL(rtp_2, SendOutgoingData(_, _, _, _, _, _, _, _, _)).Times(0);
- EXPECT_EQ(0, payload_router.Encoded(encoded_image, &codec_info_1, nullptr));
+ EXPECT_EQ(EncodedImageCallback::Result::OK,
+ payload_router.OnEncodedImage(encoded_image, &codec_info_1, nullptr)
+ .error);
CodecSpecificInfo codec_info_2;
memset(&codec_info_2, 0, sizeof(CodecSpecificInfo));
@@ -117,7 +127,9 @@ TEST(PayloadRouterTest, SendSimulcast) {
.Times(1);
EXPECT_CALL(rtp_1, SendOutgoingData(_, _, _, _, _, _, _, _, _))
.Times(0);
- EXPECT_EQ(0, payload_router.Encoded(encoded_image, &codec_info_2, nullptr));
+ EXPECT_EQ(EncodedImageCallback::Result::OK,
+ payload_router.OnEncodedImage(encoded_image, &codec_info_2, nullptr)
+ .error);
// Inactive.
payload_router.set_active(false);
@@ -125,8 +137,12 @@ TEST(PayloadRouterTest, SendSimulcast) {
.Times(0);
EXPECT_CALL(rtp_2, SendOutgoingData(_, _, _, _, _, _, _, _, _))
.Times(0);
- EXPECT_EQ(-1, payload_router.Encoded(encoded_image, &codec_info_1, nullptr));
- EXPECT_EQ(-1, payload_router.Encoded(encoded_image, &codec_info_2, nullptr));
+ EXPECT_NE(EncodedImageCallback::Result::OK,
+ payload_router.OnEncodedImage(encoded_image, &codec_info_1, nullptr)
+ .error);
+ EXPECT_NE(EncodedImageCallback::Result::OK,
+ payload_router.OnEncodedImage(encoded_image, &codec_info_2, nullptr)
+ .error);
}
TEST(PayloadRouterTest, MaxPayloadLength) {
« no previous file with comments | « webrtc/test/fake_encoder.cc ('k') | webrtc/video/video_send_stream_tests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698