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

Unified Diff: ui/gfx/render_text_unittest.cc

Issue 960203004: tracing for RenderTextMac::GetDisplayText() eliding goo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@20150129-MacViews-Bringup5-RTHB-in-Label
Patch Set: fix upstream 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') | ui/views/controls/label.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 44551e9ddd0cc8a3bf974ff3dac2eeb30e120010..2e8ec59e1846821fd6c1917b6da6704237e68c50 100644
--- a/ui/gfx/render_text_unittest.cc
+++ b/ui/gfx/render_text_unittest.cc
@@ -2618,6 +2618,7 @@ TEST_F(RenderTextTest, TextDoesntClip) {
TEST_F(RenderTextTest, Mac_ElidedText) {
RenderTextMac render_text;
base::string16 text(ASCIIToUTF16("This is an example."));
+ render_text.SetDisplayRect(gfx::Rect(0, 0, 200, 10));
render_text.SetText(text);
render_text.EnsureLayout();
// NOTE: Character and glyph counts are only comparable for simple text.
@@ -2626,8 +2627,10 @@ TEST_F(RenderTextTest, Mac_ElidedText) {
render_text.SetElideBehavior(ELIDE_TAIL);
gfx::Size string_size = render_text.GetStringSize();
+ DLOG(INFO) << string_size.ToString();
string_size.set_width(string_size.width() / 2);
render_text.SetDisplayRect(gfx::Rect(string_size));
+ DLOG(INFO) << gfx::Rect(string_size).ToString();
render_text.EnsureLayout();
EXPECT_GT(text.size(),
static_cast<size_t>(CTLineGetGlyphCount(render_text.line_)));
« no previous file with comments | « ui/gfx/render_text_mac.cc ('k') | ui/views/controls/label.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698