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

Unified Diff: ui/gfx/skrect_conversion_unittest.cc

Issue 2744423002: Handle large rects better. (Closed)
Patch Set: Add comment and change constant reference. Created 3 years, 9 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/gfx/skia_util.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/skrect_conversion_unittest.cc
diff --git a/ui/gfx/skrect_conversion_unittest.cc b/ui/gfx/skrect_conversion_unittest.cc
index f9c05c04589fb1506e3d8be70f3253105c73790e..2471e2620742134de1ba462945d35cd2599cb2a0 100644
--- a/ui/gfx/skrect_conversion_unittest.cc
+++ b/ui/gfx/skrect_conversion_unittest.cc
@@ -33,16 +33,15 @@ TEST(RectTest, SkIRectToRectClamping) {
// right-left and bottom-top would overflow.
// These should be mapped to max width/height, which is as close as gfx::Rect
// can represent.
- EXPECT_EQ(
- gfx::Rect(Limits::min(), Limits::min(), Limits::max(), Limits::max()),
- SkIRectToRect(SkIRect::MakeLTRB(Limits::min(), Limits::min(),
- Limits::max(), Limits::max())));
+ Rect result = SkIRectToRect(SkIRect::MakeLTRB(Limits::min(), Limits::min(),
+ Limits::max(), Limits::max()));
+ EXPECT_EQ(gfx::Size(Limits::max(), Limits::max()), result.size());
// right-left and bottom-top would underflow.
// These should be mapped to zero, like all negative values.
- EXPECT_EQ(gfx::Rect(Limits::max(), Limits::max(), 0, 0),
- SkIRectToRect(SkIRect::MakeLTRB(Limits::max(), Limits::max(),
- Limits::min(), Limits::min())));
+ result = SkIRectToRect(SkIRect::MakeLTRB(Limits::max(), Limits::max(),
+ Limits::min(), Limits::min()));
+ EXPECT_EQ(gfx::Rect(Limits::max(), Limits::max(), 0, 0), result);
}
} // namespace gfx
« no previous file with comments | « ui/gfx/skia_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698