Chromium Code Reviews| Index: remoting/test/app_remoting_latency_test_fixture.cc |
| diff --git a/remoting/test/app_remoting_latency_test_fixture.cc b/remoting/test/app_remoting_latency_test_fixture.cc |
| index 95b8e07d43162c30a30c87ac3767e7cbfe23cd7a..05a7af829a550cb0eeb3df8826299c91de46811d 100644 |
| --- a/remoting/test/app_remoting_latency_test_fixture.cc |
| +++ b/remoting/test/app_remoting_latency_test_fixture.cc |
| @@ -36,6 +36,10 @@ void AppRemotingLatencyTestFixture::SetUp() { |
| scoped_ptr<TestChromotingClient> test_chromoting_client( |
| new TestChromotingClient(test_video_renderer.Pass())); |
| + test_chromoting_client_ = test_chromoting_client->GetWeakPtr(); |
| + |
| + test_chromoting_client_->AddRemoteConnectionObserver(this); |
| + |
| connection_helper_.reset( |
| new AppRemotingConnectionHelper(GetApplicationDetails())); |
| connection_helper_->Initialize(test_chromoting_client.Pass()); |
| @@ -44,6 +48,11 @@ void AppRemotingLatencyTestFixture::SetUp() { |
| LOG(ERROR) << "Remote host connection could not be established."; |
| FAIL(); |
| } |
| + |
| + if (!CreateNewDocument()) { |
| + LOG(ERROR) << "New document could not be created."; |
| + FAIL(); |
|
joedow
2015/07/23 20:26:56
Have you run this through the try-bots yet? I see
liaoyuke
2015/07/24 02:07:28
Yeah, I'll run try-bots on my next patch.
|
| + } |
| } |
| void AppRemotingLatencyTestFixture::TearDown() { |
| @@ -52,6 +61,7 @@ void AppRemotingLatencyTestFixture::TearDown() { |
| ResetApplicationState(); |
| } |
| + test_chromoting_client_->RemoveRemoteConnectionObserver(this); |
| connection_helper_.reset(); |
| } |
| @@ -91,6 +101,15 @@ bool AppRemotingLatencyTestFixture::WaitForImagePatternMatch( |
| return image_pattern_is_matched; |
| } |
| +void AppRemotingLatencyTestFixture::HostMessageReceived( |
| + const protocol::ExtensionMessage& message) { |
| + DCHECK(thread_checker_.CalledOnValidThread()); |
| + |
| + if (!host_message_received_callback_.is_null()) { |
| + host_message_received_callback_.Run(message); |
| + } |
| +} |
| + |
| void AppRemotingLatencyTestFixture::PressKey(uint32_t usb_keycode, |
| bool pressed) { |
| remoting::protocol::KeyEvent event; |