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

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

Issue 1319163002: Clean up tests (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: more Created 5 years, 3 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 * libjingle 2 * libjingle
3 * Copyright 2004 Google Inc. 3 * Copyright 2004 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 735 matching lines...) Expand 10 before | Expand all | Expand 10 after
746 746
747 cricket::VideoCodec DefaultCodec() override { return kVp8Codec; } 747 cricket::VideoCodec DefaultCodec() override { return kVp8Codec; }
748 }; 748 };
749 749
750 #define WEBRTC_BASE_TEST(test) \ 750 #define WEBRTC_BASE_TEST(test) \
751 TEST_F(WebRtcVideoChannel2BaseTest, test) { Base::test(); } 751 TEST_F(WebRtcVideoChannel2BaseTest, test) { Base::test(); }
752 752
753 #define WEBRTC_DISABLED_BASE_TEST(test) \ 753 #define WEBRTC_DISABLED_BASE_TEST(test) \
754 TEST_F(WebRtcVideoChannel2BaseTest, DISABLED_##test) { Base::test(); } 754 TEST_F(WebRtcVideoChannel2BaseTest, DISABLED_##test) { Base::test(); }
755 755
756 // TODO(pbos): Fix WebRtcVideoEngine2BaseTest, where we want CheckCoInitialize.
757 #if 0
758 // TODO(juberti): Figure out why ViE is munging the COM refcount.
tommi 2015/08/28 13:29:18 is there actually a bug in ViE in relation to this
the sun 2015/08/28 14:42:37 I couldn't find a webrtc bug mentioning either "CO
759 #ifdef WIN32
760 WEBRTC_DISABLED_BASE_TEST(CheckCoInitialize) {
761 Base::CheckCoInitialize();
762 }
763 #endif
764 #endif
765
766 WEBRTC_BASE_TEST(SetSend); 756 WEBRTC_BASE_TEST(SetSend);
767 WEBRTC_BASE_TEST(SetSendWithoutCodecs); 757 WEBRTC_BASE_TEST(SetSendWithoutCodecs);
768 WEBRTC_BASE_TEST(SetSendSetsTransportBufferSizes); 758 WEBRTC_BASE_TEST(SetSendSetsTransportBufferSizes);
769 759
770 WEBRTC_BASE_TEST(GetStats); 760 WEBRTC_BASE_TEST(GetStats);
771 WEBRTC_BASE_TEST(GetStatsMultipleRecvStreams); 761 WEBRTC_BASE_TEST(GetStatsMultipleRecvStreams);
772 WEBRTC_BASE_TEST(GetStatsMultipleSendStreams); 762 WEBRTC_BASE_TEST(GetStatsMultipleSendStreams);
773 763
774 WEBRTC_BASE_TEST(SetSendBandwidth); 764 WEBRTC_BASE_TEST(SetSendBandwidth);
775 765
(...skipping 1979 matching lines...) Expand 10 before | Expand all | Expand 10 after
2755 } 2745 }
2756 2746
2757 class WebRtcVideoEngine2SimulcastTest : public testing::Test { 2747 class WebRtcVideoEngine2SimulcastTest : public testing::Test {
2758 public: 2748 public:
2759 WebRtcVideoEngine2SimulcastTest() : engine_(nullptr) {} 2749 WebRtcVideoEngine2SimulcastTest() : engine_(nullptr) {}
2760 2750
2761 protected: 2751 protected:
2762 WebRtcVideoEngine2 engine_; 2752 WebRtcVideoEngine2 engine_;
2763 }; 2753 };
2764 2754
2755 // Test that if we add a stream with RTX SSRC's, SSRC's get set correctly.
2756 TEST_F(WebRtcVideoEngine2SimulcastTest, DISABLED_TestStreamWithRtx) {
2757 // TODO(pbos): Implement.
2758 FAIL() << "Not implemented.";
2759 }
2760
2761 // Test that if we get too few ssrcs are given in AddSendStream(),
2762 // only supported sub-streams will be added.
2763 TEST_F(WebRtcVideoEngine2SimulcastTest, DISABLED_TooFewSimulcastSsrcs) {
2764 // TODO(pbos): Implement.
2765 FAIL() << "Not implemented.";
2766 }
2767
2768 // Test that even more than enough ssrcs are given in AddSendStream(),
2769 // only supported sub-streams will be added.
2770 TEST_F(WebRtcVideoEngine2SimulcastTest, DISABLED_MoreThanEnoughSimulcastSscrs) {
2771 // TODO(pbos): Implement.
2772 FAIL() << "Not implemented.";
2773 }
2774
2775 // Test that SetSendStreamFormat works well with simulcast.
2776 TEST_F(WebRtcVideoEngine2SimulcastTest,
2777 DISABLED_SetSendStreamFormatWithSimulcast) {
2778 // TODO(pbos): Implement.
2779 FAIL() << "Not implemented.";
2780 }
2781
2782 // Test that simulcast send codec is reset on new video frame size.
2783 TEST_F(WebRtcVideoEngine2SimulcastTest,
2784 DISABLED_ResetSimulcastSendCodecOnNewFrameSize) {
2785 // TODO(pbos): Implement.
2786 FAIL() << "Not implemented.";
2787 }
2788
2789 // Test that simulcast send codec is reset on new portait mode video frame.
2790 TEST_F(WebRtcVideoEngine2SimulcastTest,
2791 DISABLED_ResetSimulcastSendCodecOnNewPortaitFrame) {
2792 // TODO(pbos): Implement.
2793 FAIL() << "Not implemented.";
2794 }
2795
2796 TEST_F(WebRtcVideoEngine2SimulcastTest,
2797 DISABLED_SetBandwidthInConferenceWithSimulcast) {
2798 // TODO(pbos): Implement.
2799 FAIL() << "Not implemented.";
2800 }
2801
2802 // Test that sending screencast frames in conference mode changes
2803 // bitrate.
2804 TEST_F(WebRtcVideoEngine2SimulcastTest,
2805 DISABLED_SetBandwidthScreencastInConference) {
2806 // TODO(pbos): Implement.
2807 FAIL() << "Not implemented.";
2808 }
2809
2810 // Test AddSendStream with simulcast rejects bad StreamParams.
2811 TEST_F(WebRtcVideoEngine2SimulcastTest,
2812 DISABLED_AddSendStreamWithBadStreamParams) {
2813 // TODO(pbos): Implement.
2814 FAIL() << "Not implemented.";
2815 }
2816
2817 // Test AddSendStream with simulcast sets ssrc and cname correctly.
2818 TEST_F(WebRtcVideoEngine2SimulcastTest, DISABLED_AddSendStreamWithSimulcast) {
2819 // TODO(pbos): Implement.
2820 FAIL() << "Not implemented.";
2821 }
2822
2823 // Test RemoveSendStream with simulcast.
2824 TEST_F(WebRtcVideoEngine2SimulcastTest,
2825 DISABLED_RemoveSendStreamWithSimulcast) {
2826 // TODO(pbos): Implement.
2827 FAIL() << "Not implemented.";
2828 }
2829
2830 // Test AddSendStream after send codec has already been set will reset
2831 // send codec with simulcast settings.
2832 TEST_F(WebRtcVideoEngine2SimulcastTest,
2833 DISABLED_AddSimulcastStreamAfterSetSendCodec) {
2834 // TODO(pbos): Implement.
2835 FAIL() << "Not implemented.";
2836 }
2837
2838 TEST_F(WebRtcVideoEngine2SimulcastTest, DISABLED_GetStatsWithMultipleSsrcs) {
2839 // TODO(pbos): Implement.
2840 FAIL() << "Not implemented.";
2841 }
2842
2843 // Test receiving channel(s) local ssrc is set to the same as the first
2844 // simulcast sending ssrc.
2845 TEST_F(WebRtcVideoEngine2SimulcastTest,
2846 DISABLED_AddSimulcastStreamAfterCreatingRecvChannels) {
2847 // TODO(pbos): Implement.
2848 FAIL() << "Not implemented.";
2849 }
2850
2851 // Test 1:1 call never turn on simulcast.
2852 TEST_F(WebRtcVideoEngine2SimulcastTest, DISABLED_NoSimulcastWith1on1) {
2853 // TODO(pbos): Implement.
2854 FAIL() << "Not implemented.";
2855 }
2856
2857 // Test SetOptions with OPT_CONFERENCE flag.
2858 TEST_F(WebRtcVideoEngine2SimulcastTest, DISABLED_SetOptionsWithConferenceMode) {
2859 // TODO(pbos): Implement.
2860 FAIL() << "Not implemented.";
2861 }
2862
2863 // Test that two different streams can have different formats.
2864 TEST_F(WebRtcVideoEngine2SimulcastTest,
2865 DISABLED_MultipleSendStreamsDifferentFormats) {
2866 // TODO(pbos): Implement.
2867 FAIL() << "Not implemented.";
2868 }
2869
2870 TEST_F(WebRtcVideoEngine2SimulcastTest, DISABLED_TestAdaptToOutputFormat) {
2871 // TODO(pbos): Implement.
2872 FAIL() << "Not implemented.";
2873 }
2874
2875 TEST_F(WebRtcVideoEngine2SimulcastTest,
2876 DISABLED_TestAdaptWithCpuOveruseObserver) {
2877 // TODO(pbos): Implement.
2878 FAIL() << "Not implemented.";
2879 }
2880
2881 // Test that codec is not reset for every frame sent in non-conference and
2882 // non-screencast mode.
2883 TEST_F(WebRtcVideoEngine2SimulcastTest, DISABLED_DontResetCodecOnSendFrame) {
2884 // TODO(pbos): Implement.
2885 FAIL() << "Not implemented.";
2886 }
2887
2888 TEST_F(WebRtcVideoEngine2SimulcastTest,
2889 DISABLED_UseSimulcastAdapterOnVp8OnlyFactory) {
2890 // TODO(pbos): Implement.
2891 FAIL() << "Not implemented.";
2892 }
2893
2894 TEST_F(WebRtcVideoEngine2SimulcastTest,
2895 DISABLED_DontUseSimulcastAdapterOnNonVp8Factory) {
2896 // TODO(pbos): Implement.
2897 FAIL() << "Not implemented.";
2898 }
2899
2765 class WebRtcVideoChannel2SimulcastTest : public WebRtcVideoEngine2SimulcastTest, 2900 class WebRtcVideoChannel2SimulcastTest : public WebRtcVideoEngine2SimulcastTest,
2766 public WebRtcCallFactory { 2901 public WebRtcCallFactory {
2767 public: 2902 public:
2768 WebRtcVideoChannel2SimulcastTest() : fake_call_(NULL) {} 2903 WebRtcVideoChannel2SimulcastTest() : fake_call_(NULL) {}
2769 2904
2770 void SetUp() override { 2905 void SetUp() override {
2771 engine_.SetCallFactory(this); 2906 engine_.SetCallFactory(this);
2772 engine_.Init(); 2907 engine_.Init();
2773 channel_.reset(engine_.CreateChannel(VideoOptions(), NULL)); 2908 channel_.reset(engine_.CreateChannel(VideoOptions(), NULL));
2774 ASSERT_TRUE(fake_call_ != NULL) << "Call not created through factory."; 2909 ASSERT_TRUE(fake_call_ != NULL) << "Call not created through factory.";
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
2938 } 3073 }
2939 3074
2940 // Test that we normalize send codec format size in simulcast. 3075 // Test that we normalize send codec format size in simulcast.
2941 TEST_F(WebRtcVideoChannel2SimulcastTest, SetSendCodecsWithOddSizeInSimulcast) { 3076 TEST_F(WebRtcVideoChannel2SimulcastTest, SetSendCodecsWithOddSizeInSimulcast) {
2942 cricket::VideoCodec codec(kVp8Codec270p); 3077 cricket::VideoCodec codec(kVp8Codec270p);
2943 codec.width += 1; 3078 codec.width += 1;
2944 codec.height += 1; 3079 codec.height += 1;
2945 VerifySimulcastSettings(codec, VideoOptions::NORMAL, 2, 2, SBM_NORMAL); 3080 VerifySimulcastSettings(codec, VideoOptions::NORMAL, 2, 2, SBM_NORMAL);
2946 } 3081 }
2947 3082
2948 // Test that if we add a stream with RTX SSRC's, SSRC's get set correctly.
2949 TEST_F(WebRtcVideoEngine2SimulcastTest, DISABLED_TestStreamWithRtx) {
2950 // TODO(pbos): Implement.
2951 FAIL() << "Not implemented.";
2952 }
2953
2954 // Test that if we get too few ssrcs are given in AddSendStream(),
2955 // only supported sub-streams will be added.
2956 TEST_F(WebRtcVideoEngine2SimulcastTest, DISABLED_TooFewSimulcastSsrcs) {
2957 // TODO(pbos): Implement.
2958 FAIL() << "Not implemented.";
2959 }
2960
2961 // Test that even more than enough ssrcs are given in AddSendStream(),
2962 // only supported sub-streams will be added.
2963 TEST_F(WebRtcVideoEngine2SimulcastTest, DISABLED_MoreThanEnoughSimulcastSscrs) {
2964 // TODO(pbos): Implement.
2965 FAIL() << "Not implemented.";
2966 }
2967
2968 // Test that SetSendStreamFormat works well with simulcast.
2969 TEST_F(WebRtcVideoEngine2SimulcastTest,
2970 DISABLED_SetSendStreamFormatWithSimulcast) {
2971 // TODO(pbos): Implement.
2972 FAIL() << "Not implemented.";
2973 }
2974
2975 // Test that simulcast send codec is reset on new video frame size.
2976 TEST_F(WebRtcVideoEngine2SimulcastTest,
2977 DISABLED_ResetSimulcastSendCodecOnNewFrameSize) {
2978 // TODO(pbos): Implement.
2979 FAIL() << "Not implemented.";
2980 }
2981
2982 // Test that simulcast send codec is reset on new portait mode video frame.
2983 TEST_F(WebRtcVideoEngine2SimulcastTest,
2984 DISABLED_ResetSimulcastSendCodecOnNewPortaitFrame) {
2985 // TODO(pbos): Implement.
2986 FAIL() << "Not implemented.";
2987 }
2988
2989 TEST_F(WebRtcVideoEngine2SimulcastTest,
2990 DISABLED_SetBandwidthInConferenceWithSimulcast) {
2991 // TODO(pbos): Implement.
2992 FAIL() << "Not implemented.";
2993 }
2994
2995 // Test that sending screencast frames in conference mode changes
2996 // bitrate.
2997 TEST_F(WebRtcVideoEngine2SimulcastTest,
2998 DISABLED_SetBandwidthScreencastInConference) {
2999 // TODO(pbos): Implement.
3000 FAIL() << "Not implemented.";
3001 }
3002
3003 // Test AddSendStream with simulcast rejects bad StreamParams.
3004 TEST_F(WebRtcVideoEngine2SimulcastTest,
3005 DISABLED_AddSendStreamWithBadStreamParams) {
3006 // TODO(pbos): Implement.
3007 FAIL() << "Not implemented.";
3008 }
3009
3010 // Test AddSendStream with simulcast sets ssrc and cname correctly.
3011 TEST_F(WebRtcVideoEngine2SimulcastTest, DISABLED_AddSendStreamWithSimulcast) {
3012 // TODO(pbos): Implement.
3013 FAIL() << "Not implemented.";
3014 }
3015
3016 // Test RemoveSendStream with simulcast.
3017 TEST_F(WebRtcVideoEngine2SimulcastTest,
3018 DISABLED_RemoveSendStreamWithSimulcast) {
3019 // TODO(pbos): Implement.
3020 FAIL() << "Not implemented.";
3021 }
3022
3023 // Test AddSendStream after send codec has already been set will reset
3024 // send codec with simulcast settings.
3025 TEST_F(WebRtcVideoEngine2SimulcastTest,
3026 DISABLED_AddSimulcastStreamAfterSetSendCodec) {
3027 // TODO(pbos): Implement.
3028 FAIL() << "Not implemented.";
3029 }
3030
3031 TEST_F(WebRtcVideoEngine2SimulcastTest, DISABLED_GetStatsWithMultipleSsrcs) {
3032 // TODO(pbos): Implement.
3033 FAIL() << "Not implemented.";
3034 }
3035
3036 // Test receiving channel(s) local ssrc is set to the same as the first
3037 // simulcast sending ssrc.
3038 TEST_F(WebRtcVideoEngine2SimulcastTest,
3039 DISABLED_AddSimulcastStreamAfterCreatingRecvChannels) {
3040 // TODO(pbos): Implement.
3041 FAIL() << "Not implemented.";
3042 }
3043
3044 // Test 1:1 call never turn on simulcast.
3045 TEST_F(WebRtcVideoEngine2SimulcastTest, DISABLED_NoSimulcastWith1on1) {
3046 // TODO(pbos): Implement.
3047 FAIL() << "Not implemented.";
3048 }
3049
3050 // Test SetOptions with OPT_CONFERENCE flag.
3051 TEST_F(WebRtcVideoEngine2SimulcastTest, DISABLED_SetOptionsWithConferenceMode) {
3052 // TODO(pbos): Implement.
3053 FAIL() << "Not implemented.";
3054 }
3055
3056 // Test that two different streams can have different formats.
3057 TEST_F(WebRtcVideoEngine2SimulcastTest,
3058 DISABLED_MultipleSendStreamsDifferentFormats) {
3059 // TODO(pbos): Implement.
3060 FAIL() << "Not implemented.";
3061 }
3062
3063 TEST_F(WebRtcVideoEngine2SimulcastTest, DISABLED_TestAdaptToOutputFormat) {
3064 // TODO(pbos): Implement.
3065 FAIL() << "Not implemented.";
3066 }
3067
3068 TEST_F(WebRtcVideoEngine2SimulcastTest,
3069 DISABLED_TestAdaptWithCpuOveruseObserver) {
3070 // TODO(pbos): Implement.
3071 FAIL() << "Not implemented.";
3072 }
3073
3074 // Test that codec is not reset for every frame sent in non-conference and
3075 // non-screencast mode.
3076 TEST_F(WebRtcVideoEngine2SimulcastTest, DISABLED_DontResetCodecOnSendFrame) {
3077 // TODO(pbos): Implement.
3078 FAIL() << "Not implemented.";
3079 }
3080
3081 TEST_F(WebRtcVideoEngine2SimulcastTest,
3082 DISABLED_UseSimulcastAdapterOnVp8OnlyFactory) {
3083 // TODO(pbos): Implement.
3084 FAIL() << "Not implemented.";
3085 }
3086
3087 TEST_F(WebRtcVideoEngine2SimulcastTest,
3088 DISABLED_DontUseSimulcastAdapterOnNonVp8Factory) {
3089 // TODO(pbos): Implement.
3090 FAIL() << "Not implemented.";
3091 }
3092
3093 TEST_F(WebRtcVideoChannel2SimulcastTest, DISABLED_SimulcastSend_1280x800) { 3083 TEST_F(WebRtcVideoChannel2SimulcastTest, DISABLED_SimulcastSend_1280x800) {
3094 // TODO(pbos): Implement. 3084 // TODO(pbos): Implement.
3095 FAIL() << "Not implemented."; 3085 FAIL() << "Not implemented.";
3096 } 3086 }
3097 3087
3098 TEST_F(WebRtcVideoChannel2SimulcastTest, DISABLED_SimulcastSend_1280x720) { 3088 TEST_F(WebRtcVideoChannel2SimulcastTest, DISABLED_SimulcastSend_1280x720) {
3099 // TODO(pbos): Implement. 3089 // TODO(pbos): Implement.
3100 FAIL() << "Not implemented."; 3090 FAIL() << "Not implemented.";
3101 } 3091 }
3102 3092
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
3165 // Ensures that the correct settings are applied to the codec when two temporal 3155 // Ensures that the correct settings are applied to the codec when two temporal
3166 // layer screencasting is enabled, and that the correct simulcast settings are 3156 // layer screencasting is enabled, and that the correct simulcast settings are
3167 // reapplied when disabling screencasting. 3157 // reapplied when disabling screencasting.
3168 TEST_F(WebRtcVideoChannel2SimulcastTest, 3158 TEST_F(WebRtcVideoChannel2SimulcastTest,
3169 DISABLED_TwoTemporalLayerScreencastSettings) { 3159 DISABLED_TwoTemporalLayerScreencastSettings) {
3170 // TODO(pbos): Implement. 3160 // TODO(pbos): Implement.
3171 FAIL() << "Not implemented."; 3161 FAIL() << "Not implemented.";
3172 } 3162 }
3173 3163
3174 } // namespace cricket 3164 } // namespace cricket
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698