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

Side by Side Diff: media/audio/linux/alsa_output_unittest.cc

Issue 9805001: Move media/audio files into media namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix various compiler errors Created 8 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 | Annotate | Revision Log
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/message_loop.h" 5 #include "base/message_loop.h"
6 #include "base/stringprintf.h" 6 #include "base/stringprintf.h"
7 #include "media/audio/linux/alsa_output.h" 7 #include "media/audio/linux/alsa_output.h"
8 #include "media/audio/linux/alsa_wrapper.h" 8 #include "media/audio/linux/alsa_wrapper.h"
9 #include "media/audio/linux/audio_manager_linux.h" 9 #include "media/audio/linux/audio_manager_linux.h"
10 #include "media/base/data_buffer.h" 10 #include "media/base/data_buffer.h"
(...skipping 11 matching lines...) Expand all
22 using testing::Invoke; 22 using testing::Invoke;
23 using testing::InvokeWithoutArgs; 23 using testing::InvokeWithoutArgs;
24 using testing::Mock; 24 using testing::Mock;
25 using testing::MockFunction; 25 using testing::MockFunction;
26 using testing::Return; 26 using testing::Return;
27 using testing::SetArgumentPointee; 27 using testing::SetArgumentPointee;
28 using testing::StrictMock; 28 using testing::StrictMock;
29 using testing::StrEq; 29 using testing::StrEq;
30 using testing::Unused; 30 using testing::Unused;
31 31
32 namespace media {
33
32 class MockAlsaWrapper : public AlsaWrapper { 34 class MockAlsaWrapper : public AlsaWrapper {
33 public: 35 public:
34 MOCK_METHOD3(DeviceNameHint, int(int card, 36 MOCK_METHOD3(DeviceNameHint, int(int card,
35 const char* iface, 37 const char* iface,
36 void*** hints)); 38 void*** hints));
37 MOCK_METHOD2(DeviceNameGetHint, char*(const void* hint, const char* id)); 39 MOCK_METHOD2(DeviceNameGetHint, char*(const void* hint, const char* id));
38 MOCK_METHOD1(DeviceNameFreeHint, int(void** hints)); 40 MOCK_METHOD1(DeviceNameFreeHint, int(void** hints));
39 41
40 MOCK_METHOD4(PcmOpen, int(snd_pcm_t** handle, const char* name, 42 MOCK_METHOD4(PcmOpen, int(snd_pcm_t** handle, const char* name,
41 snd_pcm_stream_t stream, int mode)); 43 snd_pcm_stream_t stream, int mode));
(...skipping 775 matching lines...) Expand 10 before | Expand all | Expand 10 after
817 test_stream->stop_stream_ = true; 819 test_stream->stop_stream_ = true;
818 test_stream->ScheduleNextWrite(true); 820 test_stream->ScheduleNextWrite(true);
819 821
820 // TODO(ajwong): Find a way to test whether or not another task has been 822 // TODO(ajwong): Find a way to test whether or not another task has been
821 // posted so we can verify that the Alsa code will indeed break the task 823 // posted so we can verify that the Alsa code will indeed break the task
822 // posting loop. 824 // posting loop.
823 825
824 test_stream->TransitionTo(AlsaPcmOutputStream::kIsClosed); 826 test_stream->TransitionTo(AlsaPcmOutputStream::kIsClosed);
825 test_stream->Close(); 827 test_stream->Close();
826 } 828 }
829
830 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698