Avoid implicit conversion from Rect to RectF in events and gfx tests.
TBR=sky
BUG=342848
Review URL: https://codereview.chromium.org/1328283003
Cr-Commit-Position: refs/heads/master@{#347801}
CrOS-Libchrome-Original-Commit: dd7e2cf27da44f5af1c545ef6fe92408233f118f
diff --git a/ui/gfx/geometry/rect_unittest.cc b/ui/gfx/geometry/rect_unittest.cc
index 7c2e058..0ecde65 100644
--- a/ui/gfx/geometry/rect_unittest.cc
+++ b/ui/gfx/geometry/rect_unittest.cc
@@ -455,7 +455,7 @@
};
for (size_t i = 0; i < arraysize(tests); ++i) {
- Rect r1(tests[i].x1, tests[i].y1, tests[i].w1, tests[i].h1);
+ RectF r1(tests[i].x1, tests[i].y1, tests[i].w1, tests[i].h1);
RectF r2(tests[i].x2, tests[i].y2, tests[i].w2, tests[i].h2);
RectF scaled = ScaleRect(r1, tests[i].scale);
@@ -705,15 +705,12 @@
#endif
TEST(RectTest, ToRectF) {
- // Check that implicit conversion from integer to float compiles.
+ // Check that explicit conversion from integer to float compiles.
Rect a(10, 20, 30, 40);
RectF b(10, 20, 30, 40);
- RectF intersect = IntersectRects(a, b);
- EXPECT_EQ(b, intersect);
-
- EXPECT_EQ(a, b);
- EXPECT_EQ(b, a);
+ RectF c = RectF(a);
+ EXPECT_EQ(b, c);
}
TEST(RectTest, BoundingRect) {