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

Unified Diff: ui/views/view_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/view.cc ('k') | ui/views/widget/desktop_root_window_host_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/view_unittest.cc
diff --git a/ui/views/view_unittest.cc b/ui/views/view_unittest.cc
index 8b1d54eb9fb1822d73624a60f759c4c16f5b6683..484b70a1cb1ba34850c18513f126b292dfc00381 100644
--- a/ui/views/view_unittest.cc
+++ b/ui/views/view_unittest.cc
@@ -2019,7 +2019,7 @@ class TransformPaintView : public TestView {
// Overridden from View:
virtual void SchedulePaintInRect(const gfx::Rect& rect) {
gfx::Rect xrect = ConvertRectToParent(rect);
- scheduled_paint_rect_ = scheduled_paint_rect_.Union(xrect);
+ scheduled_paint_rect_.Union(xrect);
}
private:
@@ -2325,9 +2325,8 @@ TEST_F(ViewTest, SetBoundsPaint) {
EXPECT_EQ(2U, top_view.scheduled_paint_rects_.size());
// There should be 2 rects, spanning from (10, 10) to (50, 50).
- gfx::Rect paint_rect =
- top_view.scheduled_paint_rects_[0].Union(
- top_view.scheduled_paint_rects_[1]);
+ gfx::Rect paint_rect = top_view.scheduled_paint_rects_[0];
+ paint_rect.Union(top_view.scheduled_paint_rects_[1]);
EXPECT_EQ(gfx::Rect(10, 10, 40, 40), paint_rect);
}
« no previous file with comments | « ui/views/view.cc ('k') | ui/views/widget/desktop_root_window_host_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698