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

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

Issue 9965076: Revert 130180 - Move media/audio files into media namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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 | Annotate | Revision Log
« no previous file with comments | « media/audio/linux/alsa_output.cc ('k') | media/audio/linux/alsa_util.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/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
34 class MockAlsaWrapper : public AlsaWrapper { 32 class MockAlsaWrapper : public AlsaWrapper {
35 public: 33 public:
36 MOCK_METHOD3(DeviceNameHint, int(int card, 34 MOCK_METHOD3(DeviceNameHint, int(int card,
37 const char* iface, 35 const char* iface,
38 void*** hints)); 36 void*** hints));
39 MOCK_METHOD2(DeviceNameGetHint, char*(const void* hint, const char* id)); 37 MOCK_METHOD2(DeviceNameGetHint, char*(const void* hint, const char* id));
40 MOCK_METHOD1(DeviceNameFreeHint, int(void** hints)); 38 MOCK_METHOD1(DeviceNameFreeHint, int(void** hints));
41 39
42 MOCK_METHOD4(PcmOpen, int(snd_pcm_t** handle, const char* name, 40 MOCK_METHOD4(PcmOpen, int(snd_pcm_t** handle, const char* name,
43 snd_pcm_stream_t stream, int mode)); 41 snd_pcm_stream_t stream, int mode));
(...skipping 775 matching lines...) Expand 10 before | Expand all | Expand 10 after
819 test_stream->stop_stream_ = true; 817 test_stream->stop_stream_ = true;
820 test_stream->ScheduleNextWrite(true); 818 test_stream->ScheduleNextWrite(true);
821 819
822 // TODO(ajwong): Find a way to test whether or not another task has been 820 // TODO(ajwong): Find a way to test whether or not another task has been
823 // posted so we can verify that the Alsa code will indeed break the task 821 // posted so we can verify that the Alsa code will indeed break the task
824 // posting loop. 822 // posting loop.
825 823
826 test_stream->TransitionTo(AlsaPcmOutputStream::kIsClosed); 824 test_stream->TransitionTo(AlsaPcmOutputStream::kIsClosed);
827 test_stream->Close(); 825 test_stream->Close();
828 } 826 }
829
830 } // namespace media
OLDNEW
« no previous file with comments | « media/audio/linux/alsa_output.cc ('k') | media/audio/linux/alsa_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698