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

Unified Diff: media/filters/audio_renderer_algorithm_base_unittest.cc

Issue 9015015: Take advantage of the new Pass() machinery on scoped_ptr{,_malloc}. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 11 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
« no previous file with comments | « media/filters/audio_renderer_algorithm_base.h ('k') | media/filters/chunk_demuxer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/audio_renderer_algorithm_base_unittest.cc
diff --git a/media/filters/audio_renderer_algorithm_base_unittest.cc b/media/filters/audio_renderer_algorithm_base_unittest.cc
index d68581697f3fae6dc7f9566fcc1c1c182ed7e88c..7634db87624011cec8283dd39395c5168ccb2c0b 100644
--- a/media/filters/audio_renderer_algorithm_base_unittest.cc
+++ b/media/filters/audio_renderer_algorithm_base_unittest.cc
@@ -31,7 +31,8 @@ TEST(AudioRendererAlgorithmBaseTest, FillBuffer_NormalRate) {
// Enqueue a buffer of any size since it doesn't matter.
const size_t kDataSize = 1024;
- algorithm.EnqueueBuffer(new DataBuffer(new uint8[kDataSize], kDataSize));
+ algorithm.EnqueueBuffer(new DataBuffer(
+ scoped_array<uint8>(new uint8[kDataSize]), kDataSize));
EXPECT_EQ(kDataSize, algorithm.QueueSize());
// Read the same sized amount.
@@ -62,7 +63,8 @@ TEST(AudioRendererAlgorithmBaseTest, FillBuffer_DoubleRate) {
for (size_t i = 0u; i < arraysize(kTestData); ++i) {
const size_t kDataSize = kTestData[i][0];
- algorithm.EnqueueBuffer(new DataBuffer(new uint8[kDataSize], kDataSize));
+ algorithm.EnqueueBuffer(new DataBuffer(
+ scoped_array<uint8>(new uint8[kDataSize]), kDataSize));
EXPECT_EQ(kDataSize, algorithm.QueueSize());
const size_t kExpectedSize = kTestData[i][1];
@@ -94,7 +96,8 @@ TEST(AudioRendererAlgorithmBaseTest, FillBuffer_HalfRate) {
for (size_t i = 0u; i < arraysize(kTestData); ++i) {
const size_t kDataSize = kTestData[i][0];
- algorithm.EnqueueBuffer(new DataBuffer(new uint8[kDataSize], kDataSize));
+ algorithm.EnqueueBuffer(new DataBuffer(
+ scoped_array<uint8>(new uint8[kDataSize]), kDataSize));
EXPECT_EQ(kDataSize, algorithm.QueueSize());
const size_t kExpectedSize = kTestData[i][1];
@@ -126,7 +129,8 @@ TEST(AudioRendererAlgorithmBaseTest, FillBuffer_QuarterRate) {
for (size_t i = 0u; i < arraysize(kTestData); ++i) {
const size_t kDataSize = kTestData[i][0];
- algorithm.EnqueueBuffer(new DataBuffer(new uint8[kDataSize], kDataSize));
+ algorithm.EnqueueBuffer(new DataBuffer(scoped_array<uint8>(
+ new uint8[kDataSize]), kDataSize));
EXPECT_EQ(kDataSize, algorithm.QueueSize());
const size_t kExpectedSize = kTestData[i][1];
« no previous file with comments | « media/filters/audio_renderer_algorithm_base.h ('k') | media/filters/chunk_demuxer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698