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

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

Issue 10440115: Turn on audio mixer by default. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | media/audio/audio_manager_base.cc » ('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/bind.h" 5 #include "base/bind.h"
6 #include "base/environment.h" 6 #include "base/environment.h"
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.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/sync_socket.h" 10 #include "base/sync_socket.h"
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 } 352 }
353 353
354 TEST_F(AudioRendererHostTest, SetVolume) { 354 TEST_F(AudioRendererHostTest, SetVolume) {
355 if (!IsRunningHeadless()) 355 if (!IsRunningHeadless())
356 EnableRealDevice(); 356 EnableRealDevice();
357 357
358 Create(); 358 Create();
359 SetVolume(0.5); 359 SetVolume(0.5);
360 Play(); 360 Play();
361 Pause(); 361 Pause();
362
363 // Expect the volume is set.
364 if (IsRunningHeadless()) {
365 EXPECT_EQ(0.5,
366 media::FakeAudioOutputStream::GetCurrentFakeStream()->volume());
367 }
368 Close(); 362 Close();
369 } 363 }
370 364
371 // Simulate the case where a stream is not properly closed. 365 // Simulate the case where a stream is not properly closed.
372 TEST_F(AudioRendererHostTest, CreatePlayAndShutdown) { 366 TEST_F(AudioRendererHostTest, CreatePlayAndShutdown) {
373 if (!IsRunningHeadless()) 367 if (!IsRunningHeadless())
374 EnableRealDevice(); 368 EnableRealDevice();
375 369
376 Create(); 370 Create();
377 Play(); 371 Play();
(...skipping 26 matching lines...) Expand all
404 EnableRealDevice(); 398 EnableRealDevice();
405 399
406 Create(); 400 Create();
407 Play(); 401 Play();
408 SimulateError(); 402 SimulateError();
409 Close(); 403 Close();
410 } 404 }
411 405
412 406
413 // TODO(hclam): Add tests for data conversation in low latency mode. 407 // TODO(hclam): Add tests for data conversation in low latency mode.
OLDNEW
« no previous file with comments | « no previous file | media/audio/audio_manager_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698