| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "base/bind.h" | 5 #include "base/bind.h" |
| 6 #include "base/bind_helpers.h" | 6 #include "base/bind_helpers.h" |
| 7 #include "base/location.h" | 7 #include "base/location.h" |
| 8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "base/process/process.h" | 9 #include "base/process/process.h" |
| 10 #include "ipc/ipc_message.h" | 10 #include "ipc/ipc_message.h" |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 // Notify the mock method. | 114 // Notify the mock method. |
| 115 Sent(*message); | 115 Sent(*message); |
| 116 delete message; | 116 delete message; |
| 117 } | 117 } |
| 118 | 118 |
| 119 } // namespace | 119 } // namespace |
| 120 | 120 |
| 121 class DaemonProcessTest : public testing::Test { | 121 class DaemonProcessTest : public testing::Test { |
| 122 public: | 122 public: |
| 123 DaemonProcessTest(); | 123 DaemonProcessTest(); |
| 124 virtual ~DaemonProcessTest(); | 124 ~DaemonProcessTest() override; |
| 125 | 125 |
| 126 virtual void SetUp() override; | 126 void SetUp() override; |
| 127 virtual void TearDown() override; | 127 void TearDown() override; |
| 128 | 128 |
| 129 // DaemonProcess mocks | 129 // DaemonProcess mocks |
| 130 DesktopSession* DoCreateDesktopSession(int terminal_id); | 130 DesktopSession* DoCreateDesktopSession(int terminal_id); |
| 131 void DoCrashNetworkProcess(const tracked_objects::Location& location); | 131 void DoCrashNetworkProcess(const tracked_objects::Location& location); |
| 132 void LaunchNetworkProcess(); | 132 void LaunchNetworkProcess(); |
| 133 | 133 |
| 134 // Deletes |daemon_process_|. | 134 // Deletes |daemon_process_|. |
| 135 void DeleteDaemonProcess(); | 135 void DeleteDaemonProcess(); |
| 136 | 136 |
| 137 // Quits |message_loop_|. | 137 // Quits |message_loop_|. |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 332 EXPECT_EQ(1u, desktop_sessions().size()); | 332 EXPECT_EQ(1u, desktop_sessions().size()); |
| 333 EXPECT_EQ(id, desktop_sessions().front()->id()); | 333 EXPECT_EQ(id, desktop_sessions().front()->id()); |
| 334 | 334 |
| 335 EXPECT_TRUE(daemon_process_->OnMessageReceived( | 335 EXPECT_TRUE(daemon_process_->OnMessageReceived( |
| 336 ChromotingNetworkHostMsg_ConnectTerminal(id, resolution, false))); | 336 ChromotingNetworkHostMsg_ConnectTerminal(id, resolution, false))); |
| 337 EXPECT_TRUE(desktop_sessions().empty()); | 337 EXPECT_TRUE(desktop_sessions().empty()); |
| 338 EXPECT_EQ(0, terminal_id_); | 338 EXPECT_EQ(0, terminal_id_); |
| 339 } | 339 } |
| 340 | 340 |
| 341 } // namespace remoting | 341 } // namespace remoting |
| OLD | NEW |