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

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

Issue 1780333007: AudioManagerBase: Create and run the audio thread lazily. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: fixed media unittests on mac Created 4 years, 9 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_base.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 (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 <string> 7 #include <string>
8 8
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 MOCK_METHOD0(GetAudioInputDeviceModel, base::string16()); 97 MOCK_METHOD0(GetAudioInputDeviceModel, base::string16());
98 MOCK_METHOD2(MakeAudioOutputStream, AudioOutputStream*( 98 MOCK_METHOD2(MakeAudioOutputStream, AudioOutputStream*(
99 const AudioParameters& params, 99 const AudioParameters& params,
100 const std::string& device_id)); 100 const std::string& device_id));
101 MOCK_METHOD2(MakeAudioOutputStreamProxy, AudioOutputStream*( 101 MOCK_METHOD2(MakeAudioOutputStreamProxy, AudioOutputStream*(
102 const AudioParameters& params, 102 const AudioParameters& params,
103 const std::string& device_id)); 103 const std::string& device_id));
104 MOCK_METHOD2(MakeAudioInputStream, AudioInputStream*( 104 MOCK_METHOD2(MakeAudioInputStream, AudioInputStream*(
105 const AudioParameters& params, const std::string& device_id)); 105 const AudioParameters& params, const std::string& device_id));
106 MOCK_METHOD0(ShowAudioInputSettings, void()); 106 MOCK_METHOD0(ShowAudioInputSettings, void());
107 MOCK_CONST_METHOD0(GetTaskRunner, 107 MOCK_METHOD0(GetTaskRunner, scoped_refptr<base::SingleThreadTaskRunner>());
108 scoped_refptr<base::SingleThreadTaskRunner>());
109 MOCK_METHOD0(GetWorkerTaskRunner, 108 MOCK_METHOD0(GetWorkerTaskRunner,
110 scoped_refptr<base::SingleThreadTaskRunner>()); 109 scoped_refptr<base::SingleThreadTaskRunner>());
111 MOCK_METHOD1(GetAudioInputDeviceNames, void( 110 MOCK_METHOD1(GetAudioInputDeviceNames, void(
112 media::AudioDeviceNames* device_name)); 111 media::AudioDeviceNames* device_name));
113 112
114 MOCK_METHOD1(MakeLinearOutputStream, AudioOutputStream*( 113 MOCK_METHOD1(MakeLinearOutputStream, AudioOutputStream*(
115 const AudioParameters& params)); 114 const AudioParameters& params));
116 MOCK_METHOD2(MakeLowLatencyOutputStream, AudioOutputStream*( 115 MOCK_METHOD2(MakeLowLatencyOutputStream, AudioOutputStream*(
117 const AudioParameters& params, const std::string& device_id)); 116 const AudioParameters& params, const std::string& device_id));
118 MOCK_METHOD2(MakeLinearInputStream, AudioInputStream*( 117 MOCK_METHOD2(MakeLinearInputStream, AudioInputStream*(
(...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after
727 _)).WillOnce(Return(&real_stream)); 726 _)).WillOnce(Return(&real_stream));
728 727
729 // Stream1 should be able to successfully open and start. 728 // Stream1 should be able to successfully open and start.
730 EXPECT_CALL(real_stream, Open()).WillOnce(Return(true)); 729 EXPECT_CALL(real_stream, Open()).WillOnce(Return(true));
731 proxy = new AudioOutputProxy(resampler_.get()); 730 proxy = new AudioOutputProxy(resampler_.get());
732 EXPECT_TRUE(proxy->Open()); 731 EXPECT_TRUE(proxy->Open());
733 CloseAndWaitForCloseTimer(proxy, &real_stream); 732 CloseAndWaitForCloseTimer(proxy, &real_stream);
734 } 733 }
735 734
736 } // namespace media 735 } // namespace media
OLDNEW
« no previous file with comments | « media/audio/audio_manager_base.cc ('k') | media/audio/mac/audio_manager_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698