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

Unified Diff: cc/surfaces/compositor_frame_sink_support_unittest.cc

Issue 2806163004: Plumbing input event latency reporting through Mus GPU. (Closed)
Patch Set: Removing commented out code. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | cc/surfaces/surface_factory.cc » ('j') | gpu/ipc/in_process_command_buffer.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/surfaces/compositor_frame_sink_support_unittest.cc
diff --git a/cc/surfaces/compositor_frame_sink_support_unittest.cc b/cc/surfaces/compositor_frame_sink_support_unittest.cc
index 319471a9296c4d5b16daf5527727ca74d117b386..8c87647721434237bd33cae7abf4a76c8985bcaa 100644
--- a/cc/surfaces/compositor_frame_sink_support_unittest.cc
+++ b/cc/surfaces/compositor_frame_sink_support_unittest.cc
@@ -826,12 +826,20 @@ TEST_F(CompositorFrameSinkSupportTest,
ui::LatencyInfo aggregated_latency_info = info_list[0];
aggregated_latency_info.AddNewLatencyFrom(info_list[1]);
- EXPECT_EQ(2u, aggregated_latency_info.latency_components().size());
+
+ // Two components are the original ones, and the third one is
+ // DISPLAY_COMPOSITOR_RECEIVED_FRAME_COMPONENT, logged on compositor frame
+ // submit.
+ EXPECT_EQ(3u, aggregated_latency_info.latency_components().size());
ui::LatencyInfo::LatencyComponent comp1;
EXPECT_TRUE(
aggregated_latency_info.FindLatency(latency_type1, latency_id1, &comp1));
EXPECT_EQ(latency_sequence_number1, comp1.sequence_number);
+ EXPECT_TRUE(
+ aggregated_latency_info.FindLatency(latency_type2, latency_id2, nullptr));
+ EXPECT_TRUE(aggregated_latency_info.FindLatency(
+ ui::DISPLAY_COMPOSITOR_RECEIVED_FRAME_COMPONENT, nullptr));
}
// Checks whether the latency info are moved to the new surface from the old
@@ -894,12 +902,20 @@ TEST_F(CompositorFrameSinkSupportTest,
ui::LatencyInfo aggregated_latency_info = info_list[0];
aggregated_latency_info.AddNewLatencyFrom(info_list[1]);
- EXPECT_EQ(2u, aggregated_latency_info.latency_components().size());
+
+ // Two components are the original ones, and the third one is
+ // DISPLAY_COMPOSITOR_RECEIVED_FRAME_COMPONENT, logged on compositor frame
+ // submit.
+ EXPECT_EQ(3u, aggregated_latency_info.latency_components().size());
ui::LatencyInfo::LatencyComponent comp1;
EXPECT_TRUE(
aggregated_latency_info.FindLatency(latency_type1, latency_id1, &comp1));
EXPECT_EQ(latency_sequence_number1, comp1.sequence_number);
+ EXPECT_TRUE(
+ aggregated_latency_info.FindLatency(latency_type2, latency_id2, nullptr));
+ EXPECT_TRUE(aggregated_latency_info.FindLatency(
+ ui::DISPLAY_COMPOSITOR_RECEIVED_FRAME_COMPONENT, nullptr));
}
// Checks whether the latency info are moved to the new surface from the old
@@ -965,12 +981,20 @@ TEST_F(CompositorFrameSinkSupportTest,
ui::LatencyInfo aggregated_latency_info = info_list[0];
aggregated_latency_info.AddNewLatencyFrom(info_list[1]);
- EXPECT_EQ(2u, aggregated_latency_info.latency_components().size());
+
+ // Two components are the original ones, and the third one is
+ // DISPLAY_COMPOSITOR_RECEIVED_FRAME_COMPONENT, logged on compositor frame
+ // submit.
+ EXPECT_EQ(3u, aggregated_latency_info.latency_components().size());
ui::LatencyInfo::LatencyComponent comp1;
EXPECT_TRUE(
aggregated_latency_info.FindLatency(latency_type1, latency_id1, &comp1));
EXPECT_EQ(latency_sequence_number1, comp1.sequence_number);
+ EXPECT_TRUE(
+ aggregated_latency_info.FindLatency(latency_type2, latency_id2, nullptr));
+ EXPECT_TRUE(aggregated_latency_info.FindLatency(
+ ui::DISPLAY_COMPOSITOR_RECEIVED_FRAME_COMPONENT, nullptr));
}
TEST_F(CompositorFrameSinkSupportTest, PassesOnBeginFrameAcks) {
« no previous file with comments | « no previous file | cc/surfaces/surface_factory.cc » ('j') | gpu/ipc/in_process_command_buffer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698