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

Unified Diff: components/spellcheck/renderer/spellcheck_multilingual_unittest.cc

Issue 2695883003: Change uses of base::JoinString to pass StringPieces where possible. (Closed)
Patch Set: Remove dependency CL. Created 3 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
Index: components/spellcheck/renderer/spellcheck_multilingual_unittest.cc
diff --git a/components/spellcheck/renderer/spellcheck_multilingual_unittest.cc b/components/spellcheck/renderer/spellcheck_multilingual_unittest.cc
index 7ebe4bae8ee73adc1e75554dd2dc7dec3e60918f..b8bce0a5f1d1b980a9f58593083cf5c906c53f28 100644
--- a/components/spellcheck/renderer/spellcheck_multilingual_unittest.cc
+++ b/components/spellcheck/renderer/spellcheck_multilingual_unittest.cc
@@ -10,6 +10,7 @@
#include "base/macros.h"
#include "base/path_service.h"
+#include "base/strings/string_piece.h"
#include "base/strings/string_split.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
@@ -137,12 +138,13 @@ TEST_F(MultilingualSpellCheckTest, MultilingualSpellCheckWord) {
// A sorted list of languages. This must start sorted to get all possible
// permutations.
std::string languages = "el-GR,en-US,es-ES,ru-RU";
- std::vector<std::string> permuted_languages = base::SplitString(
+ std::vector<base::StringPiece> permuted_languages = base::SplitStringPiece(
languages, ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
do {
- languages = base::JoinString(permuted_languages, ",");
- ExpectSpellCheckWordResults(languages, kTestCases, arraysize(kTestCases));
+ std::string reordered_languages = base::JoinString(permuted_languages, ",");
+ ExpectSpellCheckWordResults(reordered_languages, kTestCases,
+ arraysize(kTestCases));
} while (std::next_permutation(permuted_languages.begin(),
permuted_languages.end()));
}
« no previous file with comments | « components/search_provider_logos/google_logo_api.cc ('k') | components/task_scheduler_util/common/variations_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698