Chromium Code Reviews| 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 755 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 766 // frames in this case. | 766 // frames in this case. |
| 767 | 767 |
| 768 DisconnectClientSession(); | 768 DisconnectClientSession(); |
| 769 StopClientSession(); | 769 StopClientSession(); |
| 770 | 770 |
| 771 // ext1 was instantiated and wrapped the video capturer. | 771 // ext1 was instantiated and wrapped the video capturer. |
| 772 EXPECT_TRUE(extension.was_instantiated()); | 772 EXPECT_TRUE(extension.was_instantiated()); |
| 773 EXPECT_TRUE(extension.has_wrapped_video_capturer()); | 773 EXPECT_TRUE(extension.has_wrapped_video_capturer()); |
| 774 } | 774 } |
| 775 | 775 |
| 776 // Check multiTouch in capabilities is set when InputInjector can inject touch | |
|
Wez
2015/04/09 22:58:59
nit: "Check multiTouch capability is set when..."
Rintaro Kuroiwa
2015/04/20 18:20:03
Done.
| |
| 777 // events. | |
| 778 TEST_F(ClientSessionTest, MultiTouchCapabilities) { | |
| 779 CreateClientSession(); | |
| 780 | |
| 781 // This host can inject touch. | |
| 782 EXPECT_CALL(*input_injector_, CanInjectTouch()) | |
| 783 .WillRepeatedly(Return(true)); | |
| 784 | |
| 785 EXPECT_CALL(session_event_handler_, OnSessionAuthenticated(_)) | |
| 786 .WillOnce(Return(true)); | |
| 787 | |
| 788 EXPECT_CALL(client_stub_, | |
| 789 SetCapabilities(EqCapabilities("default multiTouch"))); | |
| 790 | |
| 791 ConnectClientSession(); | |
| 792 base::RunLoop().RunUntilIdle(); | |
| 793 DisconnectClientSession(); | |
| 794 StopClientSession(); | |
| 795 } | |
| 796 | |
| 797 TEST_F(ClientSessionTest, NoTouchCapabilities) { | |
| 798 CreateClientSession(); | |
| 799 | |
| 800 // This host can inject touch. | |
| 801 EXPECT_CALL(*input_injector_, CanInjectTouch()) | |
| 802 .WillRepeatedly(Return(false)); | |
| 803 | |
| 804 EXPECT_CALL(session_event_handler_, OnSessionAuthenticated(_)) | |
| 805 .WillOnce(Return(true)); | |
| 806 | |
| 807 EXPECT_CALL(client_stub_, | |
| 808 SetCapabilities(EqCapabilities("default"))); | |
| 809 | |
| 810 ConnectClientSession(); | |
| 811 base::RunLoop().RunUntilIdle(); | |
| 812 DisconnectClientSession(); | |
| 813 StopClientSession(); | |
| 814 } | |
| 815 | |
| 776 } // namespace remoting | 816 } // namespace remoting |
| OLD | NEW |