Validate references of frames inserted into FrameBuffer2.
BUG=chromium:730603 Review-Url: https://codereview.webrtc.org/2937243002 Cr-Commit-Position: refs/heads/master@{#18614}
This commit is contained in:
@ -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
|
||||
|
||||
Reference in New Issue
Block a user