| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/renderer/media/video_track_recorder.h" | 5 #include "content/renderer/media/video_track_recorder.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 | 10 |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 kVEAEncoderMinResolutionHeight / 2), | 54 kVEAEncoderMinResolutionHeight / 2), |
| 55 gfx::Size(kVEAEncoderMinResolutionWidth, kVEAEncoderMinResolutionHeight)}; | 55 gfx::Size(kVEAEncoderMinResolutionWidth, kVEAEncoderMinResolutionHeight)}; |
| 56 static const int kTrackRecorderTestSizeDiff = 20; | 56 static const int kTrackRecorderTestSizeDiff = 20; |
| 57 | 57 |
| 58 class VideoTrackRecorderTest | 58 class VideoTrackRecorderTest |
| 59 : public TestWithParam< | 59 : public TestWithParam< |
| 60 testing::tuple<VideoTrackRecorder::CodecId, gfx::Size>> { | 60 testing::tuple<VideoTrackRecorder::CodecId, gfx::Size>> { |
| 61 public: | 61 public: |
| 62 VideoTrackRecorderTest() | 62 VideoTrackRecorderTest() |
| 63 : mock_source_(new MockMediaStreamVideoSource(false)) { | 63 : mock_source_(new MockMediaStreamVideoSource(false)) { |
| 64 const blink::WebString webkit_track_id(base::UTF8ToUTF16("dummy")); | 64 const blink::WebString webkit_track_id( |
| 65 blink::WebString::fromASCII("dummy")); |
| 65 blink_source_.initialize(webkit_track_id, | 66 blink_source_.initialize(webkit_track_id, |
| 66 blink::WebMediaStreamSource::TypeVideo, | 67 blink::WebMediaStreamSource::TypeVideo, |
| 67 webkit_track_id); | 68 webkit_track_id); |
| 68 blink_source_.setExtraData(mock_source_); | 69 blink_source_.setExtraData(mock_source_); |
| 69 blink_track_.initialize(blink_source_); | 70 blink_track_.initialize(blink_source_); |
| 70 | 71 |
| 71 blink::WebMediaConstraints constraints; | 72 blink::WebMediaConstraints constraints; |
| 72 constraints.initialize(); | 73 constraints.initialize(); |
| 73 track_ = new MediaStreamVideoTrack(mock_source_, constraints, | 74 track_ = new MediaStreamVideoTrack(mock_source_, constraints, |
| 74 MediaStreamSource::ConstraintsCallback(), | 75 MediaStreamSource::ConstraintsCallback(), |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 | 187 |
| 187 Mock::VerifyAndClearExpectations(this); | 188 Mock::VerifyAndClearExpectations(this); |
| 188 } | 189 } |
| 189 | 190 |
| 190 INSTANTIATE_TEST_CASE_P(, | 191 INSTANTIATE_TEST_CASE_P(, |
| 191 VideoTrackRecorderTest, | 192 VideoTrackRecorderTest, |
| 192 ::testing::Combine(ValuesIn(kTrackRecorderTestCodec), | 193 ::testing::Combine(ValuesIn(kTrackRecorderTestCodec), |
| 193 ValuesIn(kTrackRecorderTestSize))); | 194 ValuesIn(kTrackRecorderTestSize))); |
| 194 | 195 |
| 195 } // namespace content | 196 } // namespace content |
| OLD | NEW |