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

Unified Diff: webrtc/video/payload_router_unittest.cc

Issue 2512543002: Fix PayloadRouter::OnEncodedImage() to handle errors properly. (Closed)
Patch Set: fix tests 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/video/payload_router.cc ('k') | no next file » | 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 fa5c35d6dbab09b0ed5d4187cfd9f4f42b45c138..adddefe00baa06138e6e7baf9439f43c785517b5 100644
--- a/webrtc/video/payload_router_unittest.cc
+++ b/webrtc/video/payload_router_unittest.cc
@@ -54,7 +54,8 @@ TEST(PayloadRouterTest, SendOnOneModule) {
encoded_image._timeStamp,
encoded_image.capture_time_ms_, &payload,
encoded_image._length, nullptr, _, _))
- .Times(1);
+ .Times(1)
+ .WillOnce(Return(true));
EXPECT_EQ(
EncodedImageCallback::Result::OK,
payload_router.OnEncodedImage(encoded_image, nullptr, nullptr).error);
@@ -74,7 +75,8 @@ TEST(PayloadRouterTest, SendOnOneModule) {
encoded_image._timeStamp,
encoded_image.capture_time_ms_, &payload,
encoded_image._length, nullptr, _, _))
- .Times(1);
+ .Times(1)
+ .WillOnce(Return(true));
EXPECT_EQ(
EncodedImageCallback::Result::OK,
payload_router.OnEncodedImage(encoded_image, nullptr, nullptr).error);
@@ -109,7 +111,8 @@ TEST(PayloadRouterTest, SendSimulcast) {
encoded_image._timeStamp,
encoded_image.capture_time_ms_, &payload,
encoded_image._length, nullptr, _, _))
- .Times(1);
+ .Times(1)
+ .WillOnce(Return(true));
EXPECT_CALL(rtp_2, SendOutgoingData(_, _, _, _, _, _, _, _, _)).Times(0);
EXPECT_EQ(EncodedImageCallback::Result::OK,
payload_router.OnEncodedImage(encoded_image, &codec_info_1, nullptr)
@@ -124,7 +127,8 @@ TEST(PayloadRouterTest, SendSimulcast) {
encoded_image._timeStamp,
encoded_image.capture_time_ms_, &payload,
encoded_image._length, nullptr, _, _))
- .Times(1);
+ .Times(1)
+ .WillOnce(Return(true));
EXPECT_CALL(rtp_1, SendOutgoingData(_, _, _, _, _, _, _, _, _))
.Times(0);
EXPECT_EQ(EncodedImageCallback::Result::OK,
« no previous file with comments | « webrtc/video/payload_router.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698