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

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

Issue 1470873002: Enable webaudio unit tests iff ENABLE(WEB_AUDIO). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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
« no previous file with comments | « third_party/WebKit/Source/modules/webaudio/ScriptProcessorNodeTest.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "config.h" 5 #include "config.h"
6 #if ENABLE(WEB_AUDIO)
6 #include "modules/webaudio/StereoPannerNode.h" 7 #include "modules/webaudio/StereoPannerNode.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 "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
11 12
12 namespace blink { 13 namespace blink {
13 14
14 TEST(StereoPannerNodeTest, StereoPannerLifetime) 15 TEST(StereoPannerNodeTest, StereoPannerLifetime)
15 { 16 {
16 OwnPtr<DummyPageHolder> page = DummyPageHolder::create(); 17 OwnPtr<DummyPageHolder> page = DummyPageHolder::create();
17 OfflineAudioContext* context = OfflineAudioContext::create(&page->document() , 2, 1, 48000, ASSERT_NO_EXCEPTION); 18 OfflineAudioContext* context = OfflineAudioContext::create(&page->document() , 2, 1, 48000, ASSERT_NO_EXCEPTION);
18 StereoPannerNode* node = context->createStereoPanner(ASSERT_NO_EXCEPTION); 19 StereoPannerNode* node = context->createStereoPanner(ASSERT_NO_EXCEPTION);
19 StereoPannerHandler& handler = static_cast<StereoPannerHandler&>(node->handl er()); 20 StereoPannerHandler& handler = static_cast<StereoPannerHandler&>(node->handl er());
20 EXPECT_TRUE(handler.m_stereoPanner); 21 EXPECT_TRUE(handler.m_stereoPanner);
21 AbstractAudioContext::AutoLocker locker(context); 22 AbstractAudioContext::AutoLocker locker(context);
22 handler.dispose(); 23 handler.dispose();
23 // m_stereoPanner should live after dispose() because an audio thread is 24 // m_stereoPanner should live after dispose() because an audio thread is
24 // using it. 25 // using it.
25 EXPECT_TRUE(handler.m_stereoPanner); 26 EXPECT_TRUE(handler.m_stereoPanner);
26 } 27 }
27 28
28 } // namespace blink 29 } // namespace blink
30
31 #endif // ENABLE(WEB_AUDIO)
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/webaudio/ScriptProcessorNodeTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698