OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "ui/events/latency_info.h" | 5 #include "ui/latency/latency_info.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
10 | 10 |
11 namespace ui { | 11 namespace ui { |
12 | 12 |
13 TEST(LatencyInfoTest, AddTwoSeparateEvent) { | 13 TEST(LatencyInfoTest, AddTwoSeparateEvent) { |
14 LatencyInfo info; | 14 LatencyInfo info; |
15 info.AddLatencyNumberWithTimestamp(INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT, | 15 info.AddLatencyNumberWithTimestamp(INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT, |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 info.AddLatencyNumber(INPUT_EVENT_LATENCY_UI_COMPONENT, 0, 0); | 74 info.AddLatencyNumber(INPUT_EVENT_LATENCY_UI_COMPONENT, 0, 0); |
75 | 75 |
76 info.RemoveLatency(INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT); | 76 info.RemoveLatency(INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT); |
77 | 77 |
78 EXPECT_FALSE(info.FindLatency(INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT, 0, 0)); | 78 EXPECT_FALSE(info.FindLatency(INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT, 0, 0)); |
79 EXPECT_FALSE(info.FindLatency(INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT, 1, 0)); | 79 EXPECT_FALSE(info.FindLatency(INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT, 1, 0)); |
80 EXPECT_TRUE(info.FindLatency(INPUT_EVENT_LATENCY_UI_COMPONENT, 0, 0)); | 80 EXPECT_TRUE(info.FindLatency(INPUT_EVENT_LATENCY_UI_COMPONENT, 0, 0)); |
81 } | 81 } |
82 | 82 |
83 } // namespace ui | 83 } // namespace ui |
OLD | NEW |