| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "remoting/test/app_remoting_connected_client_fixture.h" | 5 #include "remoting/test/app_remoting_connected_client_fixture.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/callback_helpers.h" | 9 #include "base/callback_helpers.h" |
| 10 #include "base/json/json_reader.h" | 10 #include "base/json/json_reader.h" |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 AppRemotingConnectedClientFixture::AppRemotingConnectedClientFixture() | 41 AppRemotingConnectedClientFixture::AppRemotingConnectedClientFixture() |
| 42 : application_details_( | 42 : application_details_( |
| 43 AppRemotingSharedData->GetDetailsFromAppName(GetParam())), | 43 AppRemotingSharedData->GetDetailsFromAppName(GetParam())), |
| 44 timer_(new base::Timer(true, false)) {} | 44 timer_(new base::Timer(true, false)) {} |
| 45 | 45 |
| 46 AppRemotingConnectedClientFixture::~AppRemotingConnectedClientFixture() {} | 46 AppRemotingConnectedClientFixture::~AppRemotingConnectedClientFixture() {} |
| 47 | 47 |
| 48 void AppRemotingConnectedClientFixture::SetUp() { | 48 void AppRemotingConnectedClientFixture::SetUp() { |
| 49 connection_helper_.reset( | 49 connection_helper_.reset( |
| 50 new AppRemotingConnectionHelper(application_details_)); | 50 new AppRemotingConnectionHelper(application_details_)); |
| 51 scoped_ptr<TestChromotingClient> test_chromoting_client( | 51 std::unique_ptr<TestChromotingClient> test_chromoting_client( |
| 52 new TestChromotingClient()); | 52 new TestChromotingClient()); |
| 53 | 53 |
| 54 test_chromoting_client->AddRemoteConnectionObserver(this); | 54 test_chromoting_client->AddRemoteConnectionObserver(this); |
| 55 | 55 |
| 56 connection_helper_->Initialize(std::move(test_chromoting_client)); | 56 connection_helper_->Initialize(std::move(test_chromoting_client)); |
| 57 if (!connection_helper_->StartConnection()) { | 57 if (!connection_helper_->StartConnection()) { |
| 58 LOG(ERROR) << "Remote host connection could not be established."; | 58 LOG(ERROR) << "Remote host connection could not be established."; |
| 59 FAIL(); | 59 FAIL(); |
| 60 } | 60 } |
| 61 } | 61 } |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 | 101 |
| 102 run_loop_->Run(); | 102 run_loop_->Run(); |
| 103 timer_->Stop(); | 103 timer_->Stop(); |
| 104 host_message_received_callback_.Reset(); | 104 host_message_received_callback_.Reset(); |
| 105 | 105 |
| 106 return message_received; | 106 return message_received; |
| 107 } | 107 } |
| 108 | 108 |
| 109 } // namespace test | 109 } // namespace test |
| 110 } // namespace remoting | 110 } // namespace remoting |
| OLD | NEW |