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

Side by Side Diff: webrtc/pc/peerconnectioninterface_unittest.cc

Issue 2692723002: Adding RTCErrorOr class to be used by ORTC APIs. (Closed)
Patch Set: Changing "CreateAndLogError" to a macro. Created 3 years, 10 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
« webrtc/api/BUILD.gn ('K') | « webrtc/pc/peerconnection.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 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2012 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 3366 matching lines...) Expand 10 before | Expand all | Expand 10 after
3377 answer_c.SetMandatoryReceiveAudio(false); 3377 answer_c.SetMandatoryReceiveAudio(false);
3378 answer_c.SetMandatoryReceiveVideo(false); 3378 answer_c.SetMandatoryReceiveVideo(false);
3379 3379
3380 cricket::MediaSessionOptions updated_answer_options; 3380 cricket::MediaSessionOptions updated_answer_options;
3381 EXPECT_TRUE( 3381 EXPECT_TRUE(
3382 ParseConstraintsForAnswer(&updated_answer_c, &updated_answer_options)); 3382 ParseConstraintsForAnswer(&updated_answer_c, &updated_answer_options));
3383 EXPECT_TRUE(updated_answer_options.has_audio()); 3383 EXPECT_TRUE(updated_answer_options.has_audio());
3384 EXPECT_TRUE(updated_answer_options.has_video()); 3384 EXPECT_TRUE(updated_answer_options.has_video());
3385 } 3385 }
3386 3386
3387 TEST(RTCErrorTypeTest, OstreamOperator) {
3388 std::ostringstream oss;
3389 oss << webrtc::RTCErrorType::NONE << ' '
3390 << webrtc::RTCErrorType::INVALID_PARAMETER << ' '
3391 << webrtc::RTCErrorType::INTERNAL_ERROR;
3392 EXPECT_EQ("NONE INVALID_PARAMETER INTERNAL_ERROR", oss.str());
3393 }
3394
3395 // Tests a few random fields being different. 3387 // Tests a few random fields being different.
3396 TEST(RTCConfigurationTest, ComparisonOperators) { 3388 TEST(RTCConfigurationTest, ComparisonOperators) {
3397 PeerConnectionInterface::RTCConfiguration a; 3389 PeerConnectionInterface::RTCConfiguration a;
3398 PeerConnectionInterface::RTCConfiguration b; 3390 PeerConnectionInterface::RTCConfiguration b;
3399 EXPECT_EQ(a, b); 3391 EXPECT_EQ(a, b);
3400 3392
3401 PeerConnectionInterface::RTCConfiguration c; 3393 PeerConnectionInterface::RTCConfiguration c;
3402 c.servers.push_back(PeerConnectionInterface::IceServer()); 3394 c.servers.push_back(PeerConnectionInterface::IceServer());
3403 EXPECT_NE(a, c); 3395 EXPECT_NE(a, c);
3404 3396
(...skipping 10 matching lines...) Expand all
3415 EXPECT_NE(a, f); 3407 EXPECT_NE(a, f);
3416 3408
3417 PeerConnectionInterface::RTCConfiguration g; 3409 PeerConnectionInterface::RTCConfiguration g;
3418 g.disable_ipv6 = true; 3410 g.disable_ipv6 = true;
3419 EXPECT_NE(a, g); 3411 EXPECT_NE(a, g);
3420 3412
3421 PeerConnectionInterface::RTCConfiguration h( 3413 PeerConnectionInterface::RTCConfiguration h(
3422 PeerConnectionInterface::RTCConfigurationType::kAggressive); 3414 PeerConnectionInterface::RTCConfigurationType::kAggressive);
3423 EXPECT_NE(a, h); 3415 EXPECT_NE(a, h);
3424 } 3416 }
OLDNEW
« webrtc/api/BUILD.gn ('K') | « webrtc/pc/peerconnection.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698