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

Unified Diff: media/renderers/video_renderer_impl_unittest.cc

Issue 1274123003: Update SplitString calls to new form (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: no media changes Created 5 years, 4 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/renderers/video_renderer_impl_unittest.cc
diff --git a/media/renderers/video_renderer_impl_unittest.cc b/media/renderers/video_renderer_impl_unittest.cc
index 794fb01988739f3302dce3ded578cbcae1663a68..e8602bb1f11c9c46ad8a0c819e992632b29ba27c 100644
--- a/media/renderers/video_renderer_impl_unittest.cc
+++ b/media/renderers/video_renderer_impl_unittest.cc
@@ -166,17 +166,17 @@ class VideoRendererImplTest
// A clip that is four frames long: "0 10 20 30"
// A clip that has a decode error: "60 70 error"
void QueueFrames(const std::string& str) {
- std::vector<std::string> tokens;
- base::SplitString(str, ' ', &tokens);
- for (size_t i = 0; i < tokens.size(); ++i) {
- if (tokens[i] == "abort") {
+ for (const std::string& token :
+ base::SplitString(str, " ", base::TRIM_WHITESPACE,
+ base::SPLIT_WANT_ALL)) {
+ if (token == "abort") {
scoped_refptr<VideoFrame> null_frame;
decode_results_.push_back(
std::make_pair(VideoDecoder::kAborted, null_frame));
continue;
}
- if (tokens[i] == "error") {
+ if (token == "error") {
scoped_refptr<VideoFrame> null_frame;
decode_results_.push_back(
std::make_pair(VideoDecoder::kDecodeError, null_frame));
@@ -184,7 +184,7 @@ class VideoRendererImplTest
}
int timestamp_in_ms = 0;
- if (base::StringToInt(tokens[i], &timestamp_in_ms)) {
+ if (base::StringToInt(token, &timestamp_in_ms)) {
gfx::Size natural_size = TestVideoConfig::NormalCodedSize();
scoped_refptr<VideoFrame> frame = VideoFrame::CreateFrame(
PIXEL_FORMAT_YV12, natural_size, gfx::Rect(natural_size),
@@ -193,7 +193,7 @@ class VideoRendererImplTest
continue;
}
- CHECK(false) << "Unrecognized decoder buffer token: " << tokens[i];
+ CHECK(false) << "Unrecognized decoder buffer token: " << token;
}
}
« no previous file with comments | « media/formats/mp4/track_run_iterator_unittest.cc ('k') | remoting/protocol/negotiating_host_authenticator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698