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

Side by Side Diff: webrtc/video/end_to_end_tests.cc

Issue 2922683002: Protect new header extension by field trial experiment to allow hardcoding it in SDP (Closed)
Patch Set: Fix typos and add missing field trial forcing Created 3 years, 6 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) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 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 #include <algorithm> 10 #include <algorithm>
(...skipping 2773 matching lines...) Expand 10 before | Expand all | Expand 10 after
2784 { 2784 {
2785 rtc::CritScope lock(&crit_); 2785 rtc::CritScope lock(&crit_);
2786 num_frames_received_ = 0; 2786 num_frames_received_ = 0;
2787 } 2787 }
2788 } 2788 }
2789 2789
2790 rtc::CriticalSection crit_; 2790 rtc::CriticalSection crit_;
2791 int num_frames_received_ GUARDED_BY(&crit_); 2791 int num_frames_received_ GUARDED_BY(&crit_);
2792 } test; 2792 } test;
2793 2793
2794 test::ScopedFieldTrials override_field_trials(
2795 "WebRTC-VideoContentTypeExtension/Enabled/");
2794 metrics::Reset(); 2796 metrics::Reset();
2795 2797
2796 Call::Config send_config(test.GetSenderCallConfig()); 2798 Call::Config send_config(test.GetSenderCallConfig());
2797 CreateSenderCall(send_config); 2799 CreateSenderCall(send_config);
2798 Call::Config recv_config(test.GetReceiverCallConfig()); 2800 Call::Config recv_config(test.GetReceiverCallConfig());
2799 CreateReceiverCall(recv_config); 2801 CreateReceiverCall(recv_config);
2800 receive_transport_.reset(test.CreateReceiveTransport()); 2802 receive_transport_.reset(test.CreateReceiveTransport());
2801 send_transport_.reset(test.CreateSendTransport(sender_call_.get())); 2803 send_transport_.reset(test.CreateSendTransport(sender_call_.get()));
2802 send_transport_->SetReceiver(receiver_call_->Receiver()); 2804 send_transport_->SetReceiver(receiver_call_->Receiver());
2803 receive_transport_->SetReceiver(sender_call_->Receiver()); 2805 receive_transport_->SetReceiver(sender_call_->Receiver());
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
2868 const bool kEnabledRtx = false; 2870 const bool kEnabledRtx = false;
2869 const bool kEnabledRed = true; 2871 const bool kEnabledRed = true;
2870 const bool kScreenshare = false; 2872 const bool kScreenshare = false;
2871 VerifyHistogramStats(kEnabledRtx, kEnabledRed, kScreenshare); 2873 VerifyHistogramStats(kEnabledRtx, kEnabledRed, kScreenshare);
2872 } 2874 }
2873 2875
2874 TEST_F(EndToEndTest, VerifyHistogramStatsWithScreenshare) { 2876 TEST_F(EndToEndTest, VerifyHistogramStatsWithScreenshare) {
2875 const bool kEnabledRtx = false; 2877 const bool kEnabledRtx = false;
2876 const bool kEnabledRed = false; 2878 const bool kEnabledRed = false;
2877 const bool kScreenshare = true; 2879 const bool kScreenshare = true;
2880 test::ScopedFieldTrials override_field_trials(
2881 "WebRTC-VideoContentTypeExtension/Enabled/");
2878 VerifyHistogramStats(kEnabledRtx, kEnabledRed, kScreenshare); 2882 VerifyHistogramStats(kEnabledRtx, kEnabledRed, kScreenshare);
2879 } 2883 }
2880 2884
2881 void EndToEndTest::TestSendsSetSsrcs(size_t num_ssrcs, 2885 void EndToEndTest::TestSendsSetSsrcs(size_t num_ssrcs,
2882 bool send_single_ssrc_first) { 2886 bool send_single_ssrc_first) {
2883 class SendsSetSsrcs : public test::EndToEndTest { 2887 class SendsSetSsrcs : public test::EndToEndTest {
2884 public: 2888 public:
2885 SendsSetSsrcs(const uint32_t* ssrcs, 2889 SendsSetSsrcs(const uint32_t* ssrcs,
2886 size_t num_ssrcs, 2890 size_t num_ssrcs,
2887 bool send_single_ssrc_first) 2891 bool send_single_ssrc_first)
(...skipping 2025 matching lines...) Expand 10 before | Expand all | Expand 10 after
4913 std::unique_ptr<VideoEncoder> encoder_; 4917 std::unique_ptr<VideoEncoder> encoder_;
4914 std::unique_ptr<VideoDecoder> decoder_; 4918 std::unique_ptr<VideoDecoder> decoder_;
4915 rtc::CriticalSection crit_; 4919 rtc::CriticalSection crit_;
4916 int recorded_frames_ GUARDED_BY(crit_); 4920 int recorded_frames_ GUARDED_BY(crit_);
4917 } test(this); 4921 } test(this);
4918 4922
4919 RunBaseTest(&test); 4923 RunBaseTest(&test);
4920 } 4924 }
4921 4925
4922 } // namespace webrtc 4926 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtp_sender_video.cc ('k') | webrtc/video/video_send_stream_tests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698