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 23 matching lines...) Expand all Loading... |
34 | 34 |
35 static bool IsRunningHeadless() { | 35 static bool IsRunningHeadless() { |
36 scoped_ptr<base::Environment> env(base::Environment::Create()); | 36 scoped_ptr<base::Environment> env(base::Environment::Create()); |
37 if (env->HasVar("CHROME_HEADLESS")) | 37 if (env->HasVar("CHROME_HEADLESS")) |
38 return true; | 38 return true; |
39 return false; | 39 return false; |
40 } | 40 } |
41 | 41 |
42 class MockAudioRendererHost : public AudioRendererHost { | 42 class MockAudioRendererHost : public AudioRendererHost { |
43 public: | 43 public: |
44 explicit MockAudioRendererHost( | 44 MockAudioRendererHost( |
45 media::AudioManager* audio_manager, | 45 media::AudioManager* audio_manager, |
46 MediaObserver* media_observer) | 46 MediaObserver* media_observer) |
47 : AudioRendererHost(audio_manager, media_observer), | 47 : AudioRendererHost(audio_manager, media_observer), |
48 shared_memory_length_(0) { | 48 shared_memory_length_(0) { |
49 } | 49 } |
50 | 50 |
51 // A list of mock methods. | 51 // A list of mock methods. |
52 MOCK_METHOD2(OnStreamCreated, | 52 MOCK_METHOD2(OnStreamCreated, |
53 void(int stream_id, int length)); | 53 void(int stream_id, int length)); |
54 MOCK_METHOD1(OnStreamPlaying, void(int stream_id)); | 54 MOCK_METHOD1(OnStreamPlaying, void(int stream_id)); |
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
392 | 392 |
393 Create(); | 393 Create(); |
394 Play(); | 394 Play(); |
395 SimulateError(); | 395 SimulateError(); |
396 Close(); | 396 Close(); |
397 } | 397 } |
398 | 398 |
399 // TODO(hclam): Add tests for data conversation in low latency mode. | 399 // TODO(hclam): Add tests for data conversation in low latency mode. |
400 | 400 |
401 } // namespace content | 401 } // namespace content |
OLD | NEW |