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

Unified Diff: ui/gfx/render_text_unittest.cc

Issue 1272823003: Update SplitString calls to new form (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « ui/gfx/font_list.cc ('k') | ui/gl/gl_gl_api_implementation.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/render_text_unittest.cc
diff --git a/ui/gfx/render_text_unittest.cc b/ui/gfx/render_text_unittest.cc
index 849f5303b6b5a5c55dc0d241ff5aceffd0f782e3..bad1262cc52c6995fe2eba8e5a5d915b586c8b96 100644
--- a/ui/gfx/render_text_unittest.cc
+++ b/ui/gfx/render_text_unittest.cc
@@ -2313,8 +2313,9 @@ TEST_F(RenderTextTest, Multiline_HorizontalAlignment) {
EXPECT_EQ(0, render_text.GetAlignmentOffset(0).x());
EXPECT_EQ(0, render_text.GetAlignmentOffset(1).x());
} else {
- std::vector<base::string16> lines;
- base::SplitString(base::WideToUTF16(kTestStrings[i].text), '\n', &lines);
+ std::vector<base::string16> lines = base::SplitString(
+ base::WideToUTF16(kTestStrings[i].text),
+ base::string16(1, '\n'), base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
ASSERT_EQ(2u, lines.size());
int difference = (lines[0].length() - lines[1].length()) * kGlyphSize;
EXPECT_EQ(render_text.GetAlignmentOffset(0).x() + difference,
« no previous file with comments | « ui/gfx/font_list.cc ('k') | ui/gl/gl_gl_api_implementation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698