Index: webrtc/video/payload_router_unittest.cc |
diff --git a/webrtc/video/payload_router_unittest.cc b/webrtc/video/payload_router_unittest.cc |
index fa5c35d6dbab09b0ed5d4187cfd9f4f42b45c138..5b87554a54574298c1d0a844ed21bdc1771764af 100644 |
--- a/webrtc/video/payload_router_unittest.cc |
+++ b/webrtc/video/payload_router_unittest.cc |
@@ -45,9 +45,7 @@ TEST(PayloadRouterTest, SendOnOneModule) { |
encoded_image.capture_time_ms_, &payload, |
encoded_image._length, nullptr, _, _)) |
.Times(0); |
- EXPECT_NE( |
- EncodedImageCallback::Result::OK, |
- payload_router.OnEncodedImage(encoded_image, nullptr, nullptr).error); |
+ EXPECT_EQ(-1, payload_router.Encoded(encoded_image, nullptr, nullptr)); |
payload_router.set_active(true); |
EXPECT_CALL(rtp, SendOutgoingData(encoded_image._frameType, payload_type, |
@@ -55,9 +53,7 @@ TEST(PayloadRouterTest, SendOnOneModule) { |
encoded_image.capture_time_ms_, &payload, |
encoded_image._length, nullptr, _, _)) |
.Times(1); |
- EXPECT_EQ( |
- EncodedImageCallback::Result::OK, |
- payload_router.OnEncodedImage(encoded_image, nullptr, nullptr).error); |
+ EXPECT_EQ(0, payload_router.Encoded(encoded_image, nullptr, nullptr)); |
payload_router.set_active(false); |
EXPECT_CALL(rtp, SendOutgoingData(encoded_image._frameType, payload_type, |
@@ -65,9 +61,7 @@ TEST(PayloadRouterTest, SendOnOneModule) { |
encoded_image.capture_time_ms_, &payload, |
encoded_image._length, nullptr, _, _)) |
.Times(0); |
- EXPECT_NE( |
- EncodedImageCallback::Result::OK, |
- payload_router.OnEncodedImage(encoded_image, nullptr, nullptr).error); |
+ EXPECT_EQ(-1, payload_router.Encoded(encoded_image, nullptr, nullptr)); |
payload_router.set_active(true); |
EXPECT_CALL(rtp, SendOutgoingData(encoded_image._frameType, payload_type, |
@@ -75,9 +69,7 @@ TEST(PayloadRouterTest, SendOnOneModule) { |
encoded_image.capture_time_ms_, &payload, |
encoded_image._length, nullptr, _, _)) |
.Times(1); |
- EXPECT_EQ( |
- EncodedImageCallback::Result::OK, |
- payload_router.OnEncodedImage(encoded_image, nullptr, nullptr).error); |
+ EXPECT_EQ(0, payload_router.Encoded(encoded_image, nullptr, nullptr)); |
} |
TEST(PayloadRouterTest, SendSimulcast) { |
@@ -111,9 +103,7 @@ TEST(PayloadRouterTest, SendSimulcast) { |
encoded_image._length, nullptr, _, _)) |
.Times(1); |
EXPECT_CALL(rtp_2, SendOutgoingData(_, _, _, _, _, _, _, _, _)).Times(0); |
- EXPECT_EQ(EncodedImageCallback::Result::OK, |
- payload_router.OnEncodedImage(encoded_image, &codec_info_1, nullptr) |
- .error); |
+ EXPECT_EQ(0, payload_router.Encoded(encoded_image, &codec_info_1, nullptr)); |
CodecSpecificInfo codec_info_2; |
memset(&codec_info_2, 0, sizeof(CodecSpecificInfo)); |
@@ -127,9 +117,7 @@ TEST(PayloadRouterTest, SendSimulcast) { |
.Times(1); |
EXPECT_CALL(rtp_1, SendOutgoingData(_, _, _, _, _, _, _, _, _)) |
.Times(0); |
- EXPECT_EQ(EncodedImageCallback::Result::OK, |
- payload_router.OnEncodedImage(encoded_image, &codec_info_2, nullptr) |
- .error); |
+ EXPECT_EQ(0, payload_router.Encoded(encoded_image, &codec_info_2, nullptr)); |
// Inactive. |
payload_router.set_active(false); |
@@ -137,12 +125,8 @@ TEST(PayloadRouterTest, SendSimulcast) { |
.Times(0); |
EXPECT_CALL(rtp_2, SendOutgoingData(_, _, _, _, _, _, _, _, _)) |
.Times(0); |
- 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); |
+ EXPECT_EQ(-1, payload_router.Encoded(encoded_image, &codec_info_1, nullptr)); |
+ EXPECT_EQ(-1, payload_router.Encoded(encoded_image, &codec_info_2, nullptr)); |
} |
TEST(PayloadRouterTest, MaxPayloadLength) { |