| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "base/memory/ref_counted.h" | 5 #include "base/memory/ref_counted.h" |
| 6 #include "base/run_loop.h" | 6 #include "base/run_loop.h" |
| 7 #include "media/base/video_frame.h" | 7 #include "media/base/video_frame.h" |
| 8 #include "media/mojo/common/media_type_converters.h" | 8 #include "media/mojo/common/media_type_converters.h" |
| 9 #include "services/video_capture/public/cpp/capture_settings.h" | 9 #include "services/video_capture/public/cpp/capture_settings.h" |
| 10 #include "services/video_capture/public/interfaces/device_factory.mojom.h" | 10 #include "services/video_capture/public/interfaces/device_factory.mojom.h" |
| 11 #include "services/video_capture/test/fake_device_test.h" | 11 #include "services/video_capture/test/fake_device_test.h" |
| 12 #include "services/video_capture/test/mock_receiver.h" | 12 #include "services/video_capture/test/mock_receiver.h" |
| 13 #include "services/video_capture/test/service_test.h" | |
| 14 | 13 |
| 15 using testing::_; | 14 using testing::_; |
| 16 using testing::Invoke; | 15 using testing::Invoke; |
| 17 using testing::InvokeWithoutArgs; | 16 using testing::InvokeWithoutArgs; |
| 18 | 17 |
| 19 namespace { | 18 namespace { |
| 20 | 19 |
| 21 struct FrameInfo { | 20 struct FrameInfo { |
| 22 gfx::Size size; | 21 gfx::Size size; |
| 23 media::VideoPixelFormat pixel_format; | 22 media::VideoPixelFormat pixel_format; |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 EXPECT_TRUE(frame_info.is_mappable); | 96 EXPECT_TRUE(frame_info.is_mappable); |
| 98 EXPECT_EQ(requestable_settings_.format.frame_size, frame_info.size); | 97 EXPECT_EQ(requestable_settings_.format.frame_size, frame_info.size); |
| 99 // Timestamps are expected to increase | 98 // Timestamps are expected to increase |
| 100 if (i > 0) | 99 if (i > 0) |
| 101 EXPECT_GT(frame_info.timestamp, previous_timestamp); | 100 EXPECT_GT(frame_info.timestamp, previous_timestamp); |
| 102 previous_timestamp = frame_info.timestamp; | 101 previous_timestamp = frame_info.timestamp; |
| 103 } | 102 } |
| 104 } | 103 } |
| 105 | 104 |
| 106 } // namespace video_capture | 105 } // namespace video_capture |
| OLD | NEW |