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

Unified Diff: ui/gfx/render_text_unittest.cc

Issue 965393003: alternative tracing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@20150303-RenderText-Goo
Patch Set: Created 5 years, 10 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/render_text_mac.cc ('k') | no next file » | 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 44551e9ddd0cc8a3bf974ff3dac2eeb30e120010..3f2a15aed374b091fc2e56cde10c27f39ed08fc4 100644
--- a/ui/gfx/render_text_unittest.cc
+++ b/ui/gfx/render_text_unittest.cc
@@ -2623,14 +2623,21 @@ TEST_F(RenderTextTest, Mac_ElidedText) {
// NOTE: Character and glyph counts are only comparable for simple text.
EXPECT_EQ(text.size(),
static_cast<size_t>(CTLineGetGlyphCount(render_text.line_)));
+ EXPECT_NE(0u, render_text.GetDisplayText().size());
+ DLOG(INFO) << " -- set elide";
render_text.SetElideBehavior(ELIDE_TAIL);
+ DLOG(INFO) << " -- get string size";
gfx::Size string_size = render_text.GetStringSize();
string_size.set_width(string_size.width() / 2);
+
+ DLOG(INFO) << " -- set display_rect";
render_text.SetDisplayRect(gfx::Rect(string_size));
+ DLOG(INFO) << " -- set";
render_text.EnsureLayout();
EXPECT_GT(text.size(),
static_cast<size_t>(CTLineGetGlyphCount(render_text.line_)));
+ EXPECT_NE(0u, render_text.GetDisplayText().size());
}
#endif
« no previous file with comments | « ui/gfx/render_text_mac.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698