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

Unified Diff: ui/views/animation/bounds_animator_unittest.cc

Issue 11110004: Make gfx::Rect class operations consistently mutate the class they are called on. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: cc/ fixes Created 8 years, 2 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/views/animation/bounds_animator.cc ('k') | ui/views/layout/box_layout.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/animation/bounds_animator_unittest.cc
diff --git a/ui/views/animation/bounds_animator_unittest.cc b/ui/views/animation/bounds_animator_unittest.cc
index 93b13b5095c1bad35f188e8bf35200f339a86ecb..2dbfc485a54ca165d9e3b63287cf6459c5bcddfb 100644
--- a/ui/views/animation/bounds_animator_unittest.cc
+++ b/ui/views/animation/bounds_animator_unittest.cc
@@ -76,7 +76,7 @@ class TestView : public View {
if (dirty_rect_.IsEmpty())
dirty_rect_ = r;
else
- dirty_rect_ = dirty_rect_.Union(r);
+ dirty_rect_.Union(r);
}
const gfx::Rect& dirty_rect() const { return dirty_rect_; }
@@ -129,7 +129,8 @@ TEST_F(BoundsAnimatorTest, AnimateViewTo) {
// The parent should have been told to repaint as the animation progressed.
// The resulting rect is the union of the original and target bounds.
- EXPECT_EQ(target_bounds.Union(initial_bounds), parent()->dirty_rect());
+ target_bounds.Union(initial_bounds);
+ EXPECT_EQ(target_bounds, parent()->dirty_rect());
}
// Make sure an AnimationDelegate is deleted when canceled.
« no previous file with comments | « ui/views/animation/bounds_animator.cc ('k') | ui/views/layout/box_layout.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698