OLD | NEW |
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 25 matching lines...) Expand all Loading... |
36 static bool IsRunningHeadless() { | 36 static bool IsRunningHeadless() { |
37 scoped_ptr<base::Environment> env(base::Environment::Create()); | 37 scoped_ptr<base::Environment> env(base::Environment::Create()); |
38 if (env->HasVar("CHROME_HEADLESS")) | 38 if (env->HasVar("CHROME_HEADLESS")) |
39 return true; | 39 return true; |
40 return false; | 40 return false; |
41 } | 41 } |
42 | 42 |
43 class MockAudioRendererHost : public AudioRendererHost { | 43 class MockAudioRendererHost : public AudioRendererHost { |
44 public: | 44 public: |
45 explicit MockAudioRendererHost( | 45 explicit MockAudioRendererHost( |
46 const content::ResourceContext* resource_context) | 46 content::ResourceContext* resource_context) |
47 : AudioRendererHost(resource_context), | 47 : AudioRendererHost(resource_context), |
48 shared_memory_length_(0) { | 48 shared_memory_length_(0) { |
49 } | 49 } |
50 | 50 |
51 virtual ~MockAudioRendererHost() { | 51 virtual ~MockAudioRendererHost() { |
52 } | 52 } |
53 | 53 |
54 // A list of mock methods. | 54 // A list of mock methods. |
55 MOCK_METHOD2(OnStreamCreated, | 55 MOCK_METHOD2(OnStreamCreated, |
56 void(int stream_id, int length)); | 56 void(int stream_id, int length)); |
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
407 EnableRealDevice(); | 407 EnableRealDevice(); |
408 | 408 |
409 Create(); | 409 Create(); |
410 Play(); | 410 Play(); |
411 SimulateError(); | 411 SimulateError(); |
412 Close(); | 412 Close(); |
413 } | 413 } |
414 | 414 |
415 | 415 |
416 // TODO(hclam): Add tests for data conversation in low latency mode. | 416 // TODO(hclam): Add tests for data conversation in low latency mode. |
OLD | NEW |