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 <algorithm> | 5 #include <algorithm> |
6 #include <string> | 6 #include <string> |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
438 | 438 |
439 mouse_event.set_x(300); | 439 mouse_event.set_x(300); |
440 mouse_event.set_y(301); | 440 mouse_event.set_y(301); |
441 connection_->input_stub()->InjectMouseEvent(mouse_event); | 441 connection_->input_stub()->InjectMouseEvent(mouse_event); |
442 | 442 |
443 client_session_->DisconnectSession(); | 443 client_session_->DisconnectSession(); |
444 client_session_->OnConnectionClosed(connection_, protocol::OK); | 444 client_session_->OnConnectionClosed(connection_, protocol::OK); |
445 client_session_.reset(); | 445 client_session_.reset(); |
446 } | 446 } |
447 | 447 |
448 TEST_F(ClientSessionTest, LocalInputTest) { | 448 // crbug.com/458691 |
| 449 TEST_F(ClientSessionTest, DISABLED_LocalInputTest) { |
449 CreateClientSession(); | 450 CreateClientSession(); |
450 | 451 |
451 protocol::MouseEvent mouse_event1; | 452 protocol::MouseEvent mouse_event1; |
452 mouse_event1.set_x(100); | 453 mouse_event1.set_x(100); |
453 mouse_event1.set_y(101); | 454 mouse_event1.set_y(101); |
454 protocol::MouseEvent mouse_event2; | 455 protocol::MouseEvent mouse_event2; |
455 mouse_event2.set_x(200); | 456 mouse_event2.set_x(200); |
456 mouse_event2.set_y(201); | 457 mouse_event2.set_y(201); |
457 protocol::MouseEvent mouse_event3; | 458 protocol::MouseEvent mouse_event3; |
458 mouse_event3.set_x(300); | 459 mouse_event3.set_x(300); |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
494 EXPECT_CALL(*input_injector_, InjectMouseEvent(EqualsMouseEvent(100, 101))) | 495 EXPECT_CALL(*input_injector_, InjectMouseEvent(EqualsMouseEvent(100, 101))) |
495 .InSequence(s); | 496 .InSequence(s); |
496 EXPECT_CALL(*input_injector_, InjectMouseEvent(EqualsMouseEvent(200, 201))) | 497 EXPECT_CALL(*input_injector_, InjectMouseEvent(EqualsMouseEvent(200, 201))) |
497 .InSequence(s); | 498 .InSequence(s); |
498 EXPECT_CALL(session_event_handler_, OnSessionClosed(_)) | 499 EXPECT_CALL(session_event_handler_, OnSessionClosed(_)) |
499 .InSequence(s); | 500 .InSequence(s); |
500 | 501 |
501 ConnectClientSession(); | 502 ConnectClientSession(); |
502 } | 503 } |
503 | 504 |
504 TEST_F(ClientSessionTest, RestoreEventState) { | 505 // crbug.com/458691 |
| 506 TEST_F(ClientSessionTest, DISABLED_RestoreEventState) { |
505 CreateClientSession(); | 507 CreateClientSession(); |
506 | 508 |
507 protocol::KeyEvent key1; | 509 protocol::KeyEvent key1; |
508 key1.set_pressed(true); | 510 key1.set_pressed(true); |
509 key1.set_usb_keycode(1); | 511 key1.set_usb_keycode(1); |
510 | 512 |
511 protocol::KeyEvent key2; | 513 protocol::KeyEvent key2; |
512 key2.set_pressed(true); | 514 key2.set_pressed(true); |
513 key2.set_usb_keycode(2); | 515 key2.set_usb_keycode(2); |
514 | 516 |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
550 .InSequence(s); | 552 .InSequence(s); |
551 EXPECT_CALL(*input_injector_, InjectMouseEvent(EqualsMouseButtonEvent( | 553 EXPECT_CALL(*input_injector_, InjectMouseEvent(EqualsMouseButtonEvent( |
552 protocol::MouseEvent::BUTTON_LEFT, false))) | 554 protocol::MouseEvent::BUTTON_LEFT, false))) |
553 .InSequence(s); | 555 .InSequence(s); |
554 EXPECT_CALL(session_event_handler_, OnSessionClosed(_)) | 556 EXPECT_CALL(session_event_handler_, OnSessionClosed(_)) |
555 .InSequence(s); | 557 .InSequence(s); |
556 | 558 |
557 ConnectClientSession(); | 559 ConnectClientSession(); |
558 } | 560 } |
559 | 561 |
560 TEST_F(ClientSessionTest, ClampMouseEvents) { | 562 // crbug.com/458691 |
| 563 TEST_F(ClientSessionTest, DISABLED_ClampMouseEvents) { |
561 CreateClientSession(); | 564 CreateClientSession(); |
562 | 565 |
563 Expectation authenticated = | 566 Expectation authenticated = |
564 EXPECT_CALL(session_event_handler_, OnSessionAuthenticated(_)) | 567 EXPECT_CALL(session_event_handler_, OnSessionAuthenticated(_)) |
565 .WillOnce(Return(true)); | 568 .WillOnce(Return(true)); |
566 EXPECT_CALL(*input_injector_, StartPtr(_)) | 569 EXPECT_CALL(*input_injector_, StartPtr(_)) |
567 .After(authenticated); | 570 .After(authenticated); |
568 EXPECT_CALL(session_event_handler_, OnSessionChannelsConnected(_)) | 571 EXPECT_CALL(session_event_handler_, OnSessionChannelsConnected(_)) |
569 .After(authenticated); | 572 .After(authenticated); |
570 EXPECT_CALL(session_event_handler_, OnSessionClosed(_)) | 573 EXPECT_CALL(session_event_handler_, OnSessionClosed(_)) |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
785 | 788 |
786 DisconnectClientSession(); | 789 DisconnectClientSession(); |
787 StopClientSession(); | 790 StopClientSession(); |
788 | 791 |
789 // ext1 was instantiated and wrapped the video capturer. | 792 // ext1 was instantiated and wrapped the video capturer. |
790 EXPECT_TRUE(extension.was_instantiated()); | 793 EXPECT_TRUE(extension.was_instantiated()); |
791 EXPECT_TRUE(extension.has_wrapped_video_capturer()); | 794 EXPECT_TRUE(extension.has_wrapped_video_capturer()); |
792 } | 795 } |
793 | 796 |
794 } // namespace remoting | 797 } // namespace remoting |
OLD | NEW |