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

Side by Side Diff: webrtc/common_video/i420_video_frame_unittest.cc

Issue 2541863002: Delete VideoFrame default constructor, and IsZeroSize method. (Closed)
Patch Set: Initialize pixel data in VideoBroadcasterTest.OnFrame test. Created 4 years 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 unified diff | Download patch
« no previous file with comments | « no previous file | webrtc/common_video/libyuv/webrtc_libyuv.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 EXPECT_EQ(colors[i].y, rotated.DataY()[x + y * rotated.StrideY()]); 104 EXPECT_EQ(colors[i].y, rotated.DataY()[x + y * rotated.StrideY()]);
105 EXPECT_EQ(colors[i].u, 105 EXPECT_EQ(colors[i].u,
106 rotated.DataU()[(x / 2) + (y / 2) * rotated.StrideU()]); 106 rotated.DataU()[(x / 2) + (y / 2) * rotated.StrideU()]);
107 EXPECT_EQ(colors[i].v, 107 EXPECT_EQ(colors[i].v,
108 rotated.DataV()[(x / 2) + (y / 2) * rotated.StrideV()]); 108 rotated.DataV()[(x / 2) + (y / 2) * rotated.StrideV()]);
109 } 109 }
110 } 110 }
111 111
112 } // namespace 112 } // namespace
113 113
114 TEST(TestVideoFrame, InitialValues) {
115 VideoFrame frame;
116 EXPECT_TRUE(frame.IsZeroSize());
117 EXPECT_EQ(kVideoRotation_0, frame.rotation());
118 }
119
120 TEST(TestVideoFrame, WidthHeightValues) { 114 TEST(TestVideoFrame, WidthHeightValues) {
121 VideoFrame frame(I420Buffer::Create(10, 10, 10, 14, 90), 115 VideoFrame frame(I420Buffer::Create(10, 10, 10, 14, 90),
122 webrtc::kVideoRotation_0, 116 webrtc::kVideoRotation_0,
123 789 * rtc::kNumMicrosecsPerMillisec); 117 789 * rtc::kNumMicrosecsPerMillisec);
124 const int valid_value = 10; 118 const int valid_value = 10;
125 EXPECT_EQ(valid_value, frame.width()); 119 EXPECT_EQ(valid_value, frame.width());
126 EXPECT_EQ(valid_value, frame.height()); 120 EXPECT_EQ(valid_value, frame.height());
127 frame.set_timestamp(123u); 121 frame.set_timestamp(123u);
128 EXPECT_EQ(123u, frame.timestamp()); 122 EXPECT_EQ(123u, frame.timestamp());
129 frame.set_ntp_time_ms(456); 123 frame.set_ntp_time_ms(456);
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 CheckRotate(640, 480, GetParam(), *rotated_buffer); 284 CheckRotate(640, 480, GetParam(), *rotated_buffer);
291 } 285 }
292 286
293 INSTANTIATE_TEST_CASE_P(Rotate, TestI420BufferRotate, 287 INSTANTIATE_TEST_CASE_P(Rotate, TestI420BufferRotate,
294 ::testing::Values(kVideoRotation_0, 288 ::testing::Values(kVideoRotation_0,
295 kVideoRotation_90, 289 kVideoRotation_90,
296 kVideoRotation_180, 290 kVideoRotation_180,
297 kVideoRotation_270)); 291 kVideoRotation_270));
298 292
299 } // namespace webrtc 293 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | webrtc/common_video/libyuv/webrtc_libyuv.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698