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

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

Issue 2940933003: DO NOT SUBMIT results of new clang-format (Closed)
Patch Set: Created 3 years, 6 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/BaseAudioContext.h" 7 #include "modules/webaudio/BaseAudioContext.h"
7 #include "modules/webaudio/DynamicsCompressorNode.h" 8 #include "modules/webaudio/DynamicsCompressorNode.h"
8 #include "modules/webaudio/OfflineAudioContext.h" 9 #include "modules/webaudio/OfflineAudioContext.h"
9 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
10 #include <memory>
11 11
12 namespace blink { 12 namespace blink {
13 13
14 TEST(DynamicsCompressorNodeTest, ProcessorLifetime) { 14 TEST(DynamicsCompressorNodeTest, ProcessorLifetime) {
15 std::unique_ptr<DummyPageHolder> page = DummyPageHolder::Create(); 15 std::unique_ptr<DummyPageHolder> page = DummyPageHolder::Create();
16 OfflineAudioContext* context = OfflineAudioContext::Create( 16 OfflineAudioContext* context = OfflineAudioContext::Create(
17 &page->GetDocument(), 2, 1, 48000, ASSERT_NO_EXCEPTION); 17 &page->GetDocument(), 2, 1, 48000, ASSERT_NO_EXCEPTION);
18 DynamicsCompressorNode* node = 18 DynamicsCompressorNode* node =
19 context->createDynamicsCompressor(ASSERT_NO_EXCEPTION); 19 context->createDynamicsCompressor(ASSERT_NO_EXCEPTION);
20 DynamicsCompressorHandler& handler = node->GetDynamicsCompressorHandler(); 20 DynamicsCompressorHandler& handler = node->GetDynamicsCompressorHandler();
21 EXPECT_TRUE(handler.dynamics_compressor_); 21 EXPECT_TRUE(handler.dynamics_compressor_);
22 BaseAudioContext::AutoLocker locker(context); 22 BaseAudioContext::AutoLocker locker(context);
23 handler.Dispose(); 23 handler.Dispose();
24 // m_dynamicsCompressor should live after dispose() because an audio thread 24 // m_dynamicsCompressor should live after dispose() because an audio thread
25 // is using it. 25 // is using it.
26 EXPECT_TRUE(handler.dynamics_compressor_); 26 EXPECT_TRUE(handler.dynamics_compressor_);
27 } 27 }
28 28
29 } // namespace blink 29 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698