| 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/basictypes.h" | 5 #include "base/basictypes.h" |
| 6 #include "base/bind.h" | 6 #include "base/bind.h" |
| 7 #include "base/environment.h" | 7 #include "base/environment.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 static const double kTestVolume = 0.25; | 34 static const double kTestVolume = 0.25; |
| 35 | 35 |
| 36 class MockAudioOutputControllerEventHandler | 36 class MockAudioOutputControllerEventHandler |
| 37 : public AudioOutputController::EventHandler { | 37 : public AudioOutputController::EventHandler { |
| 38 public: | 38 public: |
| 39 MockAudioOutputControllerEventHandler() {} | 39 MockAudioOutputControllerEventHandler() {} |
| 40 | 40 |
| 41 MOCK_METHOD1(OnCreated, void(AudioOutputController* controller)); | 41 MOCK_METHOD1(OnCreated, void(AudioOutputController* controller)); |
| 42 MOCK_METHOD1(OnPlaying, void(AudioOutputController* controller)); | 42 MOCK_METHOD1(OnPlaying, void(AudioOutputController* controller)); |
| 43 MOCK_METHOD1(OnPaused, void(AudioOutputController* controller)); | 43 MOCK_METHOD1(OnPaused, void(AudioOutputController* controller)); |
| 44 MOCK_METHOD2(OnError, void(AudioOutputController* controller, | 44 MOCK_METHOD1(OnError, void(AudioOutputController* controller)); |
| 45 int error_code)); | |
| 46 MOCK_METHOD3(OnDeviceChange, void(AudioOutputController* controller, | 45 MOCK_METHOD3(OnDeviceChange, void(AudioOutputController* controller, |
| 47 int new_buffer_size, int new_sample_rate)); | 46 int new_buffer_size, int new_sample_rate)); |
| 48 private: | 47 private: |
| 49 DISALLOW_COPY_AND_ASSIGN(MockAudioOutputControllerEventHandler); | 48 DISALLOW_COPY_AND_ASSIGN(MockAudioOutputControllerEventHandler); |
| 50 }; | 49 }; |
| 51 | 50 |
| 52 class MockAudioOutputControllerSyncReader | 51 class MockAudioOutputControllerSyncReader |
| 53 : public AudioOutputController::SyncReader { | 52 : public AudioOutputController::SyncReader { |
| 54 public: | 53 public: |
| 55 MockAudioOutputControllerSyncReader() {} | 54 MockAudioOutputControllerSyncReader() {} |
| (...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 371 | 370 |
| 372 TEST_F(AudioOutputControllerTest, DivertRevertClose) { | 371 TEST_F(AudioOutputControllerTest, DivertRevertClose) { |
| 373 Create(kSamplesPerPacket); | 372 Create(kSamplesPerPacket); |
| 374 WaitForCreate(); | 373 WaitForCreate(); |
| 375 DivertNeverPlaying(); | 374 DivertNeverPlaying(); |
| 376 RevertWasNotPlaying(); | 375 RevertWasNotPlaying(); |
| 377 Close(); | 376 Close(); |
| 378 } | 377 } |
| 379 | 378 |
| 380 } // namespace media | 379 } // namespace media |
| OLD | NEW |