Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(11)

Side by Side Diff: webrtc/media/engine/webrtcvideoengine2_unittest.cc

Issue 2716733005: Split FlexFEC field trial in two. (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2004 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2004 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 763 matching lines...) Expand 10 before | Expand all | Expand 10 after
774 }; 774 };
775 775
776 // FlexFEC is not active without field trial. 776 // FlexFEC is not active without field trial.
777 engine_.Init(); 777 engine_.Init();
778 const std::vector<VideoCodec> codecs_before = engine_.codecs(); 778 const std::vector<VideoCodec> codecs_before = engine_.codecs();
779 EXPECT_EQ(codecs_before.end(), std::find_if(codecs_before.begin(), 779 EXPECT_EQ(codecs_before.end(), std::find_if(codecs_before.begin(),
780 codecs_before.end(), is_flexfec)); 780 codecs_before.end(), is_flexfec));
781 781
782 // FlexFEC is active with field trial. 782 // FlexFEC is active with field trial.
783 webrtc::test::ScopedFieldTrials override_field_trials_( 783 webrtc::test::ScopedFieldTrials override_field_trials_(
784 "WebRTC-FlexFEC-03/Enabled/"); 784 "WebRTC-FlexFEC-03-Advertised/Enabled/");
785 const std::vector<VideoCodec> codecs_after = engine_.codecs(); 785 const std::vector<VideoCodec> codecs_after = engine_.codecs();
786 EXPECT_NE(codecs_after.end(), 786 EXPECT_NE(codecs_after.end(),
787 std::find_if(codecs_after.begin(), codecs_after.end(), is_flexfec)); 787 std::find_if(codecs_after.begin(), codecs_after.end(), is_flexfec));
788 } 788 }
789 789
790 // Test that external codecs are added to the end of the supported codec list. 790 // Test that external codecs are added to the end of the supported codec list.
791 TEST_F(WebRtcVideoEngine2Test, ReportSupportedExternalCodecs) { 791 TEST_F(WebRtcVideoEngine2Test, ReportSupportedExternalCodecs) {
792 cricket::FakeWebRtcVideoEncoderFactory encoder_factory; 792 cricket::FakeWebRtcVideoEncoderFactory encoder_factory;
793 encoder_factory.AddSupportedVideoCodecType("FakeExternalCodec"); 793 encoder_factory.AddSupportedVideoCodecType("FakeExternalCodec");
794 engine_.SetExternalEncoderFactory(&encoder_factory); 794 engine_.SetExternalEncoderFactory(&encoder_factory);
(...skipping 1577 matching lines...) Expand 10 before | Expand all | Expand 10 after
2372 2372
2373 EXPECT_EQ(-1, config.rtp.flexfec.payload_type); 2373 EXPECT_EQ(-1, config.rtp.flexfec.payload_type);
2374 } 2374 }
2375 2375
2376 // TODO(brandtr): When FlexFEC is no longer behind a field trial, merge all 2376 // TODO(brandtr): When FlexFEC is no longer behind a field trial, merge all
2377 // tests that use this test fixture into the corresponding "non-field trial" 2377 // tests that use this test fixture into the corresponding "non-field trial"
2378 // tests. 2378 // tests.
2379 class WebRtcVideoChannel2FlexfecTest : public WebRtcVideoChannel2Test { 2379 class WebRtcVideoChannel2FlexfecTest : public WebRtcVideoChannel2Test {
2380 public: 2380 public:
2381 WebRtcVideoChannel2FlexfecTest() 2381 WebRtcVideoChannel2FlexfecTest()
2382 : WebRtcVideoChannel2Test("WebRTC-FlexFEC-03/Enabled/") {} 2382 : WebRtcVideoChannel2Test(
2383 "WebRTC-FlexFEC-03-Advertised/Enabled/WebRTC-FlexFEC-03/Enabled/") {
2384 }
2383 }; 2385 };
2384 2386
2385 // TODO(brandtr): Merge into "non-field trial" test when FlexFEC is enabled 2387 // TODO(brandtr): Merge into "non-field trial" test when FlexFEC is enabled
2386 // by default. 2388 // by default.
2387 TEST_F(WebRtcVideoChannel2FlexfecTest, 2389 TEST_F(WebRtcVideoChannel2FlexfecTest,
2388 DefaultFlexfecCodecHasTransportCcAndRembFeedbackParam) { 2390 DefaultFlexfecCodecHasTransportCcAndRembFeedbackParam) {
2389 EXPECT_TRUE(cricket::HasTransportCc(GetEngineCodec("flexfec-03"))); 2391 EXPECT_TRUE(cricket::HasTransportCc(GetEngineCodec("flexfec-03")));
2390 EXPECT_TRUE(cricket::HasRemb(GetEngineCodec("flexfec-03"))); 2392 EXPECT_TRUE(cricket::HasRemb(GetEngineCodec("flexfec-03")));
2391 } 2393 }
2392 2394
(...skipping 1949 matching lines...) Expand 10 before | Expand all | Expand 10 after
4342 } 4344 }
4343 4345
4344 TEST_F(WebRtcVideoChannel2SimulcastTest, SetSendCodecsForSimulcastScreenshare) { 4346 TEST_F(WebRtcVideoChannel2SimulcastTest, SetSendCodecsForSimulcastScreenshare) {
4345 webrtc::test::ScopedFieldTrials override_field_trials_( 4347 webrtc::test::ScopedFieldTrials override_field_trials_(
4346 "WebRTC-SimulcastScreenshare/Enabled/"); 4348 "WebRTC-SimulcastScreenshare/Enabled/");
4347 VerifySimulcastSettings(cricket::VideoCodec("VP8"), 1280, 720, 3, 2, true, 4349 VerifySimulcastSettings(cricket::VideoCodec("VP8"), 1280, 720, 3, 2, true,
4348 true); 4350 true);
4349 } 4351 }
4350 4352
4351 } // namespace cricket 4353 } // namespace cricket
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698