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 569c7c7a07ea4f141e27f7791eae6b7bca40b18d..f32432596c1b3653983394778063419f1e5798fb 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; |