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

Unified Diff: ui/latency/latency_info_unittest.cc

Issue 2953073002: LatencyInfo trace_id_ no longer dependent on sequence_number. (Closed)
Patch Set: Address nit. Created 3 years, 6 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
« no previous file with comments | « ui/latency/latency_info.cc ('k') | ui/latency/mojo/latency_info.mojom » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/latency/latency_info_unittest.cc
diff --git a/ui/latency/latency_info_unittest.cc b/ui/latency/latency_info_unittest.cc
index eb0c1ae2c23c0e75b0446464f006058aca210988..16e4abd3681b91882e7b8cadc1f438b453a8d843 100644
--- a/ui/latency/latency_info_unittest.cc
+++ b/ui/latency/latency_info_unittest.cc
@@ -12,11 +12,14 @@ namespace ui {
TEST(LatencyInfoTest, AddTwoSeparateEvent) {
LatencyInfo info;
+ info.set_trace_id(1);
+ EXPECT_FALSE(info.began());
info.AddLatencyNumberWithTimestamp(INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT,
0,
1,
base::TimeTicks::FromInternalValue(100),
1);
+ EXPECT_TRUE(info.began());
info.AddLatencyNumberWithTimestamp(INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT,
1,
5,
@@ -43,6 +46,7 @@ TEST(LatencyInfoTest, AddTwoSeparateEvent) {
TEST(LatencyInfoTest, AddTwoSameEvent) {
LatencyInfo info;
+ info.set_trace_id(1);
info.AddLatencyNumberWithTimestamp(INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT,
0,
30,
@@ -69,6 +73,7 @@ TEST(LatencyInfoTest, AddTwoSameEvent) {
TEST(LatencyInfoTest, RemoveLatency) {
LatencyInfo info;
+ info.set_trace_id(1);
info.AddLatencyNumber(INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT, 0, 0);
info.AddLatencyNumber(INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT, 1, 0);
info.AddLatencyNumber(INPUT_EVENT_LATENCY_UI_COMPONENT, 0, 0);
« no previous file with comments | « ui/latency/latency_info.cc ('k') | ui/latency/mojo/latency_info.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698