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

Unified Diff: media/base/text_renderer_unittest.cc

Issue 2865113007: Remove ScopedVector from media/base/ (Closed)
Patch Set: added header file in text_renderer_unittest.cc Created 3 years, 7 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/base/multi_channel_resampler.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/text_renderer_unittest.cc
diff --git a/media/base/text_renderer_unittest.cc b/media/base/text_renderer_unittest.cc
index f188049fae46b99e1df0f7136c027159e4d668f7..b255e6c01b6b16c279e2fb23b376ae279ac7c44b 100644
--- a/media/base/text_renderer_unittest.cc
+++ b/media/base/text_renderer_unittest.cc
@@ -12,7 +12,7 @@
#include "base/bind.h"
#include "base/callback_helpers.h"
#include "base/macros.h"
-#include "base/memory/scoped_vector.h"
+#include "base/memory/ptr_util.h"
#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
#include "media/base/audio_decoder_config.h"
@@ -77,13 +77,13 @@ class TextRendererTest : public testing::Test {
const std::string& language,
bool expect_read) {
const size_t idx = text_track_streams_.size();
- text_track_streams_.push_back(new FakeTextTrackStream);
+ text_track_streams_.push_back(base::MakeUnique<FakeTextTrackStream>());
if (expect_read)
ExpectRead(idx);
const TextTrackConfig config(kind, name, language, std::string());
- text_renderer_->AddTextStream(text_track_streams_.back(), config);
+ text_renderer_->AddTextStream(text_track_streams_.back().get(), config);
base::RunLoop().RunUntilIdle();
EXPECT_EQ(text_tracks_.size(), text_track_streams_.size());
@@ -107,7 +107,7 @@ class TextRendererTest : public testing::Test {
}
void RemoveTextTrack(unsigned idx) {
- FakeTextTrackStream* const stream = text_track_streams_[idx];
+ FakeTextTrackStream* const stream = text_track_streams_[idx].get();
text_renderer_->RemoveTextStream(stream);
EXPECT_FALSE(text_tracks_[idx]);
}
@@ -124,7 +124,7 @@ class TextRendererTest : public testing::Test {
}
void AbortPendingRead(unsigned idx) {
- FakeTextTrackStream* const stream = text_track_streams_[idx];
+ FakeTextTrackStream* const stream = text_track_streams_[idx].get();
stream->AbortPendingRead();
base::RunLoop().RunUntilIdle();
}
@@ -136,7 +136,7 @@ class TextRendererTest : public testing::Test {
}
void SendEosNotification(unsigned idx) {
- FakeTextTrackStream* const stream = text_track_streams_[idx];
+ FakeTextTrackStream* const stream = text_track_streams_[idx].get();
stream->SendEosNotification();
base::RunLoop().RunUntilIdle();
}
@@ -148,7 +148,7 @@ class TextRendererTest : public testing::Test {
}
void SendCue(unsigned idx, bool expect_cue) {
- FakeTextTrackStream* const text_stream = text_track_streams_[idx];
+ FakeTextTrackStream* const text_stream = text_track_streams_[idx].get();
const base::TimeDelta start;
const base::TimeDelta duration = base::TimeDelta::FromSeconds(42);
@@ -196,7 +196,7 @@ class TextRendererTest : public testing::Test {
}
void ExpectRead(size_t idx) {
- FakeTextTrackStream* const stream = text_track_streams_[idx];
+ FakeTextTrackStream* const stream = text_track_streams_[idx].get();
EXPECT_CALL(*stream, OnRead());
}
@@ -206,7 +206,7 @@ class TextRendererTest : public testing::Test {
base::MessageLoop message_loop_;
- typedef ScopedVector<FakeTextTrackStream> TextTrackStreams;
+ typedef std::vector<std::unique_ptr<FakeTextTrackStream>> TextTrackStreams;
TextTrackStreams text_track_streams_;
typedef std::vector<FakeTextTrack*> TextTracks;
« no previous file with comments | « media/base/multi_channel_resampler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698