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

Side by Side Diff: remoting/host/client_session_unittest.cc

Issue 10911152: [Chromoting] Refactoring DesktopEnvironment and moving screen/audio recorders to ClientSession. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed ClientSessionTest.ClampMouseEvents and crash in JingleSessionManager::Close(). Created 8 years, 3 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 | Annotate | Revision Log
OLDNEW
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/message_loop.h" 5 #include "base/message_loop.h"
6 #include "remoting/base/constants.h" 6 #include "remoting/base/constants.h"
7 #include "remoting/host/audio_capturer.h"
7 #include "remoting/host/client_session.h" 8 #include "remoting/host/client_session.h"
9 #include "remoting/host/desktop_environment.h"
8 #include "remoting/host/host_mock_objects.h" 10 #include "remoting/host/host_mock_objects.h"
9 #include "remoting/protocol/protocol_mock_objects.h" 11 #include "remoting/protocol/protocol_mock_objects.h"
10 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
11 13
12 namespace remoting { 14 namespace remoting {
13 15
14 using protocol::MockClipboardStub; 16 using protocol::MockClipboardStub;
15 using protocol::MockConnectionToClient; 17 using protocol::MockConnectionToClient;
16 using protocol::MockConnectionToClientEventHandler; 18 using protocol::MockConnectionToClientEventHandler;
17 using protocol::MockHostStub; 19 using protocol::MockHostStub;
18 using protocol::MockInputStub; 20 using protocol::MockInputStub;
19 using protocol::MockSession; 21 using protocol::MockSession;
22 using protocol::SessionConfig;
20 23
21 using testing::_; 24 using testing::_;
25 using testing::AnyNumber;
22 using testing::DeleteArg; 26 using testing::DeleteArg;
23 using testing::InSequence; 27 using testing::InSequence;
24 using testing::Return; 28 using testing::Return;
25 using testing::ReturnRef; 29 using testing::ReturnRef;
26 30
27 class ClientSessionTest : public testing::Test { 31 class ClientSessionTest : public testing::Test {
28 public: 32 public:
29 ClientSessionTest() {} 33 ClientSessionTest() {}
30 34
31 virtual void SetUp() OVERRIDE { 35 virtual void SetUp() OVERRIDE {
36 message_loop_proxy_ = base::MessageLoopProxy::current();
37
38 EXPECT_CALL(context_, ui_task_runner())
39 .Times(AnyNumber())
40 .WillRepeatedly(Return(message_loop_proxy_.get()));
41 EXPECT_CALL(context_, capture_task_runner())
42 .Times(AnyNumber())
43 .WillRepeatedly(Return(message_loop_proxy_.get()));
44 EXPECT_CALL(context_, encode_task_runner())
45 .Times(AnyNumber())
46 .WillRepeatedly(Return(message_loop_proxy_.get()));
47 EXPECT_CALL(context_, network_task_runner())
48 .Times(AnyNumber())
49 .WillRepeatedly(Return(message_loop_proxy_.get()));
50
32 client_jid_ = "user@domain/rest-of-jid"; 51 client_jid_ = "user@domain/rest-of-jid";
33 52
53 event_executor_ = new MockEventExecutor();
54 capturer_ = new MockVideoFrameCapturer();
55 EXPECT_CALL(*capturer_, Start(_));
56 EXPECT_CALL(*capturer_, Stop());
57 EXPECT_CALL(*capturer_, InvalidateRegion(_)).Times(AnyNumber());
58 EXPECT_CALL(*capturer_, CaptureInvalidRegion(_)).Times(AnyNumber());
59
60 scoped_ptr<DesktopEnvironment> desktop_environment(new DesktopEnvironment(
61 scoped_ptr<AudioCapturer>(NULL),
62 scoped_ptr<EventExecutor>(event_executor_),
63 scoped_ptr<VideoFrameCapturer>(capturer_)));
64
34 // Set up a large default screen size that won't affect most tests. 65 // Set up a large default screen size that won't affect most tests.
35 default_screen_size_.set(1000, 1000); 66 default_screen_size_.set(1000, 1000);
36 EXPECT_CALL(capturer_, size_most_recent()) 67 EXPECT_CALL(*capturer_, size_most_recent())
37 .WillRepeatedly(ReturnRef(default_screen_size_)); 68 .WillRepeatedly(ReturnRef(default_screen_size_));
38 69
70 session_config_ = SessionConfig::GetDefault();
71
39 protocol::MockSession* session = new MockSession(); 72 protocol::MockSession* session = new MockSession();
73 EXPECT_CALL(*session, config()).WillRepeatedly(ReturnRef(session_config_));
40 EXPECT_CALL(*session, jid()).WillRepeatedly(ReturnRef(client_jid_)); 74 EXPECT_CALL(*session, jid()).WillRepeatedly(ReturnRef(client_jid_));
41 EXPECT_CALL(*session, SetEventHandler(_)); 75 EXPECT_CALL(*session, SetEventHandler(_));
42 EXPECT_CALL(*session, Close()); 76 EXPECT_CALL(*session, Close());
43 scoped_ptr<protocol::ConnectionToClient> connection( 77 scoped_ptr<protocol::ConnectionToClient> connection(
44 new protocol::ConnectionToClient(session)); 78 new protocol::ConnectionToClient(session));
45 connection_ = connection.get(); 79 connection_ = connection.get();
46 client_session_.reset(new ClientSession( 80
47 &session_event_handler_, connection.Pass(), 81 client_session_ = new ClientSession(
48 &host_clipboard_stub_, &host_input_stub_, &capturer_, 82 &session_event_handler_,
49 base::TimeDelta())); 83 context_.capture_task_runner(),
84 context_.encode_task_runner(),
85 context_.network_task_runner(),
86 connection.Pass(),
87 desktop_environment.Pass(),
88 base::TimeDelta());
50 } 89 }
51 90
52 virtual void TearDown() OVERRIDE { 91 virtual void TearDown() OVERRIDE {
53 client_session_.reset(); 92 // MockClientSessionEventHandler won't trigger StopAndDelete, so fake it.
54 // Run message loop before destroying because protocol::Session is 93 client_session_->StopAndDelete(base::Bind(
55 // destroyed asynchronously. 94 &ClientSessionTest::OnClientStopped, base::Unretained(this)));
56 message_loop_.RunAllPending(); 95
96 // Run message loop before destroying because the session is destroyed
97 // asynchronously.
98 message_loop_.Run();
99
100 // Verify that the client session has been stopped.
101 EXPECT_TRUE(client_session_ == NULL);
57 } 102 }
58 103
59 protected: 104 protected:
60 void DisconnectClientSession() { 105 void DisconnectClientSession() {
61 client_session_->Disconnect(); 106 client_session_->Disconnect();
62 // MockSession won't trigger OnConnectionClosed, so fake it. 107 // MockSession won't trigger OnConnectionClosed, so fake it.
63 client_session_->OnConnectionClosed(client_session_->connection(), 108 client_session_->OnConnectionClosed(client_session_->connection(),
64 protocol::OK); 109 protocol::OK);
65 } 110 }
66 111
112 void OnClientStopped() {
113 client_session_ = NULL;
114 message_loop_.PostTask(FROM_HERE, MessageLoop::QuitClosure());
115 }
116
117 MockChromotingHostContext context_;
118 scoped_refptr<base::MessageLoopProxy> message_loop_proxy_;
67 SkISize default_screen_size_; 119 SkISize default_screen_size_;
68 MessageLoop message_loop_; 120 MessageLoop message_loop_;
69 std::string client_jid_; 121 std::string client_jid_;
70 MockHostStub host_stub_; 122 MockHostStub host_stub_;
71 MockClipboardStub host_clipboard_stub_; 123 MockEventExecutor* event_executor_;
72 MockInputStub host_input_stub_; 124 MockVideoFrameCapturer* capturer_;
73 MockVideoFrameCapturer capturer_;
74 MockClientSessionEventHandler session_event_handler_; 125 MockClientSessionEventHandler session_event_handler_;
75 scoped_ptr<ClientSession> client_session_; 126 ClientSession* client_session_;
127 SessionConfig session_config_;
76 128
77 // ClientSession owns |connection_| but tests need it to inject fake events. 129 // ClientSession owns |connection_| but tests need it to inject fake events.
78 protocol::ConnectionToClient* connection_; 130 protocol::ConnectionToClient* connection_;
79 }; 131 };
80 132
81 MATCHER_P2(EqualsClipboardEvent, m, d, "") { 133 MATCHER_P2(EqualsClipboardEvent, m, d, "") {
82 return (strcmp(arg.mime_type().c_str(), m) == 0 && 134 return (strcmp(arg.mime_type().c_str(), m) == 0 &&
83 memcmp(arg.data().data(), d, arg.data().size()) == 0); 135 memcmp(arg.data().data(), d, arg.data().size()) == 0);
84 } 136 }
85 137
86 TEST_F(ClientSessionTest, ClipboardStubFilter) { 138 TEST_F(ClientSessionTest, ClipboardStubFilter) {
87 protocol::ClipboardEvent clipboard_event1; 139 protocol::ClipboardEvent clipboard_event1;
88 clipboard_event1.set_mime_type(kMimeTypeTextUtf8); 140 clipboard_event1.set_mime_type(kMimeTypeTextUtf8);
89 clipboard_event1.set_data("a"); 141 clipboard_event1.set_data("a");
90 142
91 protocol::ClipboardEvent clipboard_event2; 143 protocol::ClipboardEvent clipboard_event2;
92 clipboard_event2.set_mime_type(kMimeTypeTextUtf8); 144 clipboard_event2.set_mime_type(kMimeTypeTextUtf8);
93 clipboard_event2.set_data("b"); 145 clipboard_event2.set_data("b");
94 146
95 protocol::ClipboardEvent clipboard_event3; 147 protocol::ClipboardEvent clipboard_event3;
96 clipboard_event3.set_mime_type(kMimeTypeTextUtf8); 148 clipboard_event3.set_mime_type(kMimeTypeTextUtf8);
97 clipboard_event3.set_data("c"); 149 clipboard_event3.set_data("c");
98 150
99 InSequence s; 151 InSequence s;
100 EXPECT_CALL(session_event_handler_, OnSessionAuthenticated(_)); 152 EXPECT_CALL(session_event_handler_, OnSessionAuthenticated(_));
153 EXPECT_CALL(*event_executor_, StartPtr(_));
101 EXPECT_CALL(session_event_handler_, OnSessionChannelsConnected(_)); 154 EXPECT_CALL(session_event_handler_, OnSessionChannelsConnected(_));
102 EXPECT_CALL(host_clipboard_stub_, InjectClipboardEvent(EqualsClipboardEvent( 155 EXPECT_CALL(*event_executor_, InjectClipboardEvent(EqualsClipboardEvent(
103 kMimeTypeTextUtf8, "b"))); 156 kMimeTypeTextUtf8, "b")));
104 EXPECT_CALL(session_event_handler_, OnSessionClosed(_)); 157 EXPECT_CALL(session_event_handler_, OnSessionClosed(_));
158 EXPECT_CALL(*event_executor_, StopAndDeleteMock());
105 159
106 // This event should not get through to the clipboard stub, 160 // This event should not get through to the clipboard stub,
107 // because the client isn't authenticated yet. 161 // because the client isn't authenticated yet.
108 connection_->clipboard_stub()->InjectClipboardEvent(clipboard_event1); 162 connection_->clipboard_stub()->InjectClipboardEvent(clipboard_event1);
109 client_session_->OnConnectionAuthenticated(client_session_->connection()); 163 client_session_->OnConnectionAuthenticated(client_session_->connection());
110 client_session_->OnConnectionChannelsConnected(client_session_->connection()); 164 client_session_->OnConnectionChannelsConnected(client_session_->connection());
111 // This event should get through to the clipboard stub. 165 // This event should get through to the clipboard stub.
112 connection_->clipboard_stub()->InjectClipboardEvent(clipboard_event2); 166 connection_->clipboard_stub()->InjectClipboardEvent(clipboard_event2);
113 DisconnectClientSession(); 167 DisconnectClientSession();
114 // This event should not get through to the clipboard stub, 168 // This event should not get through to the clipboard stub,
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 protocol::MouseEvent mouse_event2; 206 protocol::MouseEvent mouse_event2;
153 mouse_event2.set_x(200); 207 mouse_event2.set_x(200);
154 mouse_event2.set_y(201); 208 mouse_event2.set_y(201);
155 209
156 protocol::MouseEvent mouse_event3; 210 protocol::MouseEvent mouse_event3;
157 mouse_event3.set_x(300); 211 mouse_event3.set_x(300);
158 mouse_event3.set_y(301); 212 mouse_event3.set_y(301);
159 213
160 InSequence s; 214 InSequence s;
161 EXPECT_CALL(session_event_handler_, OnSessionAuthenticated(_)); 215 EXPECT_CALL(session_event_handler_, OnSessionAuthenticated(_));
216 EXPECT_CALL(*event_executor_, StartPtr(_));
162 EXPECT_CALL(session_event_handler_, OnSessionChannelsConnected(_)); 217 EXPECT_CALL(session_event_handler_, OnSessionChannelsConnected(_));
163 EXPECT_CALL(host_input_stub_, InjectKeyEvent(EqualsKeyEvent(2, true))); 218 EXPECT_CALL(*event_executor_, InjectKeyEvent(EqualsKeyEvent(2, true)));
164 EXPECT_CALL(host_input_stub_, InjectKeyEvent(EqualsKeyEvent(2, false))); 219 EXPECT_CALL(*event_executor_, InjectKeyEvent(EqualsKeyEvent(2, false)));
165 EXPECT_CALL(host_input_stub_, InjectMouseEvent(EqualsMouseEvent(200, 201))); 220 EXPECT_CALL(*event_executor_, InjectMouseEvent(EqualsMouseEvent(200, 201)));
166 EXPECT_CALL(session_event_handler_, OnSessionClosed(_)); 221 EXPECT_CALL(session_event_handler_, OnSessionClosed(_));
222 EXPECT_CALL(*event_executor_, StopAndDeleteMock());
167 223
168 // These events should not get through to the input stub, 224 // These events should not get through to the input stub,
169 // because the client isn't authenticated yet. 225 // because the client isn't authenticated yet.
170 connection_->input_stub()->InjectKeyEvent(key_event1); 226 connection_->input_stub()->InjectKeyEvent(key_event1);
171 connection_->input_stub()->InjectMouseEvent(mouse_event1); 227 connection_->input_stub()->InjectMouseEvent(mouse_event1);
172 client_session_->OnConnectionAuthenticated(client_session_->connection()); 228 client_session_->OnConnectionAuthenticated(client_session_->connection());
173 client_session_->OnConnectionChannelsConnected(client_session_->connection()); 229 client_session_->OnConnectionChannelsConnected(client_session_->connection());
174 // These events should get through to the input stub. 230 // These events should get through to the input stub.
175 connection_->input_stub()->InjectKeyEvent(key_event2_down); 231 connection_->input_stub()->InjectKeyEvent(key_event2_down);
176 connection_->input_stub()->InjectKeyEvent(key_event2_up); 232 connection_->input_stub()->InjectKeyEvent(key_event2_up);
(...skipping 11 matching lines...) Expand all
188 mouse_event1.set_y(101); 244 mouse_event1.set_y(101);
189 protocol::MouseEvent mouse_event2; 245 protocol::MouseEvent mouse_event2;
190 mouse_event2.set_x(200); 246 mouse_event2.set_x(200);
191 mouse_event2.set_y(201); 247 mouse_event2.set_y(201);
192 protocol::MouseEvent mouse_event3; 248 protocol::MouseEvent mouse_event3;
193 mouse_event3.set_x(300); 249 mouse_event3.set_x(300);
194 mouse_event3.set_y(301); 250 mouse_event3.set_y(301);
195 251
196 InSequence s; 252 InSequence s;
197 EXPECT_CALL(session_event_handler_, OnSessionAuthenticated(_)); 253 EXPECT_CALL(session_event_handler_, OnSessionAuthenticated(_));
254 EXPECT_CALL(*event_executor_, StartPtr(_));
198 EXPECT_CALL(session_event_handler_, OnSessionChannelsConnected(_)); 255 EXPECT_CALL(session_event_handler_, OnSessionChannelsConnected(_));
199 EXPECT_CALL(host_input_stub_, InjectMouseEvent(EqualsMouseEvent(100, 101))); 256 EXPECT_CALL(*event_executor_, InjectMouseEvent(EqualsMouseEvent(100, 101)));
200 EXPECT_CALL(host_input_stub_, InjectMouseEvent(EqualsMouseEvent(200, 201))); 257 EXPECT_CALL(*event_executor_, InjectMouseEvent(EqualsMouseEvent(200, 201)));
201 EXPECT_CALL(session_event_handler_, OnSessionClosed(_)); 258 EXPECT_CALL(session_event_handler_, OnSessionClosed(_));
259 EXPECT_CALL(*event_executor_, StopAndDeleteMock());
202 260
203 client_session_->OnConnectionAuthenticated(client_session_->connection()); 261 client_session_->OnConnectionAuthenticated(client_session_->connection());
204 client_session_->OnConnectionChannelsConnected(client_session_->connection()); 262 client_session_->OnConnectionChannelsConnected(client_session_->connection());
205 // This event should get through to the input stub. 263 // This event should get through to the input stub.
206 connection_->input_stub()->InjectMouseEvent(mouse_event1); 264 connection_->input_stub()->InjectMouseEvent(mouse_event1);
207 // This one should too because the local event echoes the remote one. 265 // This one should too because the local event echoes the remote one.
208 client_session_->LocalMouseMoved(SkIPoint::Make(mouse_event1.x(), 266 client_session_->LocalMouseMoved(SkIPoint::Make(mouse_event1.x(),
209 mouse_event1.y())); 267 mouse_event1.y()));
210 connection_->input_stub()->InjectMouseEvent(mouse_event2); 268 connection_->input_stub()->InjectMouseEvent(mouse_event2);
211 // This one should not. 269 // This one should not.
(...skipping 13 matching lines...) Expand all
225 protocol::KeyEvent key2; 283 protocol::KeyEvent key2;
226 key2.set_pressed(true); 284 key2.set_pressed(true);
227 key2.set_keycode(2); 285 key2.set_keycode(2);
228 286
229 protocol::MouseEvent mousedown; 287 protocol::MouseEvent mousedown;
230 mousedown.set_button(protocol::MouseEvent::BUTTON_LEFT); 288 mousedown.set_button(protocol::MouseEvent::BUTTON_LEFT);
231 mousedown.set_button_down(true); 289 mousedown.set_button_down(true);
232 290
233 InSequence s; 291 InSequence s;
234 EXPECT_CALL(session_event_handler_, OnSessionAuthenticated(_)); 292 EXPECT_CALL(session_event_handler_, OnSessionAuthenticated(_));
293 EXPECT_CALL(*event_executor_, StartPtr(_));
235 EXPECT_CALL(session_event_handler_, OnSessionChannelsConnected(_)); 294 EXPECT_CALL(session_event_handler_, OnSessionChannelsConnected(_));
236 EXPECT_CALL(host_input_stub_, InjectKeyEvent(EqualsKeyEvent(1, true))); 295 EXPECT_CALL(*event_executor_, InjectKeyEvent(EqualsKeyEvent(1, true)));
237 EXPECT_CALL(host_input_stub_, InjectKeyEvent(EqualsKeyEvent(2, true))); 296 EXPECT_CALL(*event_executor_, InjectKeyEvent(EqualsKeyEvent(2, true)));
238 EXPECT_CALL(host_input_stub_, InjectMouseEvent(EqualsMouseButtonEvent( 297 EXPECT_CALL(*event_executor_, InjectMouseEvent(EqualsMouseButtonEvent(
239 protocol::MouseEvent::BUTTON_LEFT, true))); 298 protocol::MouseEvent::BUTTON_LEFT, true)));
240 EXPECT_CALL(host_input_stub_, InjectKeyEvent(EqualsKeyEvent(1, false))); 299 EXPECT_CALL(*event_executor_, InjectKeyEvent(EqualsKeyEvent(1, false)));
241 EXPECT_CALL(host_input_stub_, InjectKeyEvent(EqualsKeyEvent(2, false))); 300 EXPECT_CALL(*event_executor_, InjectKeyEvent(EqualsKeyEvent(2, false)));
242 EXPECT_CALL(host_input_stub_, InjectMouseEvent(EqualsMouseButtonEvent( 301 EXPECT_CALL(*event_executor_, InjectMouseEvent(EqualsMouseButtonEvent(
243 protocol::MouseEvent::BUTTON_LEFT, false))); 302 protocol::MouseEvent::BUTTON_LEFT, false)));
244 EXPECT_CALL(session_event_handler_, OnSessionClosed(_)); 303 EXPECT_CALL(session_event_handler_, OnSessionClosed(_));
304 EXPECT_CALL(*event_executor_, StopAndDeleteMock());
245 305
246 client_session_->OnConnectionAuthenticated(client_session_->connection()); 306 client_session_->OnConnectionAuthenticated(client_session_->connection());
247 client_session_->OnConnectionChannelsConnected(client_session_->connection()); 307 client_session_->OnConnectionChannelsConnected(client_session_->connection());
248 308
249 connection_->input_stub()->InjectKeyEvent(key1); 309 connection_->input_stub()->InjectKeyEvent(key1);
250 connection_->input_stub()->InjectKeyEvent(key2); 310 connection_->input_stub()->InjectKeyEvent(key2);
251 connection_->input_stub()->InjectMouseEvent(mousedown); 311 connection_->input_stub()->InjectMouseEvent(mousedown);
252 312
253 DisconnectClientSession(); 313 DisconnectClientSession();
254 } 314 }
255 315
256 TEST_F(ClientSessionTest, ClampMouseEvents) { 316 TEST_F(ClientSessionTest, ClampMouseEvents) {
257 SkISize screen(SkISize::Make(200, 100)); 317 SkISize screen(SkISize::Make(200, 100));
258 EXPECT_CALL(capturer_, size_most_recent()) 318 EXPECT_CALL(*capturer_, size_most_recent())
259 .WillRepeatedly(ReturnRef(screen)); 319 .WillRepeatedly(ReturnRef(screen));
260 320
261 EXPECT_CALL(session_event_handler_, OnSessionAuthenticated(_)); 321 EXPECT_CALL(session_event_handler_, OnSessionAuthenticated(_));
322 EXPECT_CALL(*event_executor_, StartPtr(_));
262 EXPECT_CALL(session_event_handler_, OnSessionChannelsConnected(_)); 323 EXPECT_CALL(session_event_handler_, OnSessionChannelsConnected(_));
263 EXPECT_CALL(session_event_handler_, OnSessionClosed(_)); 324 EXPECT_CALL(session_event_handler_, OnSessionClosed(_));
325 EXPECT_CALL(*event_executor_, StopAndDeleteMock());
264 326
265 client_session_->OnConnectionAuthenticated(client_session_->connection()); 327 client_session_->OnConnectionAuthenticated(client_session_->connection());
266 client_session_->OnConnectionChannelsConnected(client_session_->connection()); 328 client_session_->OnConnectionChannelsConnected(client_session_->connection());
267 329
268 int input_x[3] = { -999, 100, 999 }; 330 int input_x[3] = { -999, 100, 999 };
269 int expected_x[3] = { 0, 100, 199 }; 331 int expected_x[3] = { 0, 100, 199 };
270 int input_y[3] = { -999, 50, 999 }; 332 int input_y[3] = { -999, 50, 999 };
271 int expected_y[3] = { 0, 50, 99 }; 333 int expected_y[3] = { 0, 50, 99 };
272 334
273 protocol::MouseEvent event; 335 protocol::MouseEvent event;
274 for (int j = 0; j < 3; j++) { 336 for (int j = 0; j < 3; j++) {
275 for (int i = 0; i < 3; i++) { 337 for (int i = 0; i < 3; i++) {
276 event.set_x(input_x[i]); 338 event.set_x(input_x[i]);
277 event.set_y(input_y[j]); 339 event.set_y(input_y[j]);
278 EXPECT_CALL(host_input_stub_, InjectMouseEvent(EqualsMouseEvent( 340 EXPECT_CALL(*event_executor_, InjectMouseEvent(EqualsMouseEvent(
279 expected_x[i], expected_y[j]))); 341 expected_x[i], expected_y[j])));
280 connection_->input_stub()->InjectMouseEvent(event); 342 connection_->input_stub()->InjectMouseEvent(event);
281 } 343 }
282 } 344 }
283 345
284 DisconnectClientSession(); 346 DisconnectClientSession();
285 } 347 }
286 348
287 } // namespace remoting 349 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698