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

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

Issue 2458513004: Revert of Remove supports_touch_events flag from BasicDesktopEnvironment (Closed)
Patch Set: Created 4 years, 1 month 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
« no previous file with comments | « remoting/host/ipc_desktop_environment.cc ('k') | remoting/host/it2me_desktop_environment.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "remoting/host/ipc_desktop_environment.h" 5 #include "remoting/host/ipc_desktop_environment.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <utility> 10 #include <utility>
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after
507 setup_run_loop_->Run(); 507 setup_run_loop_->Run();
508 508
509 // Stop the test. 509 // Stop the test.
510 DeleteDesktopEnvironment(); 510 DeleteDesktopEnvironment();
511 } 511 }
512 512
513 // Check touchEvents capability is set when the desktop environment can 513 // Check touchEvents capability is set when the desktop environment can
514 // inject touch events. 514 // inject touch events.
515 TEST_F(IpcDesktopEnvironmentTest, TouchEventsCapabilities) { 515 TEST_F(IpcDesktopEnvironmentTest, TouchEventsCapabilities) {
516 // Create an environment with multi touch enabled. 516 // Create an environment with multi touch enabled.
517 desktop_environment_factory_->set_supports_touch_events(true);
517 desktop_environment_ = desktop_environment_factory_->Create( 518 desktop_environment_ = desktop_environment_factory_->Create(
518 client_session_control_factory_.GetWeakPtr()); 519 client_session_control_factory_.GetWeakPtr());
519 520
520 std::unique_ptr<protocol::MockClipboardStub> clipboard_stub( 521 std::unique_ptr<protocol::MockClipboardStub> clipboard_stub(
521 new protocol::MockClipboardStub()); 522 new protocol::MockClipboardStub());
522 EXPECT_CALL(*clipboard_stub, InjectClipboardEvent(_)) 523 EXPECT_CALL(*clipboard_stub, InjectClipboardEvent(_))
523 .Times(0); 524 .Times(0);
524 525
525 std::string expected_capabilities = "rateLimitResizeRequests"; 526 EXPECT_EQ("rateLimitResizeRequests touchEvents",
526 if (InputInjector::SupportsTouchEvents()) 527 desktop_environment_->GetCapabilities());
527 expected_capabilities += " touchEvents";
528
529 EXPECT_EQ(expected_capabilities, desktop_environment_->GetCapabilities());
530 528
531 // Start the input injector and screen capturer. 529 // Start the input injector and screen capturer.
532 input_injector_->Start(std::move(clipboard_stub)); 530 input_injector_->Start(std::move(clipboard_stub));
533 531
534 // Run the message loop until the desktop is attached. 532 // Run the message loop until the desktop is attached.
535 setup_run_loop_->Run(); 533 setup_run_loop_->Run();
536 534
537 // Stop the test. 535 // Stop the test.
538 DeleteDesktopEnvironment(); 536 DeleteDesktopEnvironment();
539 } 537 }
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
758 .WillOnce(InvokeWithoutArgs( 756 .WillOnce(InvokeWithoutArgs(
759 this, &IpcDesktopEnvironmentTest::DeleteDesktopEnvironment)); 757 this, &IpcDesktopEnvironmentTest::DeleteDesktopEnvironment));
760 758
761 // Change the desktop resolution. 759 // Change the desktop resolution.
762 screen_controls_->SetScreenResolution(ScreenResolution( 760 screen_controls_->SetScreenResolution(ScreenResolution(
763 webrtc::DesktopSize(100, 100), 761 webrtc::DesktopSize(100, 100),
764 webrtc::DesktopVector(96, 96))); 762 webrtc::DesktopVector(96, 96)));
765 } 763 }
766 764
767 } // namespace remoting 765 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/ipc_desktop_environment.cc ('k') | remoting/host/it2me_desktop_environment.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698