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

Unified Diff: third_party/WebKit/Source/modules/webaudio/AudioBasicProcessorHandlerTest.cpp

Issue 2050123002: Remove OwnPtr from Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: First attempt to land. Created 4 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/webaudio/AudioBasicProcessorHandlerTest.cpp
diff --git a/third_party/WebKit/Source/modules/webaudio/AudioBasicProcessorHandlerTest.cpp b/third_party/WebKit/Source/modules/webaudio/AudioBasicProcessorHandlerTest.cpp
index 612c176aaa28038eaff858ae07335598f0ead425..535d1a1ac1300a23e487a43ccb8dce7dda73585e 100644
--- a/third_party/WebKit/Source/modules/webaudio/AudioBasicProcessorHandlerTest.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/AudioBasicProcessorHandlerTest.cpp
@@ -2,11 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "modules/webaudio/AudioBasicProcessorHandler.h"
#include "core/testing/DummyPageHolder.h"
+#include "modules/webaudio/AudioBasicProcessorHandler.h"
#include "modules/webaudio/OfflineAudioContext.h"
#include "platform/audio/AudioProcessor.h"
#include "testing/gtest/include/gtest/gtest.h"
+#include "wtf/PtrUtil.h"
+#include <memory>
namespace blink {
@@ -28,14 +30,14 @@ public:
MockProcessorNode(AbstractAudioContext& context)
: AudioNode(context)
{
- setHandler(AudioBasicProcessorHandler::create(AudioHandler::NodeTypeWaveShaper, *this, 48000, adoptPtr(new MockAudioProcessor())));
+ setHandler(AudioBasicProcessorHandler::create(AudioHandler::NodeTypeWaveShaper, *this, 48000, wrapUnique(new MockAudioProcessor())));
handler().initialize();
}
};
TEST(AudioBasicProcessorHandlerTest, ProcessorFinalization)
{
- OwnPtr<DummyPageHolder> page = DummyPageHolder::create();
+ std::unique_ptr<DummyPageHolder> page = DummyPageHolder::create();
OfflineAudioContext* context = OfflineAudioContext::create(&page->document(), 2, 1, 48000, ASSERT_NO_EXCEPTION);
MockProcessorNode* node = new MockProcessorNode(*context);
AudioBasicProcessorHandler& handler = static_cast<AudioBasicProcessorHandler&>(node->handler());

Powered by Google App Engine
This is Rietveld 408576698