| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2016 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2016 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 505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 516 transport.local_certificate_id, RTCCertificateStats::kType); | 516 transport.local_certificate_id, RTCCertificateStats::kType); |
| 517 verifier.TestMemberIsIDReference( | 517 verifier.TestMemberIsIDReference( |
| 518 transport.remote_certificate_id, RTCCertificateStats::kType); | 518 transport.remote_certificate_id, RTCCertificateStats::kType); |
| 519 return verifier.ExpectAllMembersSuccessfullyTested(); | 519 return verifier.ExpectAllMembersSuccessfullyTested(); |
| 520 } | 520 } |
| 521 | 521 |
| 522 private: | 522 private: |
| 523 rtc::scoped_refptr<const RTCStatsReport> report_; | 523 rtc::scoped_refptr<const RTCStatsReport> report_; |
| 524 }; | 524 }; |
| 525 | 525 |
| 526 #ifdef HAVE_SCTP |
| 526 TEST_F(RTCStatsIntegrationTest, GetStatsFromCaller) { | 527 TEST_F(RTCStatsIntegrationTest, GetStatsFromCaller) { |
| 527 StartCall(); | 528 StartCall(); |
| 528 | 529 |
| 529 rtc::scoped_refptr<const RTCStatsReport> report = GetStatsFromCaller(); | 530 rtc::scoped_refptr<const RTCStatsReport> report = GetStatsFromCaller(); |
| 530 RTCStatsReportVerifier(report.get()).VerifyReport(); | 531 RTCStatsReportVerifier(report.get()).VerifyReport(); |
| 531 } | 532 } |
| 532 | 533 |
| 533 TEST_F(RTCStatsIntegrationTest, GetStatsFromCallee) { | 534 TEST_F(RTCStatsIntegrationTest, GetStatsFromCallee) { |
| 534 StartCall(); | 535 StartCall(); |
| 535 | 536 |
| 536 rtc::scoped_refptr<const RTCStatsReport> report = GetStatsFromCallee(); | 537 rtc::scoped_refptr<const RTCStatsReport> report = GetStatsFromCallee(); |
| 537 RTCStatsReportVerifier(report.get()).VerifyReport(); | 538 RTCStatsReportVerifier(report.get()).VerifyReport(); |
| 538 } | 539 } |
| 539 | 540 |
| 540 TEST_F(RTCStatsIntegrationTest, GetsStatsWhileDestroyingPeerConnections) { | 541 TEST_F(RTCStatsIntegrationTest, GetsStatsWhileDestroyingPeerConnections) { |
| 541 StartCall(); | 542 StartCall(); |
| 542 | 543 |
| 543 rtc::scoped_refptr<RTCStatsObtainer> stats_obtainer = | 544 rtc::scoped_refptr<RTCStatsObtainer> stats_obtainer = |
| 544 RTCStatsObtainer::Create(); | 545 RTCStatsObtainer::Create(); |
| 545 caller_->pc()->GetStats(stats_obtainer); | 546 caller_->pc()->GetStats(stats_obtainer); |
| 546 // This will destroy the peer connection. | 547 // This will destroy the peer connection. |
| 547 caller_ = nullptr; | 548 caller_ = nullptr; |
| 548 // Any pending stats requests should have completed in the act of destroying | 549 // Any pending stats requests should have completed in the act of destroying |
| 549 // the peer connection. | 550 // the peer connection. |
| 550 EXPECT_TRUE(stats_obtainer->report()); | 551 EXPECT_TRUE(stats_obtainer->report()); |
| 551 } | 552 } |
| 553 #endif // HAVE_SCTP |
| 552 | 554 |
| 553 } // namespace | 555 } // namespace |
| 554 | 556 |
| 555 } // namespace webrtc | 557 } // namespace webrtc |
| OLD | NEW |