OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <stddef.h> | 5 #include <stddef.h> |
6 #include <stdint.h> | 6 #include <stdint.h> |
7 | 7 |
8 #include "ipc/ipc_message_macros.h" | 8 #include "ipc/ipc_message_macros.h" |
9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
10 #include "ui/events/ipc/latency_info_param_traits.h" | |
11 #include "ui/events/ipc/latency_info_param_traits_macros.h" | |
12 #include "ui/gfx/ipc/geometry/gfx_param_traits.h" | 10 #include "ui/gfx/ipc/geometry/gfx_param_traits.h" |
| 11 #include "ui/latency/ipc/latency_info_param_traits.h" |
| 12 #include "ui/latency/ipc/latency_info_param_traits_macros.h" |
13 | 13 |
14 namespace ui { | 14 namespace ui { |
15 | 15 |
16 TEST(LatencyInfoParamTraitsTest, Basic) { | 16 TEST(LatencyInfoParamTraitsTest, Basic) { |
17 LatencyInfo latency; | 17 LatencyInfo latency; |
18 ASSERT_FALSE(latency.terminated()); | 18 ASSERT_FALSE(latency.terminated()); |
19 ASSERT_EQ(0u, latency.input_coordinates_size()); | 19 ASSERT_EQ(0u, latency.input_coordinates_size()); |
20 latency.AddLatencyNumber(INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT, 1234, 0); | 20 latency.AddLatencyNumber(INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT, 1234, 0); |
21 latency.AddLatencyNumber(INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT, 1234, 100); | 21 latency.AddLatencyNumber(INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT, 1234, 100); |
22 latency.AddLatencyNumber(INPUT_EVENT_LATENCY_TERMINATED_FRAME_SWAP_COMPONENT, | 22 latency.AddLatencyNumber(INPUT_EVENT_LATENCY_TERMINATED_FRAME_SWAP_COMPONENT, |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 IPC::WriteParam(&msg, gfx::PointF()); | 71 IPC::WriteParam(&msg, gfx::PointF()); |
72 IPC::WriteParam(&msg, static_cast<int64_t>(1234)); | 72 IPC::WriteParam(&msg, static_cast<int64_t>(1234)); |
73 IPC::WriteParam(&msg, true); | 73 IPC::WriteParam(&msg, true); |
74 | 74 |
75 base::PickleIterator iter(msg); | 75 base::PickleIterator iter(msg); |
76 LatencyInfo output; | 76 LatencyInfo output; |
77 EXPECT_FALSE(IPC::ReadParam(&msg, &iter, &output)); | 77 EXPECT_FALSE(IPC::ReadParam(&msg, &iter, &output)); |
78 } | 78 } |
79 | 79 |
80 } // namespace ui | 80 } // namespace ui |
OLD | NEW |