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

Unified Diff: ui/gfx/text_elider_unittest.cc

Issue 614103007: Error in popup on Link (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: For testing Created 6 years, 2 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/text_elider.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/text_elider_unittest.cc
diff --git a/ui/gfx/text_elider_unittest.cc b/ui/gfx/text_elider_unittest.cc
index 8bf3f655ca0c308ab064a3467ae37a7b4c68be37..fc5d73b098b926a50e47c4b62b8a2774bdf7a32e 100644
--- a/ui/gfx/text_elider_unittest.cc
+++ b/ui/gfx/text_elider_unittest.cc
@@ -676,6 +676,21 @@ TEST(TextEliderTest, MAYBE_ElideRectangleTextCheckLineWidth) {
EXPECT_LE(GetStringWidthF(lines[1], font_list), kAvailableWidth);
}
+TEST(TextEliderTest, ElideRectangleTextCheckBreaking) {
+ FontList font_list;
+ font_list = FontList("Noto Sans UI,ui-sans, 12px");
+#define WIDTH(x) GetStringWidthF(UTF8ToUTF16(x), font_list)
+
+ EXPECT_EQ(WIDTH("The administrator for this account has"),
+ WIDTH("The ") +
+ WIDTH("administrator ") +
+ WIDTH("for ") +
+ WIDTH("this ") +
+ WIDTH("account ") +
+ WIDTH("has"));
+#undef W
+}
+
TEST(TextEliderTest, ElideRectangleString) {
struct TestData {
const char* input;
« no previous file with comments | « ui/gfx/text_elider.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698