| Index: webrtc/pc/videocapturertracksource_unittest.cc
|
| diff --git a/webrtc/pc/videocapturertracksource_unittest.cc b/webrtc/pc/videocapturertracksource_unittest.cc
|
| index 144d4b4b794288989b23f8064887d536adc57b0d..90662d76d9e9dd752ab1e2268fad8a5a75ad2126 100644
|
| --- a/webrtc/pc/videocapturertracksource_unittest.cc
|
| +++ b/webrtc/pc/videocapturertracksource_unittest.cc
|
| @@ -116,7 +116,7 @@ class VideoCapturerTrackSourceTest : public testing::Test {
|
|
|
| void InitScreencast() { InitCapturer(true); }
|
|
|
| - void CreateVideoCapturerSource() { CreateVideoCapturerSource(NULL); }
|
| + void CreateVideoCapturerSource() { CreateVideoCapturerSource(nullptr); }
|
|
|
| void CreateVideoCapturerSource(
|
| const webrtc::MediaConstraintsInterface* constraints) {
|
| @@ -125,7 +125,7 @@ class VideoCapturerTrackSourceTest : public testing::Test {
|
| capturer_cleanup_.release(),
|
| constraints, false);
|
|
|
| - ASSERT_TRUE(source_.get() != NULL);
|
| + ASSERT_TRUE(source_.get() != nullptr);
|
|
|
| state_observer_.reset(new StateObserver(source_));
|
| source_->RegisterObserver(state_observer_.get());
|
| @@ -180,7 +180,7 @@ TEST_F(VideoCapturerTrackSourceTest, MandatoryConstraintCif5Fps) {
|
| EXPECT_EQ_WAIT(MediaSourceInterface::kLive, state_observer_->state(),
|
| kMaxWaitMs);
|
| const cricket::VideoFormat* format = capturer_->GetCaptureFormat();
|
| - ASSERT_TRUE(format != NULL);
|
| + ASSERT_TRUE(format != nullptr);
|
| EXPECT_EQ(352, format->width);
|
| EXPECT_EQ(288, format->height);
|
| EXPECT_EQ(5, format->framerate());
|
| @@ -200,7 +200,7 @@ TEST_F(VideoCapturerTrackSourceTest, MandatoryMinVgaOptional720P) {
|
| EXPECT_EQ_WAIT(MediaSourceInterface::kLive, state_observer_->state(),
|
| kMaxWaitMs);
|
| const cricket::VideoFormat* format = capturer_->GetCaptureFormat();
|
| - ASSERT_TRUE(format != NULL);
|
| + ASSERT_TRUE(format != nullptr);
|
| EXPECT_EQ(1280, format->width);
|
| EXPECT_EQ(720, format->height);
|
| EXPECT_EQ(30, format->framerate());
|
| @@ -221,7 +221,7 @@ TEST_F(VideoCapturerTrackSourceTest, MandatoryAspectRatio4To3) {
|
| EXPECT_EQ_WAIT(MediaSourceInterface::kLive, state_observer_->state(),
|
| kMaxWaitMs);
|
| const cricket::VideoFormat* format = capturer_->GetCaptureFormat();
|
| - ASSERT_TRUE(format != NULL);
|
| + ASSERT_TRUE(format != nullptr);
|
| EXPECT_EQ(640, format->width);
|
| EXPECT_EQ(480, format->height);
|
| EXPECT_EQ(30, format->framerate());
|
| @@ -246,7 +246,7 @@ TEST_F(VideoCapturerTrackSourceTest, OptionalAspectRatioTooHigh) {
|
| EXPECT_EQ_WAIT(MediaSourceInterface::kLive, state_observer_->state(),
|
| kMaxWaitMs);
|
| const cricket::VideoFormat* format = capturer_->GetCaptureFormat();
|
| - ASSERT_TRUE(format != NULL);
|
| + ASSERT_TRUE(format != nullptr);
|
| double aspect_ratio = static_cast<double>(format->width) / format->height;
|
| EXPECT_LT(aspect_ratio, 2);
|
| }
|
| @@ -260,7 +260,7 @@ TEST_F(VideoCapturerTrackSourceTest, NoCameraCapability) {
|
| EXPECT_EQ_WAIT(MediaSourceInterface::kLive, state_observer_->state(),
|
| kMaxWaitMs);
|
| const cricket::VideoFormat* format = capturer_->GetCaptureFormat();
|
| - ASSERT_TRUE(format != NULL);
|
| + ASSERT_TRUE(format != nullptr);
|
| EXPECT_EQ(640, format->width);
|
| EXPECT_EQ(480, format->height);
|
| EXPECT_EQ(30, format->framerate());
|
| @@ -397,7 +397,7 @@ TEST_F(VideoCapturerTrackSourceTest, MixedOptionsAndConstraints) {
|
| EXPECT_EQ_WAIT(MediaSourceInterface::kLive, state_observer_->state(),
|
| kMaxWaitMs);
|
| const cricket::VideoFormat* format = capturer_->GetCaptureFormat();
|
| - ASSERT_TRUE(format != NULL);
|
| + ASSERT_TRUE(format != nullptr);
|
| EXPECT_EQ(352, format->width);
|
| EXPECT_EQ(288, format->height);
|
| EXPECT_EQ(5, format->framerate());
|
| @@ -416,7 +416,7 @@ TEST_F(VideoCapturerTrackSourceTest, ScreencastResolutionNoConstraint) {
|
| EXPECT_EQ_WAIT(MediaSourceInterface::kLive, state_observer_->state(),
|
| kMaxWaitMs);
|
| const cricket::VideoFormat* format = capturer_->GetCaptureFormat();
|
| - ASSERT_TRUE(format != NULL);
|
| + ASSERT_TRUE(format != nullptr);
|
| EXPECT_EQ(640, format->width);
|
| EXPECT_EQ(480, format->height);
|
| EXPECT_EQ(30, format->framerate());
|
| @@ -437,7 +437,7 @@ TEST_F(VideoCapturerTrackSourceTest, ScreencastResolutionWithConstraint) {
|
| EXPECT_EQ_WAIT(MediaSourceInterface::kLive, state_observer_->state(),
|
| kMaxWaitMs);
|
| const cricket::VideoFormat* format = capturer_->GetCaptureFormat();
|
| - ASSERT_TRUE(format != NULL);
|
| + ASSERT_TRUE(format != nullptr);
|
| EXPECT_EQ(480, format->width);
|
| EXPECT_EQ(270, format->height);
|
| EXPECT_EQ(30, format->framerate());
|
| @@ -450,7 +450,7 @@ TEST_F(VideoCapturerTrackSourceTest, MandatorySubOneFpsConstraints) {
|
| CreateVideoCapturerSource(&constraints);
|
| EXPECT_EQ_WAIT(MediaSourceInterface::kEnded, state_observer_->state(),
|
| kMaxWaitMs);
|
| - ASSERT_TRUE(capturer_->GetCaptureFormat() == NULL);
|
| + ASSERT_TRUE(capturer_->GetCaptureFormat() == nullptr);
|
| }
|
|
|
| TEST_F(VideoCapturerTrackSourceTest, OptionalSubOneFpsConstraints) {
|
| @@ -461,6 +461,6 @@ TEST_F(VideoCapturerTrackSourceTest, OptionalSubOneFpsConstraints) {
|
| EXPECT_EQ_WAIT(MediaSourceInterface::kLive, state_observer_->state(),
|
| kMaxWaitMs);
|
| const cricket::VideoFormat* format = capturer_->GetCaptureFormat();
|
| - ASSERT_TRUE(format != NULL);
|
| + ASSERT_TRUE(format != nullptr);
|
| EXPECT_EQ(1, format->framerate());
|
| }
|
|
|