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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 using testing::Invoke; | 47 using testing::Invoke; |
48 using testing::Return; | 48 using testing::Return; |
49 using testing::ReturnNull; | 49 using testing::ReturnNull; |
50 using testing::ReturnRef; | 50 using testing::ReturnRef; |
51 using testing::SetArgPointee; | 51 using testing::SetArgPointee; |
52 | 52 |
53 namespace webrtc { | 53 namespace webrtc { |
54 | 54 |
55 // These are used by gtest code, such as if |EXPECT_EQ| fails. | 55 // These are used by gtest code, such as if |EXPECT_EQ| fails. |
56 void PrintTo(const RTCCertificateStats& stats, ::std::ostream* os) { | 56 void PrintTo(const RTCCertificateStats& stats, ::std::ostream* os) { |
57 *os << stats.ToString(); | 57 *os << stats.ToJson(); |
58 } | 58 } |
59 | 59 |
60 void PrintTo(const RTCCodecStats& stats, ::std::ostream* os) { | 60 void PrintTo(const RTCCodecStats& stats, ::std::ostream* os) { |
61 *os << stats.ToString(); | 61 *os << stats.ToJson(); |
62 } | 62 } |
63 | 63 |
64 void PrintTo(const RTCDataChannelStats& stats, ::std::ostream* os) { | 64 void PrintTo(const RTCDataChannelStats& stats, ::std::ostream* os) { |
65 *os << stats.ToString(); | 65 *os << stats.ToJson(); |
66 } | 66 } |
67 | 67 |
68 void PrintTo(const RTCIceCandidatePairStats& stats, ::std::ostream* os) { | 68 void PrintTo(const RTCIceCandidatePairStats& stats, ::std::ostream* os) { |
69 *os << stats.ToString(); | 69 *os << stats.ToJson(); |
70 } | 70 } |
71 | 71 |
72 void PrintTo(const RTCLocalIceCandidateStats& stats, ::std::ostream* os) { | 72 void PrintTo(const RTCLocalIceCandidateStats& stats, ::std::ostream* os) { |
73 *os << stats.ToString(); | 73 *os << stats.ToJson(); |
74 } | 74 } |
75 | 75 |
76 void PrintTo(const RTCRemoteIceCandidateStats& stats, ::std::ostream* os) { | 76 void PrintTo(const RTCRemoteIceCandidateStats& stats, ::std::ostream* os) { |
77 *os << stats.ToString(); | 77 *os << stats.ToJson(); |
78 } | 78 } |
79 | 79 |
80 void PrintTo(const RTCPeerConnectionStats& stats, ::std::ostream* os) { | 80 void PrintTo(const RTCPeerConnectionStats& stats, ::std::ostream* os) { |
81 *os << stats.ToString(); | 81 *os << stats.ToJson(); |
82 } | 82 } |
83 | 83 |
84 void PrintTo(const RTCMediaStreamStats& stats, ::std::ostream* os) { | 84 void PrintTo(const RTCMediaStreamStats& stats, ::std::ostream* os) { |
85 *os << stats.ToString(); | 85 *os << stats.ToJson(); |
86 } | 86 } |
87 | 87 |
88 void PrintTo(const RTCMediaStreamTrackStats& stats, ::std::ostream* os) { | 88 void PrintTo(const RTCMediaStreamTrackStats& stats, ::std::ostream* os) { |
89 *os << stats.ToString(); | 89 *os << stats.ToJson(); |
90 } | 90 } |
91 | 91 |
92 void PrintTo(const RTCInboundRTPStreamStats& stats, ::std::ostream* os) { | 92 void PrintTo(const RTCInboundRTPStreamStats& stats, ::std::ostream* os) { |
93 *os << stats.ToString(); | 93 *os << stats.ToJson(); |
94 } | 94 } |
95 | 95 |
96 void PrintTo(const RTCOutboundRTPStreamStats& stats, ::std::ostream* os) { | 96 void PrintTo(const RTCOutboundRTPStreamStats& stats, ::std::ostream* os) { |
97 *os << stats.ToString(); | 97 *os << stats.ToJson(); |
98 } | 98 } |
99 | 99 |
100 void PrintTo(const RTCTransportStats& stats, ::std::ostream* os) { | 100 void PrintTo(const RTCTransportStats& stats, ::std::ostream* os) { |
101 *os << stats.ToString(); | 101 *os << stats.ToJson(); |
102 } | 102 } |
103 | 103 |
104 namespace { | 104 namespace { |
105 | 105 |
106 const int64_t kGetStatsReportTimeoutMs = 1000; | 106 const int64_t kGetStatsReportTimeoutMs = 1000; |
107 const bool kDefaultRtcpMuxRequired = true; | 107 const bool kDefaultRtcpMuxRequired = true; |
108 const bool kDefaultSrtpRequired = true; | 108 const bool kDefaultSrtpRequired = true; |
109 | 109 |
110 struct CertificateInfo { | 110 struct CertificateInfo { |
111 rtc::scoped_refptr<rtc::RTCCertificate> certificate; | 111 rtc::scoped_refptr<rtc::RTCCertificate> certificate; |
(...skipping 2213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2325 rtc::scoped_refptr<FakeRTCStatsCollector> collector_; | 2325 rtc::scoped_refptr<FakeRTCStatsCollector> collector_; |
2326 }; | 2326 }; |
2327 | 2327 |
2328 TEST_F(RTCStatsCollectorTestWithFakeCollector, ThreadUsageAndResultsMerging) { | 2328 TEST_F(RTCStatsCollectorTestWithFakeCollector, ThreadUsageAndResultsMerging) { |
2329 collector_->VerifyThreadUsageAndResultsMerging(); | 2329 collector_->VerifyThreadUsageAndResultsMerging(); |
2330 } | 2330 } |
2331 | 2331 |
2332 } // namespace | 2332 } // namespace |
2333 | 2333 |
2334 } // namespace webrtc | 2334 } // namespace webrtc |
OLD | NEW |