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

Side by Side Diff: media/audio/audio_output_controller_unittest.cc

Issue 16297002: Update media/ to use scoped_refptr<T>::get() rather than 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
« no previous file with comments | « media/audio/audio_output_controller.cc ('k') | media/audio/audio_output_proxy_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/bind.h" 6 #include "base/bind.h"
7 #include "base/environment.h" 7 #include "base/environment.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 kSampleRate, kBitsPerSample, samples_per_packet); 117 kSampleRate, kBitsPerSample, samples_per_packet);
118 118
119 if (params_.IsValid()) { 119 if (params_.IsValid()) {
120 EXPECT_CALL(mock_event_handler_, OnCreated()) 120 EXPECT_CALL(mock_event_handler_, OnCreated())
121 .WillOnce(SignalEvent(&create_event_)); 121 .WillOnce(SignalEvent(&create_event_));
122 } 122 }
123 123
124 controller_ = AudioOutputController::Create( 124 controller_ = AudioOutputController::Create(
125 audio_manager_.get(), &mock_event_handler_, params_, 125 audio_manager_.get(), &mock_event_handler_, params_,
126 &mock_sync_reader_); 126 &mock_sync_reader_);
127 if (controller_) 127 if (controller_.get())
128 controller_->SetVolume(kTestVolume); 128 controller_->SetVolume(kTestVolume);
129 129
130 EXPECT_EQ(params_.IsValid(), controller_ != NULL); 130 EXPECT_EQ(params_.IsValid(), controller_.get() != NULL);
131 } 131 }
132 132
133 void Play() { 133 void Play() {
134 // Expect the event handler to receive one OnPlaying() call and one or more 134 // Expect the event handler to receive one OnPlaying() call and one or more
135 // OnAudible() calls. 135 // OnAudible() calls.
136 EXPECT_CALL(mock_event_handler_, OnPlaying()) 136 EXPECT_CALL(mock_event_handler_, OnPlaying())
137 .WillOnce(SignalEvent(&play_event_)); 137 .WillOnce(SignalEvent(&play_event_));
138 EXPECT_CALL(mock_event_handler_, OnAudible(_)) 138 EXPECT_CALL(mock_event_handler_, OnAudible(_))
139 .Times(AtLeast(1)); 139 .Times(AtLeast(1));
140 140
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 374
375 TEST_F(AudioOutputControllerTest, DivertRevertClose) { 375 TEST_F(AudioOutputControllerTest, DivertRevertClose) {
376 Create(kSamplesPerPacket); 376 Create(kSamplesPerPacket);
377 WaitForCreate(); 377 WaitForCreate();
378 DivertNeverPlaying(); 378 DivertNeverPlaying();
379 RevertWasNotPlaying(); 379 RevertWasNotPlaying();
380 Close(); 380 Close();
381 } 381 }
382 382
383 } // namespace media 383 } // namespace media
OLDNEW
« no previous file with comments | « media/audio/audio_output_controller.cc ('k') | media/audio/audio_output_proxy_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698