OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 // ATL headers have to go first. | 5 // ATL headers have to go first. |
6 #include <atlbase.h> | 6 #include <atlbase.h> |
7 #include <atlhost.h> | 7 #include <atlhost.h> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 private: | 64 private: |
65 base::win::ScopedCOMInitializer com_initializer_; | 65 base::win::ScopedCOMInitializer com_initializer_; |
66 }; | 66 }; |
67 | 67 |
68 RdpClientModule::RdpClientModule() { | 68 RdpClientModule::RdpClientModule() { |
69 AtlAxWinInit(); | 69 AtlAxWinInit(); |
70 } | 70 } |
71 | 71 |
72 RdpClientModule::~RdpClientModule() { | 72 RdpClientModule::~RdpClientModule() { |
73 AtlAxWinTerm(); | 73 AtlAxWinTerm(); |
74 ATL::_pAtlModule = NULL; | 74 ATL::_pAtlModule = nullptr; |
75 } | 75 } |
76 | 76 |
77 } // namespace | 77 } // namespace |
78 | 78 |
79 class RdpClientTest : public testing::Test { | 79 class RdpClientTest : public testing::Test { |
80 public: | 80 public: |
81 RdpClientTest(); | 81 RdpClientTest(); |
82 virtual ~RdpClientTest(); | 82 virtual ~RdpClientTest(); |
83 | 83 |
84 virtual void SetUp() override; | 84 virtual void SetUp() override; |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 .Times(AtMost(1)) | 158 .Times(AtMost(1)) |
159 .WillOnce(Invoke(this, &RdpClientTest::OnRdpConnected)); | 159 .WillOnce(Invoke(this, &RdpClientTest::OnRdpConnected)); |
160 EXPECT_CALL(event_handler_, OnRdpClosed()) | 160 EXPECT_CALL(event_handler_, OnRdpClosed()) |
161 .Times(AtMost(1)) | 161 .Times(AtMost(1)) |
162 .WillOnce(InvokeWithoutArgs(this, &RdpClientTest::CloseRdpClient)); | 162 .WillOnce(InvokeWithoutArgs(this, &RdpClientTest::CloseRdpClient)); |
163 | 163 |
164 rdp_client_.reset(new RdpClient( | 164 rdp_client_.reset(new RdpClient( |
165 task_runner_, task_runner_, | 165 task_runner_, task_runner_, |
166 webrtc::DesktopSize(kDefaultWidth, kDefaultHeight), | 166 webrtc::DesktopSize(kDefaultWidth, kDefaultHeight), |
167 terminal_id_, &event_handler_)); | 167 terminal_id_, &event_handler_)); |
168 task_runner_ = NULL; | 168 task_runner_ = nullptr; |
169 | 169 |
170 run_loop_.Run(); | 170 run_loop_.Run(); |
171 } | 171 } |
172 | 172 |
173 } // namespace remoting | 173 } // namespace remoting |
OLD | NEW |