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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 class MockIceObserver : public webrtc::IceObserver { | 150 class MockIceObserver : public webrtc::IceObserver { |
151 public: | 151 public: |
152 MockIceObserver() | 152 MockIceObserver() |
153 : oncandidatesready_(false), | 153 : oncandidatesready_(false), |
154 ice_connection_state_(PeerConnectionInterface::kIceConnectionNew), | 154 ice_connection_state_(PeerConnectionInterface::kIceConnectionNew), |
155 ice_gathering_state_(PeerConnectionInterface::kIceGatheringNew) { | 155 ice_gathering_state_(PeerConnectionInterface::kIceGatheringNew) { |
156 } | 156 } |
157 | 157 |
158 virtual ~MockIceObserver() = default; | 158 virtual ~MockIceObserver() = default; |
159 | 159 |
160 void OnIceConnectionChange( | 160 void OnIceConnectionStateChange( |
161 PeerConnectionInterface::IceConnectionState new_state) override { | 161 PeerConnectionInterface::IceConnectionState new_state) override { |
162 ice_connection_state_ = new_state; | 162 ice_connection_state_ = new_state; |
163 ice_connection_state_history_.push_back(new_state); | 163 ice_connection_state_history_.push_back(new_state); |
164 } | 164 } |
165 void OnIceGatheringChange( | 165 void OnIceGatheringChange( |
166 PeerConnectionInterface::IceGatheringState new_state) override { | 166 PeerConnectionInterface::IceGatheringState new_state) override { |
167 // We can never transition back to "new". | 167 // We can never transition back to "new". |
168 EXPECT_NE(PeerConnectionInterface::kIceGatheringNew, new_state); | 168 EXPECT_NE(PeerConnectionInterface::kIceGatheringNew, new_state); |
169 ice_gathering_state_ = new_state; | 169 ice_gathering_state_ = new_state; |
170 oncandidatesready_ = | 170 oncandidatesready_ = |
(...skipping 4171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4342 } | 4342 } |
4343 | 4343 |
4344 // TODO(bemasc): Add a TestIceStatesBundle with BUNDLE enabled. That test | 4344 // TODO(bemasc): Add a TestIceStatesBundle with BUNDLE enabled. That test |
4345 // currently fails because upon disconnection and reconnection OnIceComplete is | 4345 // currently fails because upon disconnection and reconnection OnIceComplete is |
4346 // called more than once without returning to IceGatheringGathering. | 4346 // called more than once without returning to IceGatheringGathering. |
4347 | 4347 |
4348 INSTANTIATE_TEST_CASE_P(WebRtcSessionTests, | 4348 INSTANTIATE_TEST_CASE_P(WebRtcSessionTests, |
4349 WebRtcSessionTest, | 4349 WebRtcSessionTest, |
4350 testing::Values(ALREADY_GENERATED, | 4350 testing::Values(ALREADY_GENERATED, |
4351 DTLS_IDENTITY_STORE)); | 4351 DTLS_IDENTITY_STORE)); |
OLD | NEW |