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

Unified Diff: third_party/WebKit/Source/platform/mojo/GeometryStructTraitsTest.cpp

Issue 2943983003: chrome/blink: Add functionality for in-product help for media elements. (Closed)
Patch Set: tests Created 3 years, 5 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
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;

Powered by Google App Engine
This is Rietveld 408576698