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

Unified Diff: content/renderer/paint_aggregator_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 | « content/renderer/paint_aggregator.cc ('k') | content/renderer/render_widget.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/paint_aggregator_unittest.cc
diff --git a/content/renderer/paint_aggregator_unittest.cc b/content/renderer/paint_aggregator_unittest.cc
index 1874270dad7df18623072256e027d6f0f7a13b71..0684dea4373e62bfb921901f1ad646eb2d0d71aa 100644
--- a/content/renderer/paint_aggregator_unittest.cc
+++ b/content/renderer/paint_aggregator_unittest.cc
@@ -35,7 +35,8 @@ TEST(PaintAggregator, DoubleDisjointInvalidation) {
greg.InvalidateRect(r1);
greg.InvalidateRect(r2);
- gfx::Rect expected_bounds = r1.Union(r2);
+ gfx::Rect expected_bounds = r1;
+ expected_bounds.Union(r2);
EXPECT_TRUE(greg.HasPendingUpdate());
PaintAggregator::PendingUpdate update;
@@ -59,7 +60,8 @@ TEST(PaintAggregator, DisjointInvalidationsCombined) {
greg.InvalidateRect(r1);
greg.InvalidateRect(r2);
- gfx::Rect expected_bounds = r1.Union(r2);
+ gfx::Rect expected_bounds = r1;
+ expected_bounds.Union(r2);
EXPECT_TRUE(greg.HasPendingUpdate());
PaintAggregator::PendingUpdate update;
@@ -275,7 +277,8 @@ TEST(PaintAggregator, OverlappingPaintBeforeScroll) {
gfx::Rect scroll_rect(0, 0, 10, 10);
greg.ScrollRect(2, 0, scroll_rect);
- gfx::Rect expected_paint_rect = scroll_rect.Union(paint_rect);
+ gfx::Rect expected_paint_rect = scroll_rect;
+ expected_paint_rect.Union(paint_rect);
EXPECT_TRUE(greg.HasPendingUpdate());
PaintAggregator::PendingUpdate update;
@@ -296,7 +299,8 @@ TEST(PaintAggregator, OverlappingPaintAfterScroll) {
gfx::Rect paint_rect(4, 4, 10, 2);
greg.InvalidateRect(paint_rect);
- gfx::Rect expected_paint_rect = scroll_rect.Union(paint_rect);
+ gfx::Rect expected_paint_rect = scroll_rect;
+ expected_paint_rect.Union(paint_rect);
EXPECT_TRUE(greg.HasPendingUpdate());
PaintAggregator::PendingUpdate update;
« no previous file with comments | « content/renderer/paint_aggregator.cc ('k') | content/renderer/render_widget.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698