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

Side by Side Diff: media/audio/mac/audio_auhal_mac_unittest.cc

Issue 163343002: Reland 153623004: Remove the unified IO code on the browser (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: fixed the cras bot Created 6 years, 10 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/mac/aggregate_device_manager.cc ('k') | media/audio/mac/audio_manager_mac.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/memory/scoped_ptr.h" 6 #include "base/memory/scoped_ptr.h"
7 #include "base/message_loop/message_loop.h" 7 #include "base/message_loop/message_loop.h"
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "base/synchronization/waitable_event.h" 9 #include "base/synchronization/waitable_event.h"
10 #include "media/audio/audio_io.h" 10 #include "media/audio/audio_io.h"
(...skipping 27 matching lines...) Expand all
38 // Wait for the AudioManager to finish any initialization on the audio loop. 38 // Wait for the AudioManager to finish any initialization on the audio loop.
39 base::RunLoop().RunUntilIdle(); 39 base::RunLoop().RunUntilIdle();
40 } 40 }
41 41
42 virtual ~AUHALStreamTest() { 42 virtual ~AUHALStreamTest() {
43 base::RunLoop().RunUntilIdle(); 43 base::RunLoop().RunUntilIdle();
44 } 44 }
45 45
46 AudioOutputStream* Create() { 46 AudioOutputStream* Create() {
47 return manager_->MakeAudioOutputStream( 47 return manager_->MakeAudioOutputStream(
48 manager_->GetDefaultOutputStreamParameters(), "", ""); 48 manager_->GetDefaultOutputStreamParameters(), "");
49 } 49 }
50 50
51 bool CanRunAudioTests() { 51 bool CanRunAudioTests() {
52 return manager_->HasAudioOutputDevices(); 52 return manager_->HasAudioOutputDevices();
53 } 53 }
54 54
55 protected: 55 protected:
56 base::MessageLoop message_loop_; 56 base::MessageLoop message_loop_;
57 scoped_ptr<AudioManager> manager_; 57 scoped_ptr<AudioManager> manager_;
58 MockAudioSourceCallback source_; 58 MockAudioSourceCallback source_;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 .WillOnce(DoAll(ZeroBuffer(), SignalEvent(&event), Return(0))); 97 .WillOnce(DoAll(ZeroBuffer(), SignalEvent(&event), Return(0)));
98 EXPECT_CALL(source_, OnError(_)).Times(0); 98 EXPECT_CALL(source_, OnError(_)).Times(0);
99 stream->Start(&source_); 99 stream->Start(&source_);
100 event.Wait(); 100 event.Wait();
101 101
102 stream->Stop(); 102 stream->Stop();
103 stream->Close(); 103 stream->Close();
104 } 104 }
105 105
106 } // namespace media 106 } // namespace media
OLDNEW
« no previous file with comments | « media/audio/mac/aggregate_device_manager.cc ('k') | media/audio/mac/audio_manager_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698