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

Side by Side Diff: ui/latency_info/latency_info_unittest.cc

Issue 1871233002: Move LatencyInfo to ui/latency_info (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix some more gyp issues Created 4 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 unified diff | Download patch
« no previous file with comments | « ui/latency_info/latency_info_export.h ('k') | ui/latency_info/latency_info_unittests.gyp » ('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 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_info/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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 EXPECT_FALSE( 61 EXPECT_FALSE(
62 info.FindLatency(INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT, 1, &component)); 62 info.FindLatency(INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT, 1, &component));
63 EXPECT_TRUE( 63 EXPECT_TRUE(
64 info.FindLatency(INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT, 0, &component)); 64 info.FindLatency(INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT, 0, &component));
65 EXPECT_EQ(component.sequence_number, 30); 65 EXPECT_EQ(component.sequence_number, 30);
66 EXPECT_EQ(component.event_count, 5u); 66 EXPECT_EQ(component.event_count, 5u);
67 EXPECT_EQ(component.event_time.ToInternalValue(), (100 * 2 + 200 * 3) / 5); 67 EXPECT_EQ(component.event_time.ToInternalValue(), (100 * 2 + 200 * 3) / 5);
68 } 68 }
69 69
70 } // namespace ui 70 } // namespace ui
OLDNEW
« no previous file with comments | « ui/latency_info/latency_info_export.h ('k') | ui/latency_info/latency_info_unittests.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698