Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(206)

Side by Side Diff: third_party/WebKit/Source/modules/webaudio/AudioBasicProcessorHandlerTest.cpp

Issue 2700123003: DO NOT COMMIT: Results of running old (current) clang-format on Blink (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <memory>
5 #include "core/testing/DummyPageHolder.h" 6 #include "core/testing/DummyPageHolder.h"
6 #include "modules/webaudio/AudioBasicProcessorHandler.h" 7 #include "modules/webaudio/AudioBasicProcessorHandler.h"
7 #include "modules/webaudio/OfflineAudioContext.h" 8 #include "modules/webaudio/OfflineAudioContext.h"
8 #include "platform/audio/AudioProcessor.h" 9 #include "platform/audio/AudioProcessor.h"
9 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
10 #include "wtf/PtrUtil.h" 11 #include "wtf/PtrUtil.h"
11 #include <memory>
12 12
13 namespace blink { 13 namespace blink {
14 14
15 class MockAudioProcessor final : public AudioProcessor { 15 class MockAudioProcessor final : public AudioProcessor {
16 public: 16 public:
17 MockAudioProcessor() : AudioProcessor(48000, 2) {} 17 MockAudioProcessor() : AudioProcessor(48000, 2) {}
18 void initialize() override { m_initialized = true; } 18 void initialize() override { m_initialized = true; }
19 void uninitialize() override { m_initialized = false; } 19 void uninitialize() override { m_initialized = false; }
20 void process(const AudioBus*, AudioBus*, size_t) override {} 20 void process(const AudioBus*, AudioBus*, size_t) override {}
21 void reset() override {} 21 void reset() override {}
(...skipping 24 matching lines...) Expand all
46 EXPECT_TRUE(handler.processor()->isInitialized()); 46 EXPECT_TRUE(handler.processor()->isInitialized());
47 BaseAudioContext::AutoLocker locker(context); 47 BaseAudioContext::AutoLocker locker(context);
48 handler.dispose(); 48 handler.dispose();
49 // The AudioProcessor should live after dispose() and should not be 49 // The AudioProcessor should live after dispose() and should not be
50 // finalized because an audio thread is using it. 50 // finalized because an audio thread is using it.
51 EXPECT_TRUE(handler.processor()); 51 EXPECT_TRUE(handler.processor());
52 EXPECT_TRUE(handler.processor()->isInitialized()); 52 EXPECT_TRUE(handler.processor()->isInitialized());
53 } 53 }
54 54
55 } // namespace blink 55 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698