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

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

Issue 1362093002: Re-land: Add localized default audio device names. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Exclude media_resource_provider on iOS. Created 5 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
« no previous file with comments | « media/audio/audio_manager_unittest.cc ('k') | media/audio/cras/audio_manager_cras.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 "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 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 210
211 void SwitchDevice(bool diverting) { 211 void SwitchDevice(bool diverting) {
212 if (!diverting) { 212 if (!diverting) {
213 // Expect the current stream to close and a new stream to start 213 // Expect the current stream to close and a new stream to start
214 // playing if not diverting. When diverting, nothing happens 214 // playing if not diverting. When diverting, nothing happens
215 // until diverting is stopped. 215 // until diverting is stopped.
216 EXPECT_CALL(mock_event_handler_, OnPlaying()) 216 EXPECT_CALL(mock_event_handler_, OnPlaying())
217 .WillOnce(SignalEvent(&play_event_)); 217 .WillOnce(SignalEvent(&play_event_));
218 } 218 }
219 219
220 controller_->SwitchOutputDevice(AudioManagerBase::kDefaultDeviceName, 220 controller_->SwitchOutputDevice(AudioManager::GetDefaultDeviceName(),
221 base::Bind(&base::DoNothing)); 221 base::Bind(&base::DoNothing));
222 } 222 }
223 223
224 void Close() { 224 void Close() {
225 EXPECT_CALL(mock_sync_reader_, Close()); 225 EXPECT_CALL(mock_sync_reader_, Close());
226 226
227 controller_->Close(base::MessageLoop::QuitClosure()); 227 controller_->Close(base::MessageLoop::QuitClosure());
228 base::MessageLoop::current()->Run(); 228 base::MessageLoop::current()->Run();
229 } 229 }
230 230
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 403
404 TEST_F(AudioOutputControllerTest, DivertRevertClose) { 404 TEST_F(AudioOutputControllerTest, DivertRevertClose) {
405 Create(kSamplesPerPacket); 405 Create(kSamplesPerPacket);
406 WaitForCreate(); 406 WaitForCreate();
407 DivertNeverPlaying(); 407 DivertNeverPlaying();
408 RevertWasNotPlaying(); 408 RevertWasNotPlaying();
409 Close(); 409 Close();
410 } 410 }
411 411
412 } // namespace media 412 } // namespace media
OLDNEW
« no previous file with comments | « media/audio/audio_manager_unittest.cc ('k') | media/audio/cras/audio_manager_cras.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698