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

Unified Diff: views/controls/label_unittest.cc

Issue 6462022: It turns out I had the sense of the GetLocalBounds bool wrong everywhere, so ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 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
Index: views/controls/label_unittest.cc
===================================================================
--- views/controls/label_unittest.cc (revision 74228)
+++ views/controls/label_unittest.cc (working copy)
@@ -208,12 +208,12 @@
// SizeToFit with unlimited width.
label.SizeToFit(0);
- int required_width = label.GetContentsBounds().width();
+ int required_width = label.GetLocalBounds().width();
EXPECT_GT(required_width, kMinTextDimension);
// SizeToFit with limited width.
label.SizeToFit(required_width - 1);
- int constrained_width = label.GetContentsBounds().width();
+ int constrained_width = label.GetLocalBounds().width();
#if defined(OS_WIN)
// Canvas::SizeStringInt (in app/gfx/canvas_linux.cc)
// has to be fixed to return the size that fits to given width/height.
@@ -223,7 +223,7 @@
// Change the width back to the desire width.
label.SizeToFit(required_width);
- EXPECT_EQ(required_width, label.GetContentsBounds().width());
+ EXPECT_EQ(required_width, label.GetLocalBounds().width());
// General tests for GetHeightForWidth.
int required_height = label.GetHeightForWidth(required_width);

Powered by Google App Engine
This is Rietveld 408576698