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

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

Issue 24514003: Make BrowserMessageFilter not derive from IPC::ChannelProxy::MessageFilter. This allows us to hide … (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync Created 7 years, 2 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/environment.h" 6 #include "base/environment.h"
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/sync_socket.h" 9 #include "base/sync_socket.h"
10 #include "content/browser/browser_thread_impl.h" 10 #include "content/browser/browser_thread_impl.h"
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 message_loop_.get())); 172 message_loop_.get()));
173 audio_manager_.reset(media::AudioManager::Create()); 173 audio_manager_.reset(media::AudioManager::Create());
174 media_stream_manager_.reset(new MediaStreamManager(audio_manager_.get())); 174 media_stream_manager_.reset(new MediaStreamManager(audio_manager_.get()));
175 media_stream_manager_->UseFakeDevice(); 175 media_stream_manager_->UseFakeDevice();
176 observer_.reset(new MockMediaInternals()); 176 observer_.reset(new MockMediaInternals());
177 host_ = new MockAudioRendererHost( 177 host_ = new MockAudioRendererHost(
178 audio_manager_.get(), &mirroring_manager_, observer_.get(), 178 audio_manager_.get(), &mirroring_manager_, observer_.get(),
179 media_stream_manager_.get()); 179 media_stream_manager_.get());
180 180
181 // Simulate IPC channel connected. 181 // Simulate IPC channel connected.
182 host_->OnChannelConnected(base::GetCurrentProcId()); 182 host_->set_peer_pid_for_testing(base::GetCurrentProcId());
183 } 183 }
184 184
185 virtual void TearDown() { 185 virtual void TearDown() {
186 // Simulate closing the IPC channel. 186 // Simulate closing the IPC channel.
187 host_->OnChannelClosing(); 187 host_->OnChannelClosing();
188 188
189 // Release the reference to the mock object. The object will be destructed 189 // Release the reference to the mock object. The object will be destructed
190 // on message_loop_. 190 // on message_loop_.
191 host_ = NULL; 191 host_ = NULL;
192 192
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 } 412 }
413 413
414 TEST_F(AudioRendererHostTest, CreateUnifiedStreamAndClose) { 414 TEST_F(AudioRendererHostTest, CreateUnifiedStreamAndClose) {
415 Create(true); 415 Create(true);
416 Close(); 416 Close();
417 } 417 }
418 418
419 // TODO(hclam): Add tests for data conversation in low latency mode. 419 // TODO(hclam): Add tests for data conversation in low latency mode.
420 420
421 } // namespace content 421 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698