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/chromoting_test_driver_environment.h" | 5 #include "remoting/test/chromoting_test_driver_environment.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 | 43 |
44 // Helper method which has access to private method in class under test. | 44 // Helper method which has access to private method in class under test. |
45 bool RefreshHostList(); | 45 bool RefreshHostList(); |
46 | 46 |
47 HostInfo CreateFakeHostInfo(); | 47 HostInfo CreateFakeHostInfo(); |
48 | 48 |
49 FakeAccessTokenFetcher fake_access_token_fetcher_; | 49 FakeAccessTokenFetcher fake_access_token_fetcher_; |
50 FakeRefreshTokenStore fake_token_store_; | 50 FakeRefreshTokenStore fake_token_store_; |
51 FakeHostListFetcher fake_host_list_fetcher_; | 51 FakeHostListFetcher fake_host_list_fetcher_; |
52 | 52 |
53 scoped_ptr<ChromotingTestDriverEnvironment> environment_object_; | 53 std::unique_ptr<ChromotingTestDriverEnvironment> environment_object_; |
54 | 54 |
55 private: | 55 private: |
56 DISALLOW_COPY_AND_ASSIGN(ChromotingTestDriverEnvironmentTest); | 56 DISALLOW_COPY_AND_ASSIGN(ChromotingTestDriverEnvironmentTest); |
57 }; | 57 }; |
58 | 58 |
59 ChromotingTestDriverEnvironmentTest::ChromotingTestDriverEnvironmentTest() { | 59 ChromotingTestDriverEnvironmentTest::ChromotingTestDriverEnvironmentTest() { |
60 } | 60 } |
61 | 61 |
62 ChromotingTestDriverEnvironmentTest::~ChromotingTestDriverEnvironmentTest() { | 62 ChromotingTestDriverEnvironmentTest::~ChromotingTestDriverEnvironmentTest() { |
63 } | 63 } |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
272 // Set the host list fetcher to return an empty list. | 272 // Set the host list fetcher to return an empty list. |
273 fake_host_list_fetcher_.set_retrieved_host_list(std::vector<HostInfo>()); | 273 fake_host_list_fetcher_.set_retrieved_host_list(std::vector<HostInfo>()); |
274 environment_object_->SetHostNameForTest(kFakeHostNameValue); | 274 environment_object_->SetHostNameForTest(kFakeHostNameValue); |
275 environment_object_->SetHostJidForTest(kFakeHostJidValue); | 275 environment_object_->SetHostJidForTest(kFakeHostJidValue); |
276 EXPECT_FALSE(RefreshHostList()); | 276 EXPECT_FALSE(RefreshHostList()); |
277 EXPECT_FALSE(environment_object_->host_info().IsReadyForConnection()); | 277 EXPECT_FALSE(environment_object_->host_info().IsReadyForConnection()); |
278 } | 278 } |
279 | 279 |
280 } // namespace test | 280 } // namespace test |
281 } // namespace remoting | 281 } // namespace remoting |
OLD | NEW |