| Index: ui/gfx/rect_unittest.cc
|
| diff --git a/ui/gfx/rect_unittest.cc b/ui/gfx/rect_unittest.cc
|
| index bc73bf3794bcb73b6b5c456dba62e61aa7546b2e..0b26fbf219528cd120a518cd4bcf29611570b405 100644
|
| --- a/ui/gfx/rect_unittest.cc
|
| +++ b/ui/gfx/rect_unittest.cc
|
| @@ -107,8 +107,7 @@ TEST(RectTest, Intersect) {
|
| gfx::Rect r1(tests[i].x1, tests[i].y1, tests[i].w1, tests[i].h1);
|
| gfx::Rect r2(tests[i].x2, tests[i].y2, tests[i].w2, tests[i].h2);
|
| gfx::Rect r3(tests[i].x3, tests[i].y3, tests[i].w3, tests[i].h3);
|
| - gfx::Rect ir = r1;
|
| - ir.Intersect(r2);
|
| + gfx::Rect ir = gfx::Intersection(r1, r2);
|
| EXPECT_EQ(r3.x(), ir.x());
|
| EXPECT_EQ(r3.y(), ir.y());
|
| EXPECT_EQ(r3.width(), ir.width());
|
| @@ -157,8 +156,7 @@ TEST(RectTest, Union) {
|
| gfx::Rect r1(tests[i].x1, tests[i].y1, tests[i].w1, tests[i].h1);
|
| gfx::Rect r2(tests[i].x2, tests[i].y2, tests[i].w2, tests[i].h2);
|
| gfx::Rect r3(tests[i].x3, tests[i].y3, tests[i].w3, tests[i].h3);
|
| - gfx::Rect u = r1;
|
| - u.Union(r2);
|
| + gfx::Rect u = gfx::Union(r1, r2);
|
| EXPECT_EQ(r3.x(), u.x());
|
| EXPECT_EQ(r3.y(), u.y());
|
| EXPECT_EQ(r3.width(), u.width());
|
| @@ -446,8 +444,7 @@ TEST(RectTest, ScaleRect) {
|
| gfx::Rect r1(tests[i].x1, tests[i].y1, tests[i].w1, tests[i].h1);
|
| gfx::RectF r2(tests[i].x2, tests[i].y2, tests[i].w2, tests[i].h2);
|
|
|
| - gfx::RectF scaled = r1;
|
| - scaled.Scale(tests[i].scale);
|
| + gfx::RectF scaled = gfx::Scale(r1, tests[i].scale);
|
| EXPECT_FLOAT_AND_NAN_EQ(r2.x(), scaled.x());
|
| EXPECT_FLOAT_AND_NAN_EQ(r2.y(), scaled.y());
|
| EXPECT_FLOAT_AND_NAN_EQ(r2.width(), scaled.width());
|
| @@ -569,8 +566,7 @@ TEST(RectTest, ToRectF) {
|
| gfx::Rect a(10, 20, 30, 40);
|
| gfx::RectF b(10, 20, 30, 40);
|
|
|
| - gfx::RectF intersect = b;
|
| - intersect.Intersect(a);
|
| + gfx::RectF intersect = gfx::Intersection(a, b);
|
| EXPECT_EQ(b.ToString(), intersect.ToString());
|
|
|
| EXPECT_EQ(a, b);
|
|
|