summaryrefslogtreecommitdiffstats
path: root/content/renderer/media/video_capture_impl_unittest.cc
diff options
context:
space:
mode:
authormcasas <mcasas@chromium.org>2015-10-22 13:18:28 -0700
committerCommit bot <commit-bot@chromium.org>2015-10-22 20:19:26 +0000
commit89b86777fe6b6e2b9ef8089faf9d1378ce2db184 (patch)
treeb27013c0ddd3eaef14b96fc17d92f99262912ed1 /content/renderer/media/video_capture_impl_unittest.cc
parent6f3b439c2c2ac2baa7234f0da1be8bc7f4805233 (diff)
downloadchromium_src-89b86777fe6b6e2b9ef8089faf9d1378ce2db184.zip
chromium_src-89b86777fe6b6e2b9ef8089faf9d1378ce2db184.tar.gz
chromium_src-89b86777fe6b6e2b9ef8089faf9d1378ce2db184.tar.bz2
Reland: GpuMemoryBuffer interface change: Map(**) to Map() and memory(plane); stride(plane)
Relanding http://crrev.com/1401183003 which had a compile error. Original reviewers: TBR=avi@chromium.org, bajones@chromium.org, reveman@chromium.org, dalecurtis@chromium.org, fsamuel@chromium.org, miu@chromium.org Original CL description:----------------------------------- GpuMemoryBuffer interface change: Map(**) --> Map() + memory(plane); GetStride(*) --> stride(plane) And at the same time clean up/simplify/homogeneise uses of those APIs. buffer_format_util.cc:RowSizeForBufferFormatChecked() is only used in unittests and internally to the file, this CL restricts it to the .cc file. Also a function there is only used in test --> added ForTesting() suffix. BUG=542225 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Committed: https://crrev.com/a11ca23b4ae411b4dc6cd8ff755e366680e80776 Cr-Commit-Position: refs/heads/master@{#355396} Review URL: https://codereview.chromium.org/1412223009 Cr-Commit-Position: refs/heads/master@{#355630}
Diffstat (limited to 'content/renderer/media/video_capture_impl_unittest.cc')
-rw-r--r--content/renderer/media/video_capture_impl_unittest.cc9
1 files changed, 3 insertions, 6 deletions
diff --git a/content/renderer/media/video_capture_impl_unittest.cc b/content/renderer/media/video_capture_impl_unittest.cc
index 1e9b68f..282ebc4 100644
--- a/content/renderer/media/video_capture_impl_unittest.cc
+++ b/content/renderer/media/video_capture_impl_unittest.cc
@@ -52,15 +52,14 @@ static const BufferReceivedTestArg kBufferFormats[] = {
std::vector<gpu::MailboxHolder>(
1, gpu::MailboxHolder(gpu::Mailbox::Generate(), 0, 0)))};
-class VideoCaptureImplTest :
- public ::testing::TestWithParam<BufferReceivedTestArg> {
+class VideoCaptureImplTest
+ : public ::testing::TestWithParam<BufferReceivedTestArg> {
public:
class MockVideoCaptureImpl : public VideoCaptureImpl {
public:
MockVideoCaptureImpl(const media::VideoCaptureSessionId id,
VideoCaptureMessageFilter* filter)
- : VideoCaptureImpl(id, filter), received_buffer_count_(0) {
- }
+ : VideoCaptureImpl(id, filter), received_buffer_count_(0) {}
~MockVideoCaptureImpl() override {}
// Override Send() to mimic device to send events.
@@ -308,7 +307,6 @@ TEST_F(VideoCaptureImplTest, GetDeviceFormatsInUse) {
DeInit();
}
-// NEW TEST
TEST_P(VideoCaptureImplTest, BufferReceivedWithFormat) {
EXPECT_CALL(*this, OnStateUpdate(VIDEO_CAPTURE_STATE_STARTED)).Times(1);
EXPECT_CALL(*this, OnStateUpdate(VIDEO_CAPTURE_STATE_STOPPED)).Times(1);
@@ -340,7 +338,6 @@ INSTANTIATE_TEST_CASE_P(I420AndARGB,
VideoCaptureImplTest,
testing::ValuesIn(kBufferFormats));
-// NEW TEST
TEST_F(VideoCaptureImplTest, BufferReceivedAfterStop) {
EXPECT_CALL(*this, OnStateUpdate(VIDEO_CAPTURE_STATE_STARTED)).Times(1);
EXPECT_CALL(*this, OnStateUpdate(VIDEO_CAPTURE_STATE_STOPPED)).Times(1);