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

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: Rebase. 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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 // Create the SyncSocket using the handle. 122 // Create the SyncSocket using the handle.
123 base::SyncSocket::Handle sync_socket_handle = 123 base::SyncSocket::Handle sync_socket_handle =
124 base::SyncSocket::UnwrapHandle(socket_descriptor); 124 base::SyncSocket::UnwrapHandle(socket_descriptor);
125 sync_socket_.reset(new base::SyncSocket(sync_socket_handle)); 125 sync_socket_.reset(new base::SyncSocket(sync_socket_handle));
126 126
127 // And then delegate the call to the mock method. 127 // And then delegate the call to the mock method.
128 OnStreamCreated(stream_id, length); 128 OnStreamCreated(stream_id, length);
129 } 129 }
130 130
131 void OnNotifyStreamStateChanged(int stream_id, 131 void OnNotifyStreamStateChanged(int stream_id,
132 media::AudioOutputIPCDelegate::State state) { 132 media::AudioOutputIPCDelegateState state) {
133 switch (state) { 133 switch (state) {
134 case media::AudioOutputIPCDelegate::kPlaying: 134 case media::AUDIO_OUTPUT_IPC_DELEGATE_STATE_PLAYING:
135 OnStreamPlaying(stream_id); 135 OnStreamPlaying(stream_id);
136 break; 136 break;
137 case media::AudioOutputIPCDelegate::kPaused: 137 case media::AUDIO_OUTPUT_IPC_DELEGATE_STATE_PAUSED:
138 OnStreamPaused(stream_id); 138 OnStreamPaused(stream_id);
139 break; 139 break;
140 case media::AudioOutputIPCDelegate::kError: 140 case media::AUDIO_OUTPUT_IPC_DELEGATE_STATE_ERROR:
141 OnStreamError(stream_id); 141 OnStreamError(stream_id);
142 break; 142 break;
143 default: 143 default:
144 FAIL() << "Unknown stream state"; 144 FAIL() << "Unknown stream state";
145 break; 145 break;
146 } 146 }
147 } 147 }
148 148
149 void OnNotifyOutputDeviceSwitched(int stream_id, 149 void OnNotifyOutputDeviceSwitched(int stream_id,
150 int request_id, 150 int request_id,
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 } 403 }
404 404
405 TEST_F(AudioRendererHostTest, CreateUnifiedStreamAndClose) { 405 TEST_F(AudioRendererHostTest, CreateUnifiedStreamAndClose) {
406 Create(true); 406 Create(true);
407 Close(); 407 Close();
408 } 408 }
409 409
410 // TODO(hclam): Add tests for data conversation in low latency mode. 410 // TODO(hclam): Add tests for data conversation in low latency mode.
411 411
412 } // namespace content 412 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/media/audio_renderer_host.cc ('k') | content/common/media/audio_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698