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/remote_host_info_fetcher.h" | 5 #include "remoting/test/remote_host_info_fetcher.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 net::URLRequestStatus::Status status); | 75 net::URLRequestStatus::Status status); |
76 | 76 |
77 // Used for result verification. | 77 // Used for result verification. |
78 RemoteHostInfo remote_host_info_; | 78 RemoteHostInfo remote_host_info_; |
79 | 79 |
80 std::string dev_service_environment_url_; | 80 std::string dev_service_environment_url_; |
81 std::string dev_service_environment_url_2_; | 81 std::string dev_service_environment_url_2_; |
82 | 82 |
83 private: | 83 private: |
84 net::FakeURLFetcherFactory url_fetcher_factory_; | 84 net::FakeURLFetcherFactory url_fetcher_factory_; |
85 scoped_ptr<base::MessageLoopForIO> message_loop_; | 85 std::unique_ptr<base::MessageLoopForIO> message_loop_; |
86 | 86 |
87 DISALLOW_COPY_AND_ASSIGN(RemoteHostInfoFetcherTest); | 87 DISALLOW_COPY_AND_ASSIGN(RemoteHostInfoFetcherTest); |
88 }; | 88 }; |
89 | 89 |
90 void RemoteHostInfoFetcherTest::OnRemoteHostInfoRetrieved( | 90 void RemoteHostInfoFetcherTest::OnRemoteHostInfoRetrieved( |
91 base::Closure done_closure, | 91 base::Closure done_closure, |
92 const RemoteHostInfo& retrieved_remote_host_info) { | 92 const RemoteHostInfo& retrieved_remote_host_info) { |
93 remote_host_info_ = retrieved_remote_host_info; | 93 remote_host_info_ = retrieved_remote_host_info; |
94 | 94 |
95 done_closure.Run(); | 95 done_closure.Run(); |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
294 EXPECT_TRUE(remote_host_info_.IsReadyForConnection()); | 294 EXPECT_TRUE(remote_host_info_.IsReadyForConnection()); |
295 EXPECT_EQ(remote_host_info_.application_id.compare(kTestApplicationId2), 0); | 295 EXPECT_EQ(remote_host_info_.application_id.compare(kTestApplicationId2), 0); |
296 EXPECT_TRUE(!remote_host_info_.host_id.empty()); | 296 EXPECT_TRUE(!remote_host_info_.host_id.empty()); |
297 EXPECT_TRUE(!remote_host_info_.host_jid.empty()); | 297 EXPECT_TRUE(!remote_host_info_.host_jid.empty()); |
298 EXPECT_TRUE(!remote_host_info_.authorization_code.empty()); | 298 EXPECT_TRUE(!remote_host_info_.authorization_code.empty()); |
299 EXPECT_TRUE(!remote_host_info_.shared_secret.empty()); | 299 EXPECT_TRUE(!remote_host_info_.shared_secret.empty()); |
300 } | 300 } |
301 | 301 |
302 } // namespace test | 302 } // namespace test |
303 } // namespace remoting | 303 } // namespace remoting |
OLD | NEW |