Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(560)

Side by Side Diff: remoting/host/win/rdp_client_unittest.cc

Issue 1935003003: Fixing curtain mode using non-default RDP port for Windows host. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <stdint.h> 8 #include <stdint.h>
9 #include <string> 9 #include <string>
10 10
(...skipping 17 matching lines...) Expand all
28 using testing::InvokeWithoutArgs; 28 using testing::InvokeWithoutArgs;
29 29
30 namespace remoting { 30 namespace remoting {
31 31
32 namespace { 32 namespace {
33 33
34 // Default width and hight of the RDP client window. 34 // Default width and hight of the RDP client window.
35 const long kDefaultWidth = 1024; 35 const long kDefaultWidth = 1024;
36 const long kDefaultHeight = 768; 36 const long kDefaultHeight = 768;
37 37
38 const DWORD kDefaultRdpPort = 3389;
39
38 class MockRdpClientEventHandler : public RdpClient::EventHandler { 40 class MockRdpClientEventHandler : public RdpClient::EventHandler {
39 public: 41 public:
40 MockRdpClientEventHandler() {} 42 MockRdpClientEventHandler() {}
41 virtual ~MockRdpClientEventHandler() {} 43 virtual ~MockRdpClientEventHandler() {}
42 44
43 MOCK_METHOD0(OnRdpConnected, void()); 45 MOCK_METHOD0(OnRdpConnected, void());
44 MOCK_METHOD0(OnRdpClosed, void()); 46 MOCK_METHOD0(OnRdpClosed, void());
45 47
46 private: 48 private:
47 DISALLOW_COPY_AND_ASSIGN(MockRdpClientEventHandler); 49 DISALLOW_COPY_AND_ASSIGN(MockRdpClientEventHandler);
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 // An ability to establish a loopback RDP connection depends on many factors 157 // An ability to establish a loopback RDP connection depends on many factors
156 // including OS SKU and having RDP enabled. Accept both successful connection 158 // including OS SKU and having RDP enabled. Accept both successful connection
157 // and a connection error as a successful outcome. 159 // and a connection error as a successful outcome.
158 EXPECT_CALL(event_handler_, OnRdpConnected()) 160 EXPECT_CALL(event_handler_, OnRdpConnected())
159 .Times(AtMost(1)) 161 .Times(AtMost(1))
160 .WillOnce(Invoke(this, &RdpClientTest::OnRdpConnected)); 162 .WillOnce(Invoke(this, &RdpClientTest::OnRdpConnected));
161 EXPECT_CALL(event_handler_, OnRdpClosed()) 163 EXPECT_CALL(event_handler_, OnRdpClosed())
162 .Times(AtMost(1)) 164 .Times(AtMost(1))
163 .WillOnce(InvokeWithoutArgs(this, &RdpClientTest::CloseRdpClient)); 165 .WillOnce(InvokeWithoutArgs(this, &RdpClientTest::CloseRdpClient));
164 166
165 rdp_client_.reset(new RdpClient( 167 rdp_client_.reset(
166 task_runner_, task_runner_, 168 new RdpClient(task_runner_, task_runner_,
167 webrtc::DesktopSize(kDefaultWidth, kDefaultHeight), 169 webrtc::DesktopSize(kDefaultWidth, kDefaultHeight),
168 terminal_id_, &event_handler_)); 170 terminal_id_, kDefaultRdpPort, &event_handler_));
169 task_runner_ = nullptr; 171 task_runner_ = nullptr;
170 172
171 run_loop_.Run(); 173 run_loop_.Run();
172 } 174 }
173 175
174 } // namespace remoting 176 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698