| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "base/bind.h" | 5 #include "base/bind.h" |
| 6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
| 7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
| 8 #include "base/run_loop.h" | 8 #include "base/run_loop.h" |
| 9 #include "base/sync_socket.h" | 9 #include "base/sync_socket.h" |
| 10 #include "content/browser/media/capture/audio_mirroring_manager.h" | 10 #include "content/browser/media/capture/audio_mirroring_manager.h" |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 media_stream_manager_.reset(new MediaStreamManager(audio_manager_.get())); | 150 media_stream_manager_.reset(new MediaStreamManager(audio_manager_.get())); |
| 151 host_ = new MockAudioRendererHost(audio_manager_.get(), | 151 host_ = new MockAudioRendererHost(audio_manager_.get(), |
| 152 &mirroring_manager_, | 152 &mirroring_manager_, |
| 153 MediaInternals::GetInstance(), | 153 MediaInternals::GetInstance(), |
| 154 media_stream_manager_.get()); | 154 media_stream_manager_.get()); |
| 155 | 155 |
| 156 // Simulate IPC channel connected. | 156 // Simulate IPC channel connected. |
| 157 host_->set_peer_pid_for_testing(base::GetCurrentProcId()); | 157 host_->set_peer_pid_for_testing(base::GetCurrentProcId()); |
| 158 } | 158 } |
| 159 | 159 |
| 160 virtual ~AudioRendererHostTest() { | 160 ~AudioRendererHostTest() override { |
| 161 // Simulate closing the IPC channel and give the audio thread time to close | 161 // Simulate closing the IPC channel and give the audio thread time to close |
| 162 // the underlying streams. | 162 // the underlying streams. |
| 163 host_->OnChannelClosing(); | 163 host_->OnChannelClosing(); |
| 164 SyncWithAudioThread(); | 164 SyncWithAudioThread(); |
| 165 | 165 |
| 166 // Release the reference to the mock object. The object will be destructed | 166 // Release the reference to the mock object. The object will be destructed |
| 167 // on message_loop_. | 167 // on message_loop_. |
| 168 host_ = NULL; | 168 host_ = NULL; |
| 169 } | 169 } |
| 170 | 170 |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 333 } | 333 } |
| 334 | 334 |
| 335 TEST_F(AudioRendererHostTest, CreateUnifiedStreamAndClose) { | 335 TEST_F(AudioRendererHostTest, CreateUnifiedStreamAndClose) { |
| 336 Create(true); | 336 Create(true); |
| 337 Close(); | 337 Close(); |
| 338 } | 338 } |
| 339 | 339 |
| 340 // TODO(hclam): Add tests for data conversation in low latency mode. | 340 // TODO(hclam): Add tests for data conversation in low latency mode. |
| 341 | 341 |
| 342 } // namespace content | 342 } // namespace content |
| OLD | NEW |