Index: remoting/protocol/connection_unittest.cc |
diff --git a/remoting/protocol/connection_unittest.cc b/remoting/protocol/connection_unittest.cc |
index 03ee5e35694e46be68aadc65ef3ddb955b9fd134..6572e54763de9bd6fd08c9fc55f55ad7f544a4e6 100644 |
--- a/remoting/protocol/connection_unittest.cc |
+++ b/remoting/protocol/connection_unittest.cc |
@@ -470,7 +470,6 @@ TEST_P(ConnectionTest, Events) { |
base::RunLoop run_loop; |
- EXPECT_CALL(host_event_handler_, OnInputEventReceived(_)); |
EXPECT_CALL(host_input_stub_, InjectKeyEvent(EqualsKeyEvent(event))) |
.WillOnce(QuitRunLoop(&run_loop)); |
@@ -515,7 +514,6 @@ TEST_P(ConnectionTest, DestroyOnIncomingMessage) { |
base::RunLoop run_loop; |
- EXPECT_CALL(host_event_handler_, OnInputEventReceived(_)); |
EXPECT_CALL(host_input_stub_, InjectKeyEvent(EqualsKeyEvent(event))) |
.WillOnce(DoAll(InvokeWithoutArgs(this, &ConnectionTest::DestroyHost), |
QuitRunLoop(&run_loop))); |
@@ -526,6 +524,8 @@ TEST_P(ConnectionTest, DestroyOnIncomingMessage) { |
run_loop.Run(); |
} |
+ |
+ |
TEST_P(ConnectionTest, VideoStats) { |
// Currently this test only works for WebRTC because for ICE connections stats |
// are reported by SoftwareVideoRenderer which is not used in this test. |
@@ -537,12 +537,15 @@ TEST_P(ConnectionTest, VideoStats) { |
base::TimeTicks start_time = base::TimeTicks::Now(); |
+ scoped_refptr<InputEventTimestampSourceImpl> input_event_timestamp_source = |
+ new InputEventTimestampSourceImpl(); |
+ input_event_timestamp_source->OnEventReceived(InputEventTimestamps{ |
+ .client_timestamp = start_time, .host_timestamp = start_time}); |
+ |
std::unique_ptr<VideoStream> video_stream = |
host_connection_->StartVideoStream( |
base::MakeUnique<TestScreenCapturer>()); |
- |
- // Simulate an input invent injected at the start. |
- video_stream->OnInputEventReceived(start_time.ToInternalValue()); |
+ video_stream->SetEventTimestampSource(input_event_timestamp_source); |
WaitFirstVideoFrame(); |