Enable Unified Plan tests that were blocked on the stats collector
The stats collectors now work with Unified Plan, so re-enable the
tests that were disabled.
Bug: webrtc:8764
Change-Id: I9ac97fd19d0024b3aaf26dd5ab09d3ffcb33210a
Reviewed-on: https://webrtc-review.googlesource.com/55800
Reviewed-by: Seth Hampson <shampson@webrtc.org>
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22114}
diff --git a/pc/peerconnection.cc b/pc/peerconnection.cc
index aa7146b..7191a28 100644
--- a/pc/peerconnection.cc
+++ b/pc/peerconnection.cc
@@ -2276,6 +2276,7 @@
}
// Once all processing has finished, fire off callbacks.
for (auto transceiver : receiving_transceivers) {
+ stats_->AddTrack(transceiver->receiver()->track());
observer_->OnTrack(transceiver);
observer_->OnAddTrack(transceiver->receiver(),
transceiver->receiver()->streams());
diff --git a/pc/peerconnection_bundle_unittest.cc b/pc/peerconnection_bundle_unittest.cc
index 616a076..16bd000 100644
--- a/pc/peerconnection_bundle_unittest.cc
+++ b/pc/peerconnection_bundle_unittest.cc
@@ -571,12 +571,6 @@
// the "audio" transport channel when bundling.
TEST_P(PeerConnectionBundleTest,
IgnoreCandidatesForUnusedTransportWhenBundling) {
- // TODO(bugs.webrtc.org/8764): Re-enable when stats are supported with Unified
- // Plan.
- if (sdp_semantics_ == SdpSemantics::kUnifiedPlan) {
- return;
- }
-
const SocketAddress kAudioAddress1("1.1.1.1", 1111);
const SocketAddress kAudioAddress2("2.2.2.2", 2222);
const SocketAddress kVideoAddress("3.3.3.3", 3333);
diff --git a/pc/peerconnectioninterface_unittest.cc b/pc/peerconnectioninterface_unittest.cc
index fa37348..3c70aa2 100644
--- a/pc/peerconnectioninterface_unittest.cc
+++ b/pc/peerconnectioninterface_unittest.cc
@@ -1908,12 +1908,6 @@
// Test that we can specify a certain track that we want statistics about.
TEST_P(PeerConnectionInterfaceTest, GetStatsForSpecificTrack) {
- if (sdp_semantics_ == SdpSemantics::kUnifiedPlan) {
- // TODO(bugs.webrtc.org/8764): Re-enable when stats are supported with
- // Unified Plan.
- return;
- }
-
InitiateCall();
ASSERT_LT(0u, pc_->GetSenders().size());
ASSERT_LT(0u, pc_->GetReceivers().size());
@@ -1934,12 +1928,6 @@
// Test that we can get stats on a video track.
TEST_P(PeerConnectionInterfaceTest, GetStatsForVideoTrack) {
- if (sdp_semantics_ == SdpSemantics::kUnifiedPlan) {
- // TODO(bugs.webrtc.org/8764): Re-enable when stats are supported with
- // Unified Plan.
- return;
- }
-
InitiateCall();
auto video_receiver = GetFirstReceiverOfType(cricket::MEDIA_TYPE_VIDEO);
ASSERT_TRUE(video_receiver);
@@ -1948,12 +1936,6 @@
// Test that we don't get statistics for an invalid track.
TEST_P(PeerConnectionInterfaceTest, GetStatsForInvalidTrack) {
- if (sdp_semantics_ == SdpSemantics::kUnifiedPlan) {
- // TODO(bugs.webrtc.org/8764): Re-enable when stats are supported with
- // Unified Plan.
- return;
- }
-
InitiateCall();
rtc::scoped_refptr<AudioTrackInterface> unknown_audio_track(
pc_factory_->CreateAudioTrack("unknown track", NULL));
@@ -1961,12 +1943,6 @@
}
TEST_P(PeerConnectionInterfaceTest, GetRTCStatsBeforeAndAfterCalling) {
- if (sdp_semantics_ == SdpSemantics::kUnifiedPlan) {
- // TODO(bugs.webrtc.org/8764): Re-enable when stats are supported with
- // Unified Plan.
- return;
- }
-
CreatePeerConnectionWithoutDtls();
EXPECT_TRUE(DoGetRTCStats());
// Clearing stats cache is needed now, but should be temporary.