OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "modules/webaudio/AudioBasicProcessorHandler.h" | 5 #include "modules/webaudio/AudioBasicProcessorHandler.h" |
6 | |
7 #if ENABLE(WEB_AUDIO) | |
8 #include "core/testing/DummyPageHolder.h" | 6 #include "core/testing/DummyPageHolder.h" |
9 #include "modules/webaudio/OfflineAudioContext.h" | 7 #include "modules/webaudio/OfflineAudioContext.h" |
10 #include "platform/audio/AudioProcessor.h" | 8 #include "platform/audio/AudioProcessor.h" |
11 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
12 | 10 |
13 namespace blink { | 11 namespace blink { |
14 | 12 |
15 class MockAudioProcessor final : public AudioProcessor { | 13 class MockAudioProcessor final : public AudioProcessor { |
16 public: | 14 public: |
17 MockAudioProcessor() : AudioProcessor(48000, 2) { } | 15 MockAudioProcessor() : AudioProcessor(48000, 2) { } |
(...skipping 28 matching lines...) Expand all Loading... |
46 AbstractAudioContext::AutoLocker locker(context); | 44 AbstractAudioContext::AutoLocker locker(context); |
47 handler.dispose(); | 45 handler.dispose(); |
48 // The AudioProcessor should live after dispose() and should not be | 46 // The AudioProcessor should live after dispose() and should not be |
49 // finalized because an audio thread is using it. | 47 // finalized because an audio thread is using it. |
50 EXPECT_TRUE(handler.processor()); | 48 EXPECT_TRUE(handler.processor()); |
51 EXPECT_TRUE(handler.processor()->isInitialized()); | 49 EXPECT_TRUE(handler.processor()->isInitialized()); |
52 } | 50 } |
53 | 51 |
54 } // namespace blink | 52 } // namespace blink |
55 | 53 |
56 #endif // ENABLE(WEB_AUDIO) | |
OLD | NEW |