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

Unified Diff: webrtc/common_video/i420_video_frame_unittest.cc

Issue 2517173004: Move VideoFrame and related declarations to webrtc/api/video. (Closed)
Patch Set: Make rotation check clearer. Created 3 years, 11 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
« no previous file with comments | « webrtc/common_video/BUILD.gn ('k') | webrtc/common_video/include/corevideo_frame_buffer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/common_video/i420_video_frame_unittest.cc
diff --git a/webrtc/common_video/i420_video_frame_unittest.cc b/webrtc/common_video/i420_video_frame_unittest.cc
index 49cc4654fb34f7299404408300dc1edce4f0ae6a..e03762eb39f5c1d386ef918e4407c495d1106c1e 100644
--- a/webrtc/common_video/i420_video_frame_unittest.cc
+++ b/webrtc/common_video/i420_video_frame_unittest.cc
@@ -11,11 +11,12 @@
#include <math.h>
#include <string.h>
+#include "webrtc/api/video/video_frame.h"
#include "webrtc/base/bind.h"
+#include "webrtc/base/timeutils.h"
#include "webrtc/test/fake_texture_frame.h"
#include "webrtc/test/frame_utils.h"
#include "webrtc/test/gtest.h"
-#include "webrtc/video_frame.h"
namespace webrtc {
@@ -280,7 +281,7 @@ class TestI420BufferRotate
TEST_P(TestI420BufferRotate, Rotates) {
rtc::scoped_refptr<VideoFrameBuffer> buffer = CreateGradient(640, 480);
rtc::scoped_refptr<VideoFrameBuffer> rotated_buffer =
- I420Buffer::Rotate(buffer, GetParam());
+ I420Buffer::Rotate(*buffer, GetParam());
CheckRotate(640, 480, GetParam(), *rotated_buffer);
}
@@ -290,4 +291,20 @@ INSTANTIATE_TEST_CASE_P(Rotate, TestI420BufferRotate,
kVideoRotation_180,
kVideoRotation_270));
+class TestI420BufferRotateOld
+ : public ::testing::TestWithParam<webrtc::VideoRotation> {};
+
+TEST_P(TestI420BufferRotateOld, Rotates) {
+ rtc::scoped_refptr<VideoFrameBuffer> buffer = CreateGradient(640, 480);
+ rtc::scoped_refptr<VideoFrameBuffer> rotated_buffer =
+ I420Buffer::Rotate(buffer, GetParam());
+ CheckRotate(640, 480, GetParam(), *rotated_buffer);
+}
+
+INSTANTIATE_TEST_CASE_P(Rotate, TestI420BufferRotateOld,
+ ::testing::Values(kVideoRotation_0,
+ kVideoRotation_90,
+ kVideoRotation_180,
+ kVideoRotation_270));
+
} // namespace webrtc
« no previous file with comments | « webrtc/common_video/BUILD.gn ('k') | webrtc/common_video/include/corevideo_frame_buffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698