| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2015 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 const int kTelephoneEventPayloadType = 123; | 48 const int kTelephoneEventPayloadType = 123; |
| 49 const uint8_t kTelephoneEventCode = 45; | 49 const uint8_t kTelephoneEventCode = 45; |
| 50 const uint32_t kTelephoneEventDuration = 6789; | 50 const uint32_t kTelephoneEventDuration = 6789; |
| 51 | 51 |
| 52 struct ConfigHelper { | 52 struct ConfigHelper { |
| 53 ConfigHelper() | 53 ConfigHelper() |
| 54 : simulated_clock_(123456), | 54 : simulated_clock_(123456), |
| 55 stream_config_(nullptr), | 55 stream_config_(nullptr), |
| 56 congestion_controller_(&simulated_clock_, | 56 congestion_controller_(&simulated_clock_, |
| 57 &bitrate_observer_, | 57 &bitrate_observer_, |
| 58 &remote_bitrate_observer_) { | 58 &remote_bitrate_observer_, |
| 59 nullptr) { |
| 59 using testing::Invoke; | 60 using testing::Invoke; |
| 60 using testing::StrEq; | 61 using testing::StrEq; |
| 61 | 62 |
| 62 EXPECT_CALL(voice_engine_, | 63 EXPECT_CALL(voice_engine_, |
| 63 RegisterVoiceEngineObserver(_)).WillOnce(Return(0)); | 64 RegisterVoiceEngineObserver(_)).WillOnce(Return(0)); |
| 64 EXPECT_CALL(voice_engine_, | 65 EXPECT_CALL(voice_engine_, |
| 65 DeRegisterVoiceEngineObserver()).WillOnce(Return(0)); | 66 DeRegisterVoiceEngineObserver()).WillOnce(Return(0)); |
| 66 AudioState::Config config; | 67 AudioState::Config config; |
| 67 config.voice_engine = &voice_engine_; | 68 config.voice_engine = &voice_engine_; |
| 68 audio_state_ = AudioState::Create(config); | 69 audio_state_ = AudioState::Create(config); |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 static_cast<internal::AudioState*>(helper.audio_state().get()); | 235 static_cast<internal::AudioState*>(helper.audio_state().get()); |
| 235 VoiceEngineObserver* voe_observer = | 236 VoiceEngineObserver* voe_observer = |
| 236 static_cast<VoiceEngineObserver*>(internal_audio_state); | 237 static_cast<VoiceEngineObserver*>(internal_audio_state); |
| 237 voe_observer->CallbackOnError(-1, VE_TYPING_NOISE_WARNING); | 238 voe_observer->CallbackOnError(-1, VE_TYPING_NOISE_WARNING); |
| 238 EXPECT_TRUE(send_stream.GetStats().typing_noise_detected); | 239 EXPECT_TRUE(send_stream.GetStats().typing_noise_detected); |
| 239 voe_observer->CallbackOnError(-1, VE_TYPING_NOISE_OFF_WARNING); | 240 voe_observer->CallbackOnError(-1, VE_TYPING_NOISE_OFF_WARNING); |
| 240 EXPECT_FALSE(send_stream.GetStats().typing_noise_detected); | 241 EXPECT_FALSE(send_stream.GetStats().typing_noise_detected); |
| 241 } | 242 } |
| 242 } // namespace test | 243 } // namespace test |
| 243 } // namespace webrtc | 244 } // namespace webrtc |
| OLD | NEW |