Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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/test/remote_desktop_browsertest.h" | 5 #include "remoting/test/remote_desktop_browsertest.h" |
| 6 #include "remoting/test/waiter.h" | 6 #include "remoting/test/waiter.h" |
| 7 | 7 |
| 8 namespace remoting { | 8 namespace remoting { |
| 9 | 9 |
| 10 class Me2MeBrowserTest : public RemoteDesktopBrowserTest { | 10 class Me2MeBrowserTest : public RemoteDesktopBrowserTest { |
| 11 protected: | 11 protected: |
| 12 void TestKeyboardInput(); | 12 void TestKeyboardInput(); |
| 13 void TestMouseInput(); | |
| 13 }; | 14 }; |
| 14 | 15 |
| 15 IN_PROC_BROWSER_TEST_F(Me2MeBrowserTest, | 16 IN_PROC_BROWSER_TEST_F(Me2MeBrowserTest, |
| 16 MANUAL_Me2Me_Connect_Localhost) { | 17 MANUAL_Me2Me_Connect_Localhost) { |
| 17 VerifyInternetAccess(); | 18 VerifyInternetAccess(); |
| 18 | 19 |
| 19 Install(); | 20 Install(); |
| 20 | 21 |
| 21 LaunchChromotingApp(); | 22 LaunchChromotingApp(); |
| 22 | 23 |
| (...skipping 13 matching lines...) Expand all Loading... | |
| 36 // Start a terminal windows with ctrl+alt+T | 37 // Start a terminal windows with ctrl+alt+T |
| 37 SimulateKeyPressWithCode(ui::VKEY_T, "KeyT", true, false, true, false); | 38 SimulateKeyPressWithCode(ui::VKEY_T, "KeyT", true, false, true, false); |
| 38 ASSERT_TRUE(TimeoutWaiter(base::TimeDelta::FromSeconds(1)).Wait()); | 39 ASSERT_TRUE(TimeoutWaiter(base::TimeDelta::FromSeconds(1)).Wait()); |
| 39 | 40 |
| 40 // Run an arbitrary command so that I can verify the result visually. | 41 // Run an arbitrary command so that I can verify the result visually. |
| 41 // TODO: Verify programatically the keyboard events are received by the host. | 42 // TODO: Verify programatically the keyboard events are received by the host. |
| 42 SimulateStringInput("ls -la\n"); | 43 SimulateStringInput("ls -la\n"); |
| 43 ASSERT_TRUE(TimeoutWaiter(base::TimeDelta::FromSeconds(5)).Wait()); | 44 ASSERT_TRUE(TimeoutWaiter(base::TimeDelta::FromSeconds(5)).Wait()); |
| 44 } | 45 } |
| 45 | 46 |
| 47 void Me2MeBrowserTest::TestMouseInput() { | |
| 48 // Visually verifies that "Dash Home" is clicked on a Unity window manager. | |
|
garykac
2013/09/19 21:37:26
Should it be "Visually verify..."?
The code below
weitao
2013/09/19 22:04:56
Done.
weitao
2013/09/19 22:04:56
Done.
| |
| 49 SimulateMouseClickAt(10, 50); | |
| 50 // TODO: Verify programatically the mouse events are received by the host. | |
| 51 // This will be tricky as it depends on the host OS, window manager, desktop | |
| 52 // layout, and screen resolution. | |
| 53 ASSERT_TRUE(TimeoutWaiter(base::TimeDelta::FromSeconds(5)).Wait()); | |
| 54 } | |
| 55 | |
| 46 } // namespace remoting | 56 } // namespace remoting |
| OLD | NEW |