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

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

Issue 1439533004: Remove dead code paths around PIXEL_STORAGE_TEXTURE in capture pipeline. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mcasas's second round comments REBASE Created 5 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
« no previous file with comments | « content/renderer/media/video_capture_message_filter.cc ('k') | media/base/video_capture_types.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 c36f3d371abaf787124a06235a19fb150bd07d1c..a3d4e9032185bea52bf0bcfe072e9d6c05626ff2 100644
--- a/content/renderer/media/video_capture_message_filter_unittest.cc
+++ b/content/renderer/media/video_capture_message_filter_unittest.cc
@@ -38,15 +38,14 @@ class MockVideoCaptureDelegate : public VideoCaptureMessageFilter::Delegate {
const gfx::Size& size,
int buffer_id));
MOCK_METHOD1(OnBufferDestroyed, void(int buffer_id));
- MOCK_METHOD8(OnBufferReceived,
+ MOCK_METHOD7(OnBufferReceived,
void(int buffer_id,
base::TimeTicks timestamp,
const base::DictionaryValue& metadata,
media::VideoPixelFormat pixel_format,
media::VideoFrame::StorageType storage_type,
const gfx::Size& coded_size,
- const gfx::Rect& visible_rect,
- const gpu::MailboxHolder& mailbox_holder));
+ const gfx::Rect& visible_rect));
MOCK_METHOD1(OnStateChanged, void(VideoCaptureState state));
MOCK_METHOD1(OnDeviceSupportedFormatsEnumerated,
void(const media::VideoCaptureFormats& formats));
@@ -122,40 +121,15 @@ TEST(VideoCaptureMessageFilterTest, Basic) {
OnBufferReceived(params.buffer_id, params.timestamp, _,
media::PIXEL_FORMAT_I420,
media::VideoFrame::STORAGE_SHMEM,
- params.coded_size, params.visible_rect, _))
+ params.coded_size, params.visible_rect))
.WillRepeatedly(WithArg<2>(Invoke(&ExpectMetadataContainsFooBarBaz)));
filter->OnMessageReceived(VideoCaptureMsg_BufferReady(params));
Mock::VerifyAndClearExpectations(&delegate);
- // VideoCaptureMsg_BufferReady_Params with a Texture
- VideoCaptureMsg_BufferReady_Params params_m;
- params_m.device_id = delegate.device_id();
- params_m.buffer_id = 33;
- params_m.timestamp = base::TimeTicks::FromInternalValue(2);
- params_m.metadata.SetString("bar", "baz");
- params_m.pixel_format = media::PIXEL_FORMAT_ARGB;
- params_m.storage_type = media::VideoFrame::STORAGE_OPAQUE;
- params_m.coded_size = gfx::Size(345, 256);
- params_m.mailbox_holder =
- gpu::MailboxHolder(gpu::Mailbox::Generate(), gpu::SyncToken(), 44);
-
- gpu::MailboxHolder received_mailbox_holder;
- EXPECT_CALL(delegate, OnBufferReceived(params_m.buffer_id, params_m.timestamp,
- _, media::PIXEL_FORMAT_ARGB,
- media::VideoFrame::STORAGE_OPAQUE,
- params_m.coded_size, _, _))
- .WillRepeatedly(
- DoAll(SaveArg<7>(&received_mailbox_holder),
- WithArg<2>(Invoke(&ExpectMetadataContainsFooBarBaz))));
- filter->OnMessageReceived(VideoCaptureMsg_BufferReady(params_m));
- Mock::VerifyAndClearExpectations(&delegate);
- EXPECT_EQ(params_m.mailbox_holder.mailbox,
- received_mailbox_holder.mailbox);
-
// VideoCaptureMsg_FreeBuffer
- EXPECT_CALL(delegate, OnBufferDestroyed(params_m.buffer_id));
+ EXPECT_CALL(delegate, OnBufferDestroyed(params.buffer_id));
filter->OnMessageReceived(VideoCaptureMsg_FreeBuffer(
- delegate.device_id(), params_m.buffer_id));
+ delegate.device_id(), params.buffer_id));
Mock::VerifyAndClearExpectations(&delegate);
}
« no previous file with comments | « content/renderer/media/video_capture_message_filter.cc ('k') | media/base/video_capture_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698