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 <stdint.h> | 5 #include <stdint.h> |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/at_exit.h" | 9 #include "base/at_exit.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 const char kNonDefaultDeviceId[] = "valid-nondefault-device-id"; | 43 const char kNonDefaultDeviceId[] = "valid-nondefault-device-id"; |
44 const char kUnauthorizedDeviceId[] = "unauthorized-device-id"; | 44 const char kUnauthorizedDeviceId[] = "unauthorized-device-id"; |
45 | 45 |
46 class MockRenderCallback : public AudioRendererSink::RenderCallback { | 46 class MockRenderCallback : public AudioRendererSink::RenderCallback { |
47 public: | 47 public: |
48 MockRenderCallback() {} | 48 MockRenderCallback() {} |
49 virtual ~MockRenderCallback() {} | 49 virtual ~MockRenderCallback() {} |
50 | 50 |
51 MOCK_METHOD3(Render, | 51 MOCK_METHOD3(Render, |
52 int(AudioBus* dest, | 52 int(AudioBus* dest, |
53 uint32_t audio_delay_milliseconds, | 53 uint32_t frames_delayed, |
54 uint32_t frames_skipped)); | 54 uint32_t frames_skipped)); |
55 MOCK_METHOD0(OnRenderError, void()); | 55 MOCK_METHOD0(OnRenderError, void()); |
56 }; | 56 }; |
57 | 57 |
58 class MockAudioOutputIPC : public AudioOutputIPC { | 58 class MockAudioOutputIPC : public AudioOutputIPC { |
59 public: | 59 public: |
60 MockAudioOutputIPC() {} | 60 MockAudioOutputIPC() {} |
61 virtual ~MockAudioOutputIPC() {} | 61 virtual ~MockAudioOutputIPC() {} |
62 | 62 |
63 MOCK_METHOD4(RequestDeviceAuthorization, | 63 MOCK_METHOD4(RequestDeviceAuthorization, |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
314 | 314 |
315 TEST_P(AudioOutputDeviceTest, UnauthorizedDevice) { | 315 TEST_P(AudioOutputDeviceTest, UnauthorizedDevice) { |
316 SetDevice(kUnauthorizedDeviceId); | 316 SetDevice(kUnauthorizedDeviceId); |
317 StartAudioDevice(); | 317 StartAudioDevice(); |
318 StopAudioDevice(); | 318 StopAudioDevice(); |
319 } | 319 } |
320 | 320 |
321 INSTANTIATE_TEST_CASE_P(Render, AudioOutputDeviceTest, Values(false)); | 321 INSTANTIATE_TEST_CASE_P(Render, AudioOutputDeviceTest, Values(false)); |
322 | 322 |
323 } // namespace media. | 323 } // namespace media. |
OLD | NEW |