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

Unified Diff: remoting/protocol/connection_unittest.cc

Issue 2413553003: Add InputEventTimestampSource interface. (Closed)
Patch Set: msvc compilation Created 4 years, 2 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 | « remoting/protocol/connection_to_client.h ('k') | remoting/protocol/fake_connection_to_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/connection_unittest.cc
diff --git a/remoting/protocol/connection_unittest.cc b/remoting/protocol/connection_unittest.cc
index 03ee5e35694e46be68aadc65ef3ddb955b9fd134..75318b34f91ea15fb5b583ac6f35b5375fedd7db 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)));
@@ -537,12 +535,15 @@ TEST_P(ConnectionTest, VideoStats) {
base::TimeTicks start_time = base::TimeTicks::Now();
+ scoped_refptr<InputEventTimestampsSourceImpl> input_event_timestamps_source =
+ new InputEventTimestampsSourceImpl();
+ input_event_timestamps_source->OnEventReceived(
+ InputEventTimestamps{start_time, 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->SetEventTimestampsSource(input_event_timestamps_source);
WaitFirstVideoFrame();
« no previous file with comments | « remoting/protocol/connection_to_client.h ('k') | remoting/protocol/fake_connection_to_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698