OLD | NEW |
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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 enum RTCCertificateGenerationMethod { ALREADY_GENERATED, DTLS_IDENTITY_STORE }; | 151 enum RTCCertificateGenerationMethod { ALREADY_GENERATED, DTLS_IDENTITY_STORE }; |
152 | 152 |
153 class MockIceObserver : public webrtc::IceObserver { | 153 class MockIceObserver : public webrtc::IceObserver { |
154 public: | 154 public: |
155 MockIceObserver() | 155 MockIceObserver() |
156 : oncandidatesready_(false), | 156 : oncandidatesready_(false), |
157 ice_connection_state_(PeerConnectionInterface::kIceConnectionNew), | 157 ice_connection_state_(PeerConnectionInterface::kIceConnectionNew), |
158 ice_gathering_state_(PeerConnectionInterface::kIceGatheringNew) { | 158 ice_gathering_state_(PeerConnectionInterface::kIceGatheringNew) { |
159 } | 159 } |
160 | 160 |
| 161 virtual ~MockIceObserver() = default; |
| 162 |
161 void OnIceConnectionChange( | 163 void OnIceConnectionChange( |
162 PeerConnectionInterface::IceConnectionState new_state) override { | 164 PeerConnectionInterface::IceConnectionState new_state) override { |
163 ice_connection_state_ = new_state; | 165 ice_connection_state_ = new_state; |
164 } | 166 } |
165 void OnIceGatheringChange( | 167 void OnIceGatheringChange( |
166 PeerConnectionInterface::IceGatheringState new_state) override { | 168 PeerConnectionInterface::IceGatheringState new_state) override { |
167 // We can never transition back to "new". | 169 // We can never transition back to "new". |
168 EXPECT_NE(PeerConnectionInterface::kIceGatheringNew, new_state); | 170 EXPECT_NE(PeerConnectionInterface::kIceGatheringNew, new_state); |
169 ice_gathering_state_ = new_state; | 171 ice_gathering_state_ = new_state; |
170 oncandidatesready_ = | 172 oncandidatesready_ = |
(...skipping 4235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4406 } | 4408 } |
4407 | 4409 |
4408 // TODO(bemasc): Add a TestIceStatesBundle with BUNDLE enabled. That test | 4410 // TODO(bemasc): Add a TestIceStatesBundle with BUNDLE enabled. That test |
4409 // currently fails because upon disconnection and reconnection OnIceComplete is | 4411 // currently fails because upon disconnection and reconnection OnIceComplete is |
4410 // called more than once without returning to IceGatheringGathering. | 4412 // called more than once without returning to IceGatheringGathering. |
4411 | 4413 |
4412 INSTANTIATE_TEST_CASE_P(WebRtcSessionTests, | 4414 INSTANTIATE_TEST_CASE_P(WebRtcSessionTests, |
4413 WebRtcSessionTest, | 4415 WebRtcSessionTest, |
4414 testing::Values(ALREADY_GENERATED, | 4416 testing::Values(ALREADY_GENERATED, |
4415 DTLS_IDENTITY_STORE)); | 4417 DTLS_IDENTITY_STORE)); |
OLD | NEW |