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