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

Unified Diff: content/renderer/media/video_capture_message_filter_unittest.cc

Issue 83633008: Reland: Reorganize media::VideoCapture* types (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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
Index: content/renderer/media/video_capture_message_filter_unittest.cc
diff --git a/content/renderer/media/video_capture_message_filter_unittest.cc b/content/renderer/media/video_capture_message_filter_unittest.cc
index 069673fb818f5aeb75699cefd316904f05c1b999..366bcb03041653bb2d700b447e54443386965239 100644
--- a/content/renderer/media/video_capture_message_filter_unittest.cc
+++ b/content/renderer/media/video_capture_message_filter_unittest.cc
@@ -11,11 +11,10 @@
#include "testing/gtest/include/gtest/gtest.h"
using ::testing::_;
-using ::testing::AllOf;
using ::testing::AnyNumber;
-using ::testing::Field;
using ::testing::Mock;
using ::testing::Return;
+using ::testing::SaveArg;
using ::testing::StrictMock;
namespace content {
@@ -82,15 +81,17 @@ TEST(VideoCaptureMessageFilterTest, Basic) {
int buffer_id = 22;
base::Time timestamp = base::Time::FromInternalValue(1);
- media::VideoCaptureFormat format(234, 512, 30,
- media::ConstantResolutionVideoCaptureDevice);
- EXPECT_CALL(delegate, OnBufferReceived(buffer_id, timestamp,
- AllOf(Field(&media::VideoCaptureFormat::width, 234),
- Field(&media::VideoCaptureFormat::height, 512),
- Field(&media::VideoCaptureFormat::frame_rate, 30))));
+ media::VideoCaptureFormat format(
+ gfx::Size(234, 512), 30, media::PIXEL_FORMAT_I420);
+ media::VideoCaptureFormat saved_format;
+ EXPECT_CALL(delegate, OnBufferReceived(buffer_id, timestamp, _))
+ .WillRepeatedly(SaveArg<2>(&saved_format));
filter->OnMessageReceived(VideoCaptureMsg_BufferReady(
delegate.device_id(), buffer_id, timestamp, format));
Mock::VerifyAndClearExpectations(&delegate);
+ EXPECT_EQ(234, saved_format.frame_size.width());
+ EXPECT_EQ(512, saved_format.frame_size.height());
+ EXPECT_EQ(30, saved_format.frame_rate);
// VideoCaptureMsg_FreeBuffer
EXPECT_CALL(delegate, OnBufferDestroyed(buffer_id));
« no previous file with comments | « content/renderer/media/video_capture_impl_unittest.cc ('k') | content/renderer/pepper/pepper_video_capture_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698