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

Side by Side Diff: ui/latency/ipc/latency_info_param_traits_unittest.cc

Issue 2783973002: Moving LatencyInfo into a separate component. (Closed)
Patch Set: Rebase again Created 3 years, 8 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 unified diff | Download patch
« no previous file with comments | « ui/latency/ipc/latency_info_param_traits_macros.h ('k') | ui/latency/latency_info.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « ui/latency/ipc/latency_info_param_traits_macros.h ('k') | ui/latency/latency_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698