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

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: .. Created 3 years, 4 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 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;
« no previous file with comments | « third_party/WebKit/Source/platform/mojo/GeometryStructTraits.cpp ('k') | third_party/WebKit/public/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698