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

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

Issue 1769933002: Looking up device id by session id for AudioRendererMixerInput (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comment and bug ref to remove AudioManagerBase dependency Created 4 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
« no previous file with comments | « media/audio/audio_output_device.cc ('k') | media/audio/audio_output_ipc.h » ('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 <stdint.h> 5 #include <stdint.h>
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/at_exit.h" 9 #include "base/at_exit.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 157
158 audio_device_->Initialize(default_audio_parameters_, 158 audio_device_->Initialize(default_audio_parameters_,
159 &callback_); 159 &callback_);
160 } 160 }
161 161
162 void AudioOutputDeviceTest::ReceiveAuthorization(OutputDeviceStatus status) { 162 void AudioOutputDeviceTest::ReceiveAuthorization(OutputDeviceStatus status) {
163 device_status_ = status; 163 device_status_ = status;
164 if (device_status_ != OUTPUT_DEVICE_STATUS_OK) 164 if (device_status_ != OUTPUT_DEVICE_STATUS_OK)
165 EXPECT_CALL(*audio_output_ipc_, CloseStream()); 165 EXPECT_CALL(*audio_output_ipc_, CloseStream());
166 166
167 audio_device_->OnDeviceAuthorized(device_status_, default_audio_parameters_); 167 audio_device_->OnDeviceAuthorized(device_status_, default_audio_parameters_,
168 kDefaultDeviceId);
168 io_loop_.RunUntilIdle(); 169 io_loop_.RunUntilIdle();
169 } 170 }
170 171
171 void AudioOutputDeviceTest::StartAudioDevice() { 172 void AudioOutputDeviceTest::StartAudioDevice() {
172 if (device_status_ == OUTPUT_DEVICE_STATUS_OK) 173 if (device_status_ == OUTPUT_DEVICE_STATUS_OK)
173 EXPECT_CALL(*audio_output_ipc_, CreateStream(audio_device_.get(), _)); 174 EXPECT_CALL(*audio_output_ipc_, CreateStream(audio_device_.get(), _));
174 else 175 else
175 EXPECT_CALL(callback_, OnRenderError()); 176 EXPECT_CALL(callback_, OnRenderError());
176 177
177 audio_device_->Start(); 178 audio_device_->Start();
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 313
313 TEST_P(AudioOutputDeviceTest, UnauthorizedDevice) { 314 TEST_P(AudioOutputDeviceTest, UnauthorizedDevice) {
314 SetDevice(kUnauthorizedDeviceId); 315 SetDevice(kUnauthorizedDeviceId);
315 StartAudioDevice(); 316 StartAudioDevice();
316 StopAudioDevice(); 317 StopAudioDevice();
317 } 318 }
318 319
319 INSTANTIATE_TEST_CASE_P(Render, AudioOutputDeviceTest, Values(false)); 320 INSTANTIATE_TEST_CASE_P(Render, AudioOutputDeviceTest, Values(false));
320 321
321 } // namespace media. 322 } // namespace media.
OLDNEW
« no previous file with comments | « media/audio/audio_output_device.cc ('k') | media/audio/audio_output_ipc.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698