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

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

Issue 15984016: Call scoped_refptr<T>::get() rather than relying on implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 6 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.h" 8 #include "base/message_loop.h"
9 #include "base/process_util.h" 9 #include "base/process_util.h"
10 #include "base/sync_socket.h" 10 #include "base/sync_socket.h"
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 EXPECT_CALL(*observer_, 238 EXPECT_CALL(*observer_,
239 OnSetAudioStreamStatus(_, kStreamId, "closed")); 239 OnSetAudioStreamStatus(_, kStreamId, "closed"));
240 240
241 // Expect the audio stream will be deleted at some later point. 241 // Expect the audio stream will be deleted at some later point.
242 EXPECT_CALL(*observer_, OnDeleteAudioStream(_, kStreamId)); 242 EXPECT_CALL(*observer_, OnDeleteAudioStream(_, kStreamId));
243 } 243 }
244 244
245 void CreateUnifiedStream() { 245 void CreateUnifiedStream() {
246 EXPECT_CALL(*observer_, 246 EXPECT_CALL(*observer_,
247 OnSetAudioStreamStatus(_, kStreamId, "created")); 247 OnSetAudioStreamStatus(_, kStreamId, "created"));
248 EXPECT_CALL(*host_, OnStreamCreated(kStreamId, _)) 248 EXPECT_CALL(*host_.get(), OnStreamCreated(kStreamId, _))
249 .WillOnce(QuitMessageLoop(message_loop_.get())); 249 .WillOnce(QuitMessageLoop(message_loop_.get()));
250 EXPECT_CALL(mirroring_manager_, 250 EXPECT_CALL(mirroring_manager_,
251 AddDiverter(kRenderProcessId, kRenderViewId, NotNull())) 251 AddDiverter(kRenderProcessId, kRenderViewId, NotNull()))
252 .RetiresOnSaturation(); 252 .RetiresOnSaturation();
253 // Send a create stream message to the audio output stream and wait until 253 // Send a create stream message to the audio output stream and wait until
254 // we receive the created message. 254 // we receive the created message.
255 // Use AudioInputDeviceManager::kFakeOpenSessionId as the session id to 255 // Use AudioInputDeviceManager::kFakeOpenSessionId as the session id to
256 // pass the permission check. 256 // pass the permission check.
257 host_->OnCreateStream(kStreamId, 257 host_->OnCreateStream(kStreamId,
258 kRenderViewId, 258 kRenderViewId,
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 } 431 }
432 432
433 TEST_F(AudioRendererHostTest, CreateUnifiedStreamAndClose) { 433 TEST_F(AudioRendererHostTest, CreateUnifiedStreamAndClose) {
434 CreateUnifiedStream(); 434 CreateUnifiedStream();
435 Close(); 435 Close();
436 } 436 }
437 437
438 // TODO(hclam): Add tests for data conversation in low latency mode. 438 // TODO(hclam): Add tests for data conversation in low latency mode.
439 439
440 } // namespace content 440 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698