Chromium Code Reviews| Index: webrtc/api/videocapturertracksource_unittest.cc |
| diff --git a/webrtc/api/videocapturertracksource_unittest.cc b/webrtc/api/videocapturertracksource_unittest.cc |
| index 607188c0448b266ff15e623482637d3ffa0806e1..b65e84cf4aba6f74d9ec466c6edfb324ab3a7d4c 100644 |
| --- a/webrtc/api/videocapturertracksource_unittest.cc |
| +++ b/webrtc/api/videocapturertracksource_unittest.cc |
| @@ -444,6 +444,26 @@ TEST_F(VideoCapturerTrackSourceTest, ScreencastResolutionWithConstraint) { |
| EXPECT_EQ(30, format->framerate()); |
| } |
| +TEST_F(VideoCapturerTrackSourceTest, DenoisingDefault) { |
| + CreateVideoCapturerSource(); |
| + EXPECT_FALSE(source_->needs_denoising()); |
| +} |
| + |
| +TEST_F(VideoCapturerTrackSourceTest, DenoisingConstraintOn) { |
|
pbos-webrtc
2016/09/13 14:02:09
I would like a test for constraints overriding the
nisse-webrtc
2016/09/13 14:24:05
Done.
|
| + FakeConstraints constraints; |
| + constraints.AddOptional(MediaConstraintsInterface::kNoiseReduction, true); |
| + CreateVideoCapturerSource(&constraints); |
| + ASSERT_TRUE(source_->needs_denoising()); |
| + EXPECT_TRUE(*source_->needs_denoising()); |
| +} |
| + |
| +TEST_F(VideoCapturerTrackSourceTest, DenoisingCapturerOff) { |
| + capturer_->SetNeedsDenoising(false); |
| + CreateVideoCapturerSource(); |
| + ASSERT_TRUE(source_->needs_denoising()); |
| + EXPECT_FALSE(*source_->needs_denoising()); |
| +} |
| + |
| TEST_F(VideoCapturerTrackSourceTest, MandatorySubOneFpsConstraints) { |
| FakeConstraints constraints; |
| constraints.AddMandatory(MediaConstraintsInterface::kMaxFrameRate, 0.5); |