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

Unified Diff: webrtc/modules/video_coding/frame_buffer2_unittest.cc

Issue 2937243002: Validate references of frames inserted into FrameBuffer2. (Closed)
Patch Set: . Created 3 years, 6 months 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
Index: webrtc/modules/video_coding/frame_buffer2_unittest.cc
diff --git a/webrtc/modules/video_coding/frame_buffer2_unittest.cc b/webrtc/modules/video_coding/frame_buffer2_unittest.cc
index 488b7853350b7b2505369a420fadf0466bf677b5..58b3f7a42b51d91536d9e00291bc701ec73c5a7c 100644
--- a/webrtc/modules/video_coding/frame_buffer2_unittest.cc
+++ b/webrtc/modules/video_coding/frame_buffer2_unittest.cc
@@ -531,5 +531,13 @@ TEST_F(TestFrameBuffer2, DuplicateFrames) {
EXPECT_EQ(22256, InsertFrame(22256, 0, 1, false));
}
+// TODO(philipel): implement more unittests related to invalid references.
+TEST_F(TestFrameBuffer2, InvalidReferences) {
+ EXPECT_EQ(-1, InsertFrame(0, 0, 1000, false, 2));
+ EXPECT_EQ(1, InsertFrame(1, 0, 2000, false));
+ ExtractFrame();
+ EXPECT_EQ(2, InsertFrame(2, 0, 3000, false, 1));
+}
+
} // namespace video_coding
} // namespace webrtc

Powered by Google App Engine
This is Rietveld 408576698