Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(724)

Side by Side Diff: content/browser/renderer_host/media/audio_renderer_host_unittest.cc

Issue 235353002: Extract VideoCaptureDeviceFactory out of VideoCaptureDevice and use for File and FakeVCD. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/memory/scoped_ptr.h" 6 #include "base/memory/scoped_ptr.h"
7 #include "base/run_loop.h" 7 #include "base/run_loop.h"
8 #include "base/sync_socket.h" 8 #include "base/sync_socket.h"
9 #include "content/browser/media/capture/audio_mirroring_manager.h" 9 #include "content/browser/media/capture/audio_mirroring_manager.h"
10 #include "content/browser/media/media_internals.h" 10 #include "content/browser/media/media_internals.h"
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 uint32 shared_memory_length_; 150 uint32 shared_memory_length_;
151 151
152 DISALLOW_COPY_AND_ASSIGN(MockAudioRendererHost); 152 DISALLOW_COPY_AND_ASSIGN(MockAudioRendererHost);
153 }; 153 };
154 154
155 class AudioRendererHostTest : public testing::Test { 155 class AudioRendererHostTest : public testing::Test {
156 public: 156 public:
157 AudioRendererHostTest() { 157 AudioRendererHostTest() {
158 audio_manager_.reset(media::AudioManager::CreateForTesting()); 158 audio_manager_.reset(media::AudioManager::CreateForTesting());
159 media_stream_manager_.reset(new MediaStreamManager(audio_manager_.get())); 159 media_stream_manager_.reset(new MediaStreamManager(audio_manager_.get()));
160 media_stream_manager_->UseFakeDevice(); 160 media_stream_manager_->UseFakeAudioDevice();
161 host_ = new MockAudioRendererHost(audio_manager_.get(), 161 host_ = new MockAudioRendererHost(audio_manager_.get(),
162 &mirroring_manager_, 162 &mirroring_manager_,
163 MediaInternals::GetInstance(), 163 MediaInternals::GetInstance(),
164 media_stream_manager_.get()); 164 media_stream_manager_.get());
165 165
166 // Simulate IPC channel connected. 166 // Simulate IPC channel connected.
167 host_->set_peer_pid_for_testing(base::GetCurrentProcId()); 167 host_->set_peer_pid_for_testing(base::GetCurrentProcId());
168 } 168 }
169 169
170 virtual ~AudioRendererHostTest() { 170 virtual ~AudioRendererHostTest() {
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 } 345 }
346 346
347 TEST_F(AudioRendererHostTest, CreateUnifiedStreamAndClose) { 347 TEST_F(AudioRendererHostTest, CreateUnifiedStreamAndClose) {
348 Create(true); 348 Create(true);
349 Close(); 349 Close();
350 } 350 }
351 351
352 // TODO(hclam): Add tests for data conversation in low latency mode. 352 // TODO(hclam): Add tests for data conversation in low latency mode.
353 353
354 } // namespace content 354 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698