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

Side by Side Diff: content/browser/renderer_host/media/audio_renderer_host_unittest.cc

Issue 1175003004: Change audio IPC enums from kConstantStyle to MACRO_STYLE (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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
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/bind.h" 5 #include "base/bind.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "base/sync_socket.h" 9 #include "base/sync_socket.h"
10 #include "content/browser/media/capture/audio_mirroring_manager.h" 10 #include "content/browser/media/capture/audio_mirroring_manager.h"
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 // Create the SyncSocket using the handle. 109 // Create the SyncSocket using the handle.
110 base::SyncSocket::Handle sync_socket_handle = 110 base::SyncSocket::Handle sync_socket_handle =
111 base::SyncSocket::UnwrapHandle(socket_descriptor); 111 base::SyncSocket::UnwrapHandle(socket_descriptor);
112 sync_socket_.reset(new base::SyncSocket(sync_socket_handle)); 112 sync_socket_.reset(new base::SyncSocket(sync_socket_handle));
113 113
114 // And then delegate the call to the mock method. 114 // And then delegate the call to the mock method.
115 OnStreamCreated(stream_id, length); 115 OnStreamCreated(stream_id, length);
116 } 116 }
117 117
118 void OnNotifyStreamStateChanged(int stream_id, 118 void OnNotifyStreamStateChanged(int stream_id,
119 media::AudioOutputIPCDelegate::State state) { 119 media::AudioOutputIPCDelegateState state) {
120 switch (state) { 120 switch (state) {
121 case media::AudioOutputIPCDelegate::kPlaying: 121 case media::AUDIO_OUTPUT_IPC_DELEGATE_STATE_PLAYING:
122 OnStreamPlaying(stream_id); 122 OnStreamPlaying(stream_id);
123 break; 123 break;
124 case media::AudioOutputIPCDelegate::kPaused: 124 case media::AUDIO_OUTPUT_IPC_DELEGATE_STATE_PAUSED:
125 OnStreamPaused(stream_id); 125 OnStreamPaused(stream_id);
126 break; 126 break;
127 case media::AudioOutputIPCDelegate::kError: 127 case media::AUDIO_OUTPUT_IPC_DELEGATE_STATE_ERROR:
128 OnStreamError(stream_id); 128 OnStreamError(stream_id);
129 break; 129 break;
130 default: 130 default:
131 FAIL() << "Unknown stream state"; 131 FAIL() << "Unknown stream state";
132 break; 132 break;
133 } 133 }
134 } 134 }
135 135
136 scoped_ptr<base::SharedMemory> shared_memory_; 136 scoped_ptr<base::SharedMemory> shared_memory_;
137 scoped_ptr<base::SyncSocket> sync_socket_; 137 scoped_ptr<base::SyncSocket> sync_socket_;
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 } 331 }
332 332
333 TEST_F(AudioRendererHostTest, CreateUnifiedStreamAndClose) { 333 TEST_F(AudioRendererHostTest, CreateUnifiedStreamAndClose) {
334 Create(true); 334 Create(true);
335 Close(); 335 Close();
336 } 336 }
337 337
338 // TODO(hclam): Add tests for data conversation in low latency mode. 338 // TODO(hclam): Add tests for data conversation in low latency mode.
339 339
340 } // namespace content 340 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698