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

Unified Diff: ui/display/manager/chromeos/mojo/touch_device_transform_struct_traits_unittest.cc

Issue 2901563002: chromeos: adds TouchDeviceServer and wires up in mushrome (Closed)
Patch Set: no temporary Created 3 years, 7 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: ui/display/manager/chromeos/mojo/touch_device_transform_struct_traits_unittest.cc
diff --git a/ui/display/manager/chromeos/mojo/touch_device_transform_struct_traits_unittest.cc b/ui/display/manager/chromeos/mojo/touch_device_transform_struct_traits_unittest.cc
new file mode 100644
index 0000000000000000000000000000000000000000..42d18dafca9bcaf4aaa1faeda1466aa797f1157e
--- /dev/null
+++ b/ui/display/manager/chromeos/mojo/touch_device_transform_struct_traits_unittest.cc
@@ -0,0 +1,28 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "ui/display/manager/chromeos/mojo/touch_device_transform_struct_traits.h"
+
+#include "testing/gtest/include/gtest/gtest.h"
+#include "ui/display/manager/chromeos/mojo/touch_device_transform.mojom.h"
+#include "ui/display/manager/chromeos/touch_device_transform.h"
+
+namespace display {
+
+TEST(TouchDeviceTransformStructTraitsTest, SerializeAndDeserialize) {
+ TouchDeviceTransform touch_device_transform;
+ touch_device_transform.display_id = 101;
+ touch_device_transform.device_id = 202;
+ touch_device_transform.transform =
+ gfx::Transform(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16);
+ TouchDeviceTransform deserialized;
+ ASSERT_TRUE(mojom::TouchDeviceTransform::Deserialize(
+ mojom::TouchDeviceTransform::Serialize(&touch_device_transform),
+ &deserialized));
+ EXPECT_EQ(touch_device_transform.display_id, deserialized.display_id);
+ EXPECT_EQ(touch_device_transform.device_id, deserialized.device_id);
+ EXPECT_EQ(touch_device_transform.transform, deserialized.transform);
+}
+
+} // namespace display
« no previous file with comments | « ui/display/manager/chromeos/mojo/touch_device_transform_struct_traits.h ('k') | ui/display/manager/chromeos/mojo/typemaps.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698