diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-16 18:17:47 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-16 18:17:47 +0000 |
commit | 80f8b9f5cf620c37e9d1408a114dc90699584d89 (patch) | |
tree | 9e2f5fcacbb18cd86690bc47e0d22ea8f10ac317 /chrome/views/view_unittest.cc | |
parent | f377cebc8bb25bb9f6708adbfda567a95c296642 (diff) | |
download | chromium_src-80f8b9f5cf620c37e9d1408a114dc90699584d89.zip chromium_src-80f8b9f5cf620c37e9d1408a114dc90699584d89.tar.gz chromium_src-80f8b9f5cf620c37e9d1408a114dc90699584d89.tar.bz2 |
Make View::SetBounds take a const gfx::Rect& instead of a const CRect&
Make View::DidChangeBounds call Layout by default, eliminating this function from most places.
http://crbug.com/2186
Review URL: http://codereview.chromium.org/7429
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3471 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/views/view_unittest.cc')
-rw-r--r-- | chrome/views/view_unittest.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/chrome/views/view_unittest.cc b/chrome/views/view_unittest.cc index 38df3bd..0819d66 100644 --- a/chrome/views/view_unittest.cc +++ b/chrome/views/view_unittest.cc @@ -124,8 +124,8 @@ class TestView : public View { // DidChangeBounds test bool did_change_bounds_; - CRect previous_bounds_; - CRect new_bounds_; + gfx::Rect previous_bounds_; + gfx::Rect new_bounds_; // AddRemoveNotifications test bool child_added_; @@ -154,8 +154,8 @@ void TestView::DidChangeBounds(const CRect& previous, const CRect& current) { TEST_F(ViewTest, DidChangeBounds) { TestView* v = new TestView(); - CRect prev_rect(0, 0, 200, 200); - CRect new_rect(100, 100, 250, 250); + gfx::Rect prev_rect(0, 0, 200, 200); + gfx::Rect new_rect(100, 100, 250, 250); v->SetBounds(prev_rect); v->Reset(); @@ -552,12 +552,12 @@ TEST_F(ViewTest, HitTestMasks) { gfx::Rect v1_bounds = gfx::Rect(0, 0, 100, 100); HitTestView* v1 = new HitTestView(false); - v1->SetBounds(v1_bounds.ToRECT()); + v1->SetBounds(v1_bounds); root_view->AddChildView(v1); gfx::Rect v2_bounds = gfx::Rect(105, 0, 100, 100); HitTestView* v2 = new HitTestView(true); - v2->SetBounds(v2_bounds.ToRECT()); + v2->SetBounds(v2_bounds); root_view->AddChildView(v2); gfx::Point v1_centerpoint = v1_bounds.CenterPoint(); |