Index: third_party/WebKit/Source/platform/mojo/GeometryStructTraitsTest.cpp |
diff --git a/third_party/WebKit/Source/platform/mojo/GeometryStructTraitsTest.cpp b/third_party/WebKit/Source/platform/mojo/GeometryStructTraitsTest.cpp |
index d029e3aa80dfce351e1e727349eea6e50aa6a182..73a76dc194b3a26e22e6fc9f39c9850c56539452 100644 |
--- a/third_party/WebKit/Source/platform/mojo/GeometryStructTraitsTest.cpp |
+++ b/third_party/WebKit/Source/platform/mojo/GeometryStructTraitsTest.cpp |
@@ -47,9 +47,8 @@ class GeometryStructTraitsTest |
NOTREACHED(); |
} |
- void EchoRect(gfx::mojom::blink::RectPtr, EchoRectCallback) override { |
- // The type map is not specified. |
- NOTREACHED(); |
+ void EchoRect(const WebRect& r, EchoRectCallback callback) override { |
+ std::move(callback).Run(r); |
} |
void EchoRectF(const WebFloatRect& r, EchoRectFCallback callback) override { |
@@ -109,6 +108,18 @@ TEST_F(GeometryStructTraitsTest, PointF) { |
EXPECT_EQ(input, output); |
} |
+TEST_F(GeometryStructTraitsTest, Rect) { |
+ const float kX = 1; |
+ const float kY = 2; |
+ const float kWidth = 3; |
+ const float kHeight = 4; |
+ WebRect input(kX, kY, kWidth, kHeight); |
+ gfx::mojom::blink::GeometryTraitsTestServicePtr proxy = GetTraitsTestProxy(); |
+ WebRect output; |
+ proxy->EchoRect(input, &output); |
+ EXPECT_EQ(input, output); |
+} |
+ |
TEST_F(GeometryStructTraitsTest, RectF) { |
const float kX = 1.234; |
const float kY = 2.345; |