| OLD | NEW |
| 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 18 matching lines...) Expand all Loading... |
| 29 using ::testing::Expectation; | 29 using ::testing::Expectation; |
| 30 using ::testing::Invoke; | 30 using ::testing::Invoke; |
| 31 using ::testing::InvokeWithoutArgs; | 31 using ::testing::InvokeWithoutArgs; |
| 32 using ::testing::SaveArg; | 32 using ::testing::SaveArg; |
| 33 using ::testing::WithArg; | 33 using ::testing::WithArg; |
| 34 | 34 |
| 35 namespace content { | 35 namespace content { |
| 36 | 36 |
| 37 namespace { | 37 namespace { |
| 38 | 38 |
| 39 MATCHER_P2(EqualsCaptureCapability, width, height, "") { | |
| 40 return arg.width == width && arg.height == height; | |
| 41 } | |
| 42 | |
| 43 const int kTestFrameWidth1 = 500; | 39 const int kTestFrameWidth1 = 500; |
| 44 const int kTestFrameHeight1 = 500; | 40 const int kTestFrameHeight1 = 500; |
| 45 const int kTestFrameWidth2 = 400; | 41 const int kTestFrameWidth2 = 400; |
| 46 const int kTestFrameHeight2 = 300; | 42 const int kTestFrameHeight2 = 300; |
| 47 | 43 |
| 48 const int kFrameRate = 30; | 44 const int kFrameRate = 30; |
| 49 | 45 |
| 50 // The value of the padding bytes in unpacked frames. | 46 // The value of the padding bytes in unpacked frames. |
| 51 const uint8_t kFramePaddingValue = 0; | 47 const uint8_t kFramePaddingValue = 0; |
| 52 | 48 |
| (...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 563 frame_size); | 559 frame_size); |
| 564 for (int i = 0; i < output_frame_->size().height(); ++i) { | 560 for (int i = 0; i < output_frame_->size().height(); ++i) { |
| 565 EXPECT_EQ(0, | 561 EXPECT_EQ(0, |
| 566 memcmp(inverted_frame->data() + i * inverted_frame->stride(), | 562 memcmp(inverted_frame->data() + i * inverted_frame->stride(), |
| 567 output_frame_->data() + i * output_frame_->stride(), | 563 output_frame_->data() + i * output_frame_->stride(), |
| 568 output_frame_->stride())); | 564 output_frame_->stride())); |
| 569 } | 565 } |
| 570 } | 566 } |
| 571 | 567 |
| 572 } // namespace content | 568 } // namespace content |
| OLD | NEW |