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

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

Issue 2437453003: Remove VideoCodec resolution validation. (Closed)
Patch Set: Remove broken tests. Created 4 years, 2 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
« no previous file with comments | « webrtc/media/base/codec_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2500 matching lines...) Expand 10 before | Expand all | Expand 10 after
2511 parameters.codecs[0].params[kCodecParamMaxQuantization] = kMaxQuantization; 2511 parameters.codecs[0].params[kCodecParamMaxQuantization] = kMaxQuantization;
2512 EXPECT_TRUE(channel_->SetSendParameters(parameters)); 2512 EXPECT_TRUE(channel_->SetSendParameters(parameters));
2513 EXPECT_EQ(static_cast<unsigned int>(atoi(kMaxQuantization)), 2513 EXPECT_EQ(static_cast<unsigned int>(atoi(kMaxQuantization)),
2514 AddSendStream()->GetVideoStreams().back().max_qp); 2514 AddSendStream()->GetVideoStreams().back().max_qp);
2515 2515
2516 VideoCodec codec; 2516 VideoCodec codec;
2517 EXPECT_TRUE(channel_->GetSendCodec(&codec)); 2517 EXPECT_TRUE(channel_->GetSendCodec(&codec));
2518 EXPECT_EQ(kMaxQuantization, codec.params[kCodecParamMaxQuantization]); 2518 EXPECT_EQ(kMaxQuantization, codec.params[kCodecParamMaxQuantization]);
2519 } 2519 }
2520 2520
2521 TEST_F(WebRtcVideoChannel2Test, SetSendCodecsRejectBadDimensions) {
2522 cricket::VideoSendParameters parameters;
2523 parameters.codecs.push_back(kVp8Codec);
2524
2525 parameters.codecs[0].width = 0;
2526 EXPECT_FALSE(channel_->SetSendParameters(parameters))
2527 << "Codec set though codec width is zero.";
2528
2529 parameters.codecs[0].width = kVp8Codec.width;
2530 parameters.codecs[0].height = 0;
2531 EXPECT_FALSE(channel_->SetSendParameters(parameters))
2532 << "Codec set though codec height is zero.";
2533 }
2534
2535 TEST_F(WebRtcVideoChannel2Test, SetSendCodecsRejectBadPayloadTypes) { 2521 TEST_F(WebRtcVideoChannel2Test, SetSendCodecsRejectBadPayloadTypes) {
2536 // TODO(pbos): Should we only allow the dynamic range? 2522 // TODO(pbos): Should we only allow the dynamic range?
2537 static const int kIncorrectPayloads[] = {-2, -1, 128, 129}; 2523 static const int kIncorrectPayloads[] = {-2, -1, 128, 129};
2538 cricket::VideoSendParameters parameters; 2524 cricket::VideoSendParameters parameters;
2539 parameters.codecs.push_back(kVp8Codec); 2525 parameters.codecs.push_back(kVp8Codec);
2540 for (size_t i = 0; i < arraysize(kIncorrectPayloads); ++i) { 2526 for (size_t i = 0; i < arraysize(kIncorrectPayloads); ++i) {
2541 parameters.codecs[0].id = kIncorrectPayloads[i]; 2527 parameters.codecs[0].id = kIncorrectPayloads[i];
2542 EXPECT_FALSE(channel_->SetSendParameters(parameters)) 2528 EXPECT_FALSE(channel_->SetSendParameters(parameters))
2543 << "Bad payload type '" << kIncorrectPayloads[i] << "' accepted."; 2529 << "Bad payload type '" << kIncorrectPayloads[i] << "' accepted.";
2544 } 2530 }
(...skipping 1311 matching lines...) Expand 10 before | Expand all | Expand 10 after
3856 } 3842 }
3857 3843
3858 // Test that we normalize send codec format size in simulcast. 3844 // Test that we normalize send codec format size in simulcast.
3859 TEST_F(WebRtcVideoChannel2SimulcastTest, SetSendCodecsWithOddSizeInSimulcast) { 3845 TEST_F(WebRtcVideoChannel2SimulcastTest, SetSendCodecsWithOddSizeInSimulcast) {
3860 cricket::VideoCodec codec(kVp8Codec270p); 3846 cricket::VideoCodec codec(kVp8Codec270p);
3861 codec.width += 1; 3847 codec.width += 1;
3862 codec.height += 1; 3848 codec.height += 1;
3863 VerifySimulcastSettings(codec, 2, 2); 3849 VerifySimulcastSettings(codec, 2, 2);
3864 } 3850 }
3865 } // namespace cricket 3851 } // namespace cricket
OLDNEW
« no previous file with comments | « webrtc/media/base/codec_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698