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

Unified Diff: net/tools/dump_cache/url_to_filename_encoder_unittest.cc

Issue 1841863002: Update monet. (Closed) Base URL: https://github.com/domokit/monet.git@master
Patch Set: Created 4 years, 9 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 | « net/tools/dump_cache/url_to_filename_encoder.cc ('k') | net/tools/dump_cache/url_utilities.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/dump_cache/url_to_filename_encoder_unittest.cc
diff --git a/net/tools/dump_cache/url_to_filename_encoder_unittest.cc b/net/tools/dump_cache/url_to_filename_encoder_unittest.cc
index a1a96651da3986eaea6c4ff4d77d575946e7d80f..e4d866f38c193495b6e0ca760a896b35595e4141 100644
--- a/net/tools/dump_cache/url_to_filename_encoder_unittest.cc
+++ b/net/tools/dump_cache/url_to_filename_encoder_unittest.cc
@@ -7,6 +7,7 @@
#include <string>
#include <vector>
+#include "base/strings/string_split.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "base/strings/string_piece.h"
@@ -32,11 +33,11 @@ class UrlToFilenameEncoderTest : public ::testing::Test {
}
void CheckSegmentLength(const StringPiece& escaped_word) {
- std::vector<StringPiece> components;
- Tokenize(escaped_word, StringPiece("/"), &components);
- for (size_t i = 0; i < components.size(); ++i) {
+ for (const base::StringPiece& component :
+ base::SplitStringPiece(escaped_word, "/", base::KEEP_WHITESPACE,
+ base::SPLIT_WANT_NONEMPTY)) {
EXPECT_GE(UrlToFilenameEncoder::kMaximumSubdirectoryLength,
- components[i].size());
+ component.size());
}
}
« no previous file with comments | « net/tools/dump_cache/url_to_filename_encoder.cc ('k') | net/tools/dump_cache/url_utilities.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698