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

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: Remove the dependency on CL 8968032 and point TODOs at the newly-filed bug. Created 8 years, 12 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: 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 489182ed5acaa84a2853619cb5a8fae0eeb4ae54..f1229d0652671b25d7e04063ae2ef7899eb045ec 100644
--- a/media/filters/audio_renderer_algorithm_base_unittest.cc
+++ b/media/filters/audio_renderer_algorithm_base_unittest.cc
@@ -32,7 +32,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.
@@ -63,7 +64,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];
@@ -95,7 +97,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];
@@ -127,7 +130,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];

Powered by Google App Engine
This is Rietveld 408576698