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 #ifndef REMOTING_TEST_APP_REMOTING_TEST_DRIVER_ENVIRONMENT_H_ | 5 #ifndef REMOTING_TEST_APP_REMOTING_TEST_DRIVER_ENVIRONMENT_H_ |
6 #define REMOTING_TEST_APP_REMOTING_TEST_DRIVER_ENVIRONMENT_H_ | 6 #define REMOTING_TEST_APP_REMOTING_TEST_DRIVER_ENVIRONMENT_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
| 9 #include <memory> |
9 #include <string> | 10 #include <string> |
10 #include <vector> | 11 #include <vector> |
11 | 12 |
12 #include "base/files/file_path.h" | 13 #include "base/files/file_path.h" |
13 #include "base/macros.h" | 14 #include "base/macros.h" |
14 #include "base/memory/scoped_ptr.h" | |
15 #include "remoting/test/remote_application_details.h" | 15 #include "remoting/test/remote_application_details.h" |
16 #include "remoting/test/remote_host_info_fetcher.h" | 16 #include "remoting/test/remote_host_info_fetcher.h" |
17 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
18 | 18 |
19 namespace base { | 19 namespace base { |
20 class MessageLoopForIO; | 20 class MessageLoopForIO; |
21 } | 21 } |
22 | 22 |
23 namespace remoting { | 23 namespace remoting { |
24 namespace test { | 24 namespace test { |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 remoting::test::AppRemotingReportIssueRequest* | 143 remoting::test::AppRemotingReportIssueRequest* |
144 test_app_remoting_report_issue_request_; | 144 test_app_remoting_report_issue_request_; |
145 | 145 |
146 // RefreshTokenStore used by TestDriverEnvironment tests. | 146 // RefreshTokenStore used by TestDriverEnvironment tests. |
147 remoting::test::RefreshTokenStore* test_refresh_token_store_; | 147 remoting::test::RefreshTokenStore* test_refresh_token_store_; |
148 | 148 |
149 // RemoteHostInfoFetcher used by TestDriverEnvironment tests. | 149 // RemoteHostInfoFetcher used by TestDriverEnvironment tests. |
150 remoting::test::RemoteHostInfoFetcher* test_remote_host_info_fetcher_; | 150 remoting::test::RemoteHostInfoFetcher* test_remote_host_info_fetcher_; |
151 | 151 |
152 // Used for running network request tasks. | 152 // Used for running network request tasks. |
153 scoped_ptr<base::MessageLoopForIO> message_loop_; | 153 std::unique_ptr<base::MessageLoopForIO> message_loop_; |
154 | 154 |
155 // Contains the host ids to release when the environment is torn down. | 155 // Contains the host ids to release when the environment is torn down. |
156 // The key is the application id and the value is a list of hosts. | 156 // The key is the application id and the value is a list of hosts. |
157 std::map<std::string, std::vector<std::string>> host_ids_to_release_; | 157 std::map<std::string, std::vector<std::string>> host_ids_to_release_; |
158 | 158 |
159 DISALLOW_COPY_AND_ASSIGN(AppRemotingTestDriverEnvironment); | 159 DISALLOW_COPY_AND_ASSIGN(AppRemotingTestDriverEnvironment); |
160 }; | 160 }; |
161 | 161 |
162 // Used to provide application specific instances of the | 162 // Used to provide application specific instances of the |
163 // AppRemotingTestDriverEnvironment class. | 163 // AppRemotingTestDriverEnvironment class. |
164 extern scoped_ptr<AppRemotingTestDriverEnvironment> | 164 extern std::unique_ptr<AppRemotingTestDriverEnvironment> |
165 CreateAppRemotingTestDriverEnvironment( | 165 CreateAppRemotingTestDriverEnvironment( |
166 const AppRemotingTestDriverEnvironment::EnvironmentOptions& options); | 166 const AppRemotingTestDriverEnvironment::EnvironmentOptions& options); |
167 | 167 |
168 // Unfortunately a global var is how the GTEST framework handles sharing data | 168 // Unfortunately a global var is how the GTEST framework handles sharing data |
169 // between tests and keeping long-lived objects around. Used to share auth | 169 // between tests and keeping long-lived objects around. Used to share auth |
170 // tokens and remote host connection information across tests. | 170 // tokens and remote host connection information across tests. |
171 extern AppRemotingTestDriverEnvironment* AppRemotingSharedData; | 171 extern AppRemotingTestDriverEnvironment* AppRemotingSharedData; |
172 | 172 |
173 } // namespace test | 173 } // namespace test |
174 } // namespace remoting | 174 } // namespace remoting |
175 | 175 |
176 #endif // REMOTING_TEST_APP_REMOTING_TEST_DRIVER_ENVIRONMENT_H_ | 176 #endif // REMOTING_TEST_APP_REMOTING_TEST_DRIVER_ENVIRONMENT_H_ |
OLD | NEW |