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

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

Issue 14234023: Remove unused flush operation from Chromium audio. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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
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 <vector> 5 #include <vector>
6 6
7 #include "base/at_exit.h" 7 #include "base/at_exit.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/process_util.h" 9 #include "base/process_util.h"
10 #include "base/shared_memory.h" 10 #include "base/shared_memory.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 51
52 MOCK_METHOD1(AddDelegate, int(AudioOutputIPCDelegate* delegate)); 52 MOCK_METHOD1(AddDelegate, int(AudioOutputIPCDelegate* delegate));
53 MOCK_METHOD1(RemoveDelegate, void(int stream_id)); 53 MOCK_METHOD1(RemoveDelegate, void(int stream_id));
54 54
55 MOCK_METHOD2(CreateStream, 55 MOCK_METHOD2(CreateStream,
56 void(int stream_id, const AudioParameters& params)); 56 void(int stream_id, const AudioParameters& params));
57 MOCK_METHOD1(PlayStream, void(int stream_id)); 57 MOCK_METHOD1(PlayStream, void(int stream_id));
58 MOCK_METHOD1(CloseStream, void(int stream_id)); 58 MOCK_METHOD1(CloseStream, void(int stream_id));
59 MOCK_METHOD2(SetVolume, void(int stream_id, double volume)); 59 MOCK_METHOD2(SetVolume, void(int stream_id, double volume));
60 MOCK_METHOD1(PauseStream, void(int stream_id)); 60 MOCK_METHOD1(PauseStream, void(int stream_id));
61 MOCK_METHOD1(FlushStream, void(int stream_id));
62 }; 61 };
63 62
64 // Creates a copy of a SyncSocket handle that we can give to AudioOutputDevice. 63 // Creates a copy of a SyncSocket handle that we can give to AudioOutputDevice.
65 // On Windows this means duplicating the pipe handle so that AudioOutputDevice 64 // On Windows this means duplicating the pipe handle so that AudioOutputDevice
66 // can call CloseHandle() (since ownership has been transferred), but on other 65 // can call CloseHandle() (since ownership has been transferred), but on other
67 // platforms, we just copy the same socket handle since AudioOutputDevice on 66 // platforms, we just copy the same socket handle since AudioOutputDevice on
68 // those platforms won't actually own the socket (FileDescriptor.auto_close is 67 // those platforms won't actually own the socket (FileDescriptor.auto_close is
69 // false). 68 // false).
70 bool DuplicateSocketHandle(SyncSocket::Handle socket_handle, 69 bool DuplicateSocketHandle(SyncSocket::Handle socket_handle,
71 SyncSocket::Handle* copy) { 70 SyncSocket::Handle* copy) {
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 ExpectRenderCallback(); 288 ExpectRenderCallback();
290 CreateStream(); 289 CreateStream();
291 WaitUntilRenderCallback(); 290 WaitUntilRenderCallback();
292 StopAudioDevice(); 291 StopAudioDevice();
293 } 292 }
294 293
295 INSTANTIATE_TEST_CASE_P(Render, AudioOutputDeviceTest, Values(false)); 294 INSTANTIATE_TEST_CASE_P(Render, AudioOutputDeviceTest, Values(false));
296 INSTANTIATE_TEST_CASE_P(RenderIO, AudioOutputDeviceTest, Values(true)); 295 INSTANTIATE_TEST_CASE_P(RenderIO, AudioOutputDeviceTest, Values(true));
297 296
298 } // namespace media. 297 } // namespace media.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698