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

Side by Side Diff: content/browser/media/capture/desktop_capture_device_unittest.cc

Issue 2214533002: move //media/capture to //device/capture (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/media/capture/desktop_capture_device.h" 5 #include "content/browser/media/capture/desktop_capture_device.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <string.h> 9 #include <string.h>
10 #include <algorithm> 10 #include <algorithm>
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 const uint8_t kFramePaddingValue = 0; 51 const uint8_t kFramePaddingValue = 0;
52 52
53 // Use a special value for frame pixels to tell pixel bytes apart from the 53 // Use a special value for frame pixels to tell pixel bytes apart from the
54 // padding bytes in the unpacked frame test. 54 // padding bytes in the unpacked frame test.
55 const uint8_t kFakePixelValue = 1; 55 const uint8_t kFakePixelValue = 1;
56 56
57 // Use a special value for the first pixel to verify the result in the inverted 57 // Use a special value for the first pixel to verify the result in the inverted
58 // frame test. 58 // frame test.
59 const uint8_t kFakePixelValueFirst = 2; 59 const uint8_t kFakePixelValueFirst = 2;
60 60
61 class MockDeviceClient : public media::VideoCaptureDevice::Client { 61 class MockDeviceClient : public device::VideoCaptureDevice::Client {
62 public: 62 public:
63 MOCK_METHOD6(OnIncomingCapturedData, 63 MOCK_METHOD6(OnIncomingCapturedData,
64 void(const uint8_t* data, 64 void(const uint8_t* data,
65 int length, 65 int length,
66 const media::VideoCaptureFormat& frame_format, 66 const media::VideoCaptureFormat& frame_format,
67 int rotation, 67 int rotation,
68 base::TimeTicks reference_time, 68 base::TimeTicks reference_time,
69 base::TimeDelta timestamp)); 69 base::TimeDelta timestamp));
70 MOCK_METHOD0(DoReserveOutputBuffer, void(void)); 70 MOCK_METHOD0(DoReserveOutputBuffer, void(void));
71 MOCK_METHOD0(DoOnIncomingCapturedBuffer, void(void)); 71 MOCK_METHOD0(DoOnIncomingCapturedBuffer, void(void));
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 frame_size); 550 frame_size);
551 for (int i = 0; i < output_frame_->size().height(); ++i) { 551 for (int i = 0; i < output_frame_->size().height(); ++i) {
552 EXPECT_EQ(0, 552 EXPECT_EQ(0,
553 memcmp(inverted_frame->data() + i * inverted_frame->stride(), 553 memcmp(inverted_frame->data() + i * inverted_frame->stride(),
554 output_frame_->data() + i * output_frame_->stride(), 554 output_frame_->data() + i * output_frame_->stride(),
555 output_frame_->stride())); 555 output_frame_->stride()));
556 } 556 }
557 } 557 }
558 558
559 } // namespace content 559 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698