diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-08 00:09:16 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-08 00:09:16 +0000 |
commit | 97a311466bc7db336d8315587ff1b2ec06f7ea9c (patch) | |
tree | 524babd269504a1a13a6a9874014d0dd52fc25ea /views/controls/label_unittest.cc | |
parent | 9d333fa174e9653dcbe60e525d4c03628bb217ae (diff) | |
download | chromium_src-97a311466bc7db336d8315587ff1b2ec06f7ea9c.zip chromium_src-97a311466bc7db336d8315587ff1b2ec06f7ea9c.tar.gz chromium_src-97a311466bc7db336d8315587ff1b2ec06f7ea9c.tar.bz2 |
Rework basic bounds methods on View to match new V2 API:
SetBounds(const gfx::Rect& rect) -> SetBoundsRect();
DidChangeBounds()->OnBoundsChanged()
GetLocalBounds(false)->GetLocalBounds()
GetLocalBounds(true)->GetContentsBounds()
Moved GetBounds(), GetX(), and GetPosition into RTL section.
http://crbug.com/72040
TEST=none
Review URL: http://codereview.chromium.org/6410109
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74052 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/controls/label_unittest.cc')
-rw-r--r-- | views/controls/label_unittest.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/views/controls/label_unittest.cc b/views/controls/label_unittest.cc index 879bdc2..d556512 100644 --- a/views/controls/label_unittest.cc +++ b/views/controls/label_unittest.cc @@ -208,12 +208,12 @@ TEST(LabelTest, MultiLineSizing) { // SizeToFit with unlimited width. label.SizeToFit(0); - int required_width = label.GetLocalBounds(true).width(); + int required_width = label.GetContentsBounds().width(); EXPECT_GT(required_width, kMinTextDimension); // SizeToFit with limited width. label.SizeToFit(required_width - 1); - int constrained_width = label.GetLocalBounds(true).width(); + int constrained_width = label.GetContentsBounds().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 @@ TEST(LabelTest, MultiLineSizing) { // Change the width back to the desire width. label.SizeToFit(required_width); - EXPECT_EQ(required_width, label.GetLocalBounds(true).width()); + EXPECT_EQ(required_width, label.GetContentsBounds().width()); // General tests for GetHeightForWidth. int required_height = label.GetHeightForWidth(required_width); @@ -249,7 +249,7 @@ TEST(LabelTest, MultiLineSizing) { // SizeToFit and borders. label.SizeToFit(0); - int required_width_with_border = label.GetLocalBounds(true).width(); + int required_width_with_border = label.GetLocalBounds().width(); EXPECT_EQ(required_width_with_border, required_width + border.width()); // GetHeightForWidth and borders. |