Index: talk/app/webrtc/videosource_unittest.cc |
diff --git a/talk/app/webrtc/videosource_unittest.cc b/talk/app/webrtc/videosource_unittest.cc |
index 2efcc1d84e9521d003ed0852653bd126536b364a..f7dfe975421efca071e728c11882e197aa3fdcf9 100644 |
--- a/talk/app/webrtc/videosource_unittest.cc |
+++ b/talk/app/webrtc/videosource_unittest.cc |
@@ -392,16 +392,13 @@ TEST_F(VideoSourceTest, SetValidOptionValues) { |
CreateVideoSource(&constraints); |
- bool value = true; |
- EXPECT_TRUE(source_->options()->video_noise_reduction.Get(&value)); |
- EXPECT_FALSE(value); |
+ EXPECT_EQ(rtc::Maybe<bool>(false), source_->options()->video_noise_reduction); |
} |
TEST_F(VideoSourceTest, OptionNotSet) { |
FakeConstraints constraints; |
CreateVideoSource(&constraints); |
- bool value; |
- EXPECT_FALSE(source_->options()->video_noise_reduction.Get(&value)); |
+ EXPECT_EQ(rtc::Maybe<bool>(), source_->options()->video_noise_reduction); |
} |
TEST_F(VideoSourceTest, MandatoryOptionOverridesOptional) { |
@@ -413,9 +410,7 @@ TEST_F(VideoSourceTest, MandatoryOptionOverridesOptional) { |
CreateVideoSource(&constraints); |
- bool value = false; |
- EXPECT_TRUE(source_->options()->video_noise_reduction.Get(&value)); |
- EXPECT_TRUE(value); |
+ EXPECT_EQ(rtc::Maybe<bool>(true), source_->options()->video_noise_reduction); |
} |
TEST_F(VideoSourceTest, InvalidOptionKeyOptional) { |
@@ -428,9 +423,7 @@ TEST_F(VideoSourceTest, InvalidOptionKeyOptional) { |
EXPECT_EQ_WAIT(MediaSourceInterface::kLive, state_observer_->state(), |
kMaxWaitMs); |
- bool value = true; |
- EXPECT_TRUE(source_->options()->video_noise_reduction.Get(&value)); |
- EXPECT_FALSE(value); |
+ EXPECT_EQ(rtc::Maybe<bool>(false), source_->options()->video_noise_reduction); |
} |
TEST_F(VideoSourceTest, InvalidOptionKeyMandatory) { |
@@ -443,8 +436,7 @@ TEST_F(VideoSourceTest, InvalidOptionKeyMandatory) { |
EXPECT_EQ_WAIT(MediaSourceInterface::kEnded, state_observer_->state(), |
kMaxWaitMs); |
- bool value; |
- EXPECT_FALSE(source_->options()->video_noise_reduction.Get(&value)); |
+ EXPECT_EQ(rtc::Maybe<bool>(), source_->options()->video_noise_reduction); |
} |
TEST_F(VideoSourceTest, InvalidOptionValueOptional) { |
@@ -456,8 +448,7 @@ TEST_F(VideoSourceTest, InvalidOptionValueOptional) { |
EXPECT_EQ_WAIT(MediaSourceInterface::kLive, state_observer_->state(), |
kMaxWaitMs); |
- bool value = false; |
- EXPECT_FALSE(source_->options()->video_noise_reduction.Get(&value)); |
+ EXPECT_EQ(rtc::Maybe<bool>(), source_->options()->video_noise_reduction); |
} |
TEST_F(VideoSourceTest, InvalidOptionValueMandatory) { |
@@ -473,8 +464,7 @@ TEST_F(VideoSourceTest, InvalidOptionValueMandatory) { |
EXPECT_EQ_WAIT(MediaSourceInterface::kEnded, state_observer_->state(), |
kMaxWaitMs); |
- bool value; |
- EXPECT_FALSE(source_->options()->video_noise_reduction.Get(&value)); |
+ EXPECT_EQ(rtc::Maybe<bool>(), source_->options()->video_noise_reduction); |
} |
TEST_F(VideoSourceTest, MixedOptionsAndConstraints) { |
@@ -497,9 +487,7 @@ TEST_F(VideoSourceTest, MixedOptionsAndConstraints) { |
EXPECT_EQ(288, format->height); |
EXPECT_EQ(30, format->framerate()); |
- bool value = true; |
- EXPECT_TRUE(source_->options()->video_noise_reduction.Get(&value)); |
- EXPECT_FALSE(value); |
+ EXPECT_EQ(rtc::Maybe<bool>(false), source_->options()->video_noise_reduction); |
} |
// Tests that the source starts video with the default resolution for |