| OLD | NEW |
| 1 /* | 1 /* |
| 2 * libjingle | 2 * libjingle |
| 3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 Google Inc. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
| 9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 static const char kStream1[] = "stream1"; | 164 static const char kStream1[] = "stream1"; |
| 165 static const char kVideoTrack1[] = "video1"; | 165 static const char kVideoTrack1[] = "video1"; |
| 166 static const char kAudioTrack1[] = "audio1"; | 166 static const char kAudioTrack1[] = "audio1"; |
| 167 | 167 |
| 168 static const char kStream2[] = "stream2"; | 168 static const char kStream2[] = "stream2"; |
| 169 static const char kVideoTrack2[] = "video2"; | 169 static const char kVideoTrack2[] = "video2"; |
| 170 static const char kAudioTrack2[] = "audio2"; | 170 static const char kAudioTrack2[] = "audio2"; |
| 171 | 171 |
| 172 enum RTCCertificateGenerationMethod { ALREADY_GENERATED, DTLS_IDENTITY_STORE }; | 172 enum RTCCertificateGenerationMethod { ALREADY_GENERATED, DTLS_IDENTITY_STORE }; |
| 173 | 173 |
| 174 // Add some extra |newlines| to the |message| after |line|. | |
| 175 static void InjectAfter(const std::string& line, | |
| 176 const std::string& newlines, | |
| 177 std::string* message) { | |
| 178 const std::string tmp = line + newlines; | |
| 179 rtc::replace_substrs(line.c_str(), line.length(), tmp.c_str(), tmp.length(), | |
| 180 message); | |
| 181 } | |
| 182 | |
| 183 class MockIceObserver : public webrtc::IceObserver { | 174 class MockIceObserver : public webrtc::IceObserver { |
| 184 public: | 175 public: |
| 185 MockIceObserver() | 176 MockIceObserver() |
| 186 : oncandidatesready_(false), | 177 : oncandidatesready_(false), |
| 187 ice_connection_state_(PeerConnectionInterface::kIceConnectionNew), | 178 ice_connection_state_(PeerConnectionInterface::kIceConnectionNew), |
| 188 ice_gathering_state_(PeerConnectionInterface::kIceGatheringNew) { | 179 ice_gathering_state_(PeerConnectionInterface::kIceGatheringNew) { |
| 189 } | 180 } |
| 190 | 181 |
| 191 virtual void OnIceConnectionChange( | 182 virtual void OnIceConnectionChange( |
| 192 PeerConnectionInterface::IceConnectionState new_state) { | 183 PeerConnectionInterface::IceConnectionState new_state) { |
| (...skipping 4065 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4258 } | 4249 } |
| 4259 | 4250 |
| 4260 // TODO(bemasc): Add a TestIceStatesBundle with BUNDLE enabled. That test | 4251 // TODO(bemasc): Add a TestIceStatesBundle with BUNDLE enabled. That test |
| 4261 // currently fails because upon disconnection and reconnection OnIceComplete is | 4252 // currently fails because upon disconnection and reconnection OnIceComplete is |
| 4262 // called more than once without returning to IceGatheringGathering. | 4253 // called more than once without returning to IceGatheringGathering. |
| 4263 | 4254 |
| 4264 INSTANTIATE_TEST_CASE_P(WebRtcSessionTests, | 4255 INSTANTIATE_TEST_CASE_P(WebRtcSessionTests, |
| 4265 WebRtcSessionTest, | 4256 WebRtcSessionTest, |
| 4266 testing::Values(ALREADY_GENERATED, | 4257 testing::Values(ALREADY_GENERATED, |
| 4267 DTLS_IDENTITY_STORE)); | 4258 DTLS_IDENTITY_STORE)); |
| OLD | NEW |