OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/host/setup/me2me_native_messaging_host.h" | 5 #include "remoting/host/setup/me2me_native_messaging_host.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <cstdint> | 9 #include <cstdint> |
10 #include <memory> | 10 #include <memory> |
11 #include <string> | 11 #include <string> |
12 #include <utility> | 12 #include <utility> |
13 | 13 |
14 #include "base/compiler_specific.h" | 14 #include "base/compiler_specific.h" |
15 #include "base/json/json_reader.h" | 15 #include "base/json/json_reader.h" |
16 #include "base/json/json_writer.h" | 16 #include "base/json/json_writer.h" |
17 #include "base/macros.h" | 17 #include "base/macros.h" |
18 #include "base/memory/ptr_util.h" | 18 #include "base/memory/ptr_util.h" |
19 #include "base/message_loop/message_loop.h" | 19 #include "base/message_loop/message_loop.h" |
20 #include "base/run_loop.h" | 20 #include "base/run_loop.h" |
21 #include "base/stl_util.h" | 21 #include "base/stl_util.h" |
22 #include "base/strings/stringize_macros.h" | 22 #include "base/strings/stringize_macros.h" |
23 #include "base/values.h" | 23 #include "base/values.h" |
24 #include "google_apis/gaia/gaia_oauth_client.h" | 24 #include "google_apis/gaia/gaia_oauth_client.h" |
25 #include "net/base/file_stream.h" | 25 #include "net/base/file_stream.h" |
26 #include "net/base/network_interfaces.h" | 26 #include "net/base/network_interfaces.h" |
27 #include "remoting/base/auto_thread_task_runner.h" | 27 #include "remoting/base/auto_thread_task_runner.h" |
| 28 #include "remoting/base/mock_oauth_client.h" |
28 #include "remoting/host/chromoting_host_context.h" | 29 #include "remoting/host/chromoting_host_context.h" |
29 #include "remoting/host/native_messaging/log_message_handler.h" | 30 #include "remoting/host/native_messaging/log_message_handler.h" |
30 #include "remoting/host/native_messaging/native_messaging_pipe.h" | 31 #include "remoting/host/native_messaging/native_messaging_pipe.h" |
31 #include "remoting/host/native_messaging/pipe_messaging_channel.h" | 32 #include "remoting/host/native_messaging/pipe_messaging_channel.h" |
32 #include "remoting/host/pin_hash.h" | 33 #include "remoting/host/pin_hash.h" |
33 #include "remoting/host/setup/mock_oauth_client.h" | |
34 #include "remoting/host/setup/test_util.h" | 34 #include "remoting/host/setup/test_util.h" |
35 #include "remoting/protocol/pairing_registry.h" | 35 #include "remoting/protocol/pairing_registry.h" |
36 #include "remoting/protocol/protocol_mock_objects.h" | 36 #include "remoting/protocol/protocol_mock_objects.h" |
37 #include "testing/gtest/include/gtest/gtest.h" | 37 #include "testing/gtest/include/gtest/gtest.h" |
38 | 38 |
39 using remoting::protocol::MockPairingRegistryDelegate; | 39 using remoting::protocol::MockPairingRegistryDelegate; |
40 using remoting::protocol::PairingRegistry; | 40 using remoting::protocol::PairingRegistry; |
41 using remoting::protocol::SynchronousPairingRegistry; | 41 using remoting::protocol::SynchronousPairingRegistry; |
42 | 42 |
43 namespace { | 43 namespace { |
(...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
643 } | 643 } |
644 | 644 |
645 // Verify rejection if getCredentialsFromAuthCode has no auth code. | 645 // Verify rejection if getCredentialsFromAuthCode has no auth code. |
646 TEST_F(Me2MeNativeMessagingHostTest, GetCredentialsFromAuthCodeNoAuthCode) { | 646 TEST_F(Me2MeNativeMessagingHostTest, GetCredentialsFromAuthCodeNoAuthCode) { |
647 base::DictionaryValue message; | 647 base::DictionaryValue message; |
648 message.SetString("type", "getCredentialsFromAuthCode"); | 648 message.SetString("type", "getCredentialsFromAuthCode"); |
649 TestBadRequest(message); | 649 TestBadRequest(message); |
650 } | 650 } |
651 | 651 |
652 } // namespace remoting | 652 } // namespace remoting |
OLD | NEW |