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 e8602bb1f11c9c46ad8a0c819e992632b29ba27c..794fb01988739f3302dce3ded578cbcae1663a68 100644 |
--- a/media/renderers/video_renderer_impl_unittest.cc |
+++ b/media/renderers/video_renderer_impl_unittest.cc |
@@ -166,17 +166,17 @@ |
// 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) { |
- for (const std::string& token : |
- base::SplitString(str, " ", base::TRIM_WHITESPACE, |
- base::SPLIT_WANT_ALL)) { |
- if (token == "abort") { |
+ std::vector<std::string> tokens; |
+ base::SplitString(str, ' ', &tokens); |
+ for (size_t i = 0; i < tokens.size(); ++i) { |
+ if (tokens[i] == "abort") { |
scoped_refptr<VideoFrame> null_frame; |
decode_results_.push_back( |
std::make_pair(VideoDecoder::kAborted, null_frame)); |
continue; |
} |
- if (token == "error") { |
+ if (tokens[i] == "error") { |
scoped_refptr<VideoFrame> null_frame; |
decode_results_.push_back( |
std::make_pair(VideoDecoder::kDecodeError, null_frame)); |
@@ -184,7 +184,7 @@ |
} |
int timestamp_in_ms = 0; |
- if (base::StringToInt(token, ×tamp_in_ms)) { |
+ if (base::StringToInt(tokens[i], ×tamp_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 @@ |
continue; |
} |
- CHECK(false) << "Unrecognized decoder buffer token: " << token; |
+ CHECK(false) << "Unrecognized decoder buffer token: " << tokens[i]; |
} |
} |