| 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 "base/file_util.h" | 5 #include "base/file_util.h" |
| 6 #include "base/files/file_path.h" | 6 #include "base/files/file_path.h" |
| 7 #include "chrome/test/remoting/remote_desktop_browsertest.h" | 7 #include "chrome/test/remoting/remote_desktop_browsertest.h" |
| 8 #include "chrome/test/remoting/waiter.h" | 8 #include "chrome/test/remoting/waiter.h" |
| 9 | 9 |
| 10 namespace remoting { | 10 namespace remoting { |
| 11 | 11 |
| 12 class Me2MeBrowserTest : public RemoteDesktopBrowserTest { | 12 class Me2MeBrowserTest : public RemoteDesktopBrowserTest { |
| 13 protected: | 13 protected: |
| 14 void TestKeyboardInput(); | 14 void TestKeyboardInput(); |
| 15 void TestMouseInput(); | 15 void TestMouseInput(); |
| 16 | 16 |
| 17 void ConnectPinlessAndCleanupPairings(bool cleanup_all); | 17 void ConnectPinlessAndCleanupPairings(bool cleanup_all); |
| 18 bool IsPairingSpinnerHidden(); | 18 bool IsPairingSpinnerHidden(); |
| 19 }; | 19 }; |
| 20 | 20 |
| 21 IN_PROC_BROWSER_TEST_F(Me2MeBrowserTest, | 21 IN_PROC_BROWSER_TEST_F(Me2MeBrowserTest, |
| 22 MANUAL_Me2Me_Connect_Local_Host) { | 22 MANUAL_Me2Me_Connect_Local_Host) { |
| 23 VerifyInternetAccess(); | 23 SetUpTestForMe2Me(); |
| 24 Install(); | |
| 25 LaunchChromotingApp(); | |
| 26 | |
| 27 // Authorize, Authenticate, and Approve. | |
| 28 Auth(); | |
| 29 ExpandMe2Me(); | |
| 30 | 24 |
| 31 ConnectToLocalHost(false); | 25 ConnectToLocalHost(false); |
| 32 | 26 |
| 33 // TODO(chaitali): Change the mouse input test to also work in the | 27 // TODO(chaitali): Change the mouse input test to also work in the |
| 34 // HTTP server framework | 28 // HTTP server framework |
| 35 // TestMouseInput(); | 29 // TestMouseInput(); |
| 36 | 30 |
| 37 DisconnectMe2Me(); | 31 DisconnectMe2Me(); |
| 38 Cleanup(); | 32 Cleanup(); |
| 39 } | 33 } |
| (...skipping 13 matching lines...) Expand all Loading... |
| 53 // TODO(weitaosu): Find a way to verify keyboard input injection. | 47 // TODO(weitaosu): Find a way to verify keyboard input injection. |
| 54 // We cannot use TestKeyboardInput because it assumes | 48 // We cannot use TestKeyboardInput because it assumes |
| 55 // that the client and the host are on the same machine. | 49 // that the client and the host are on the same machine. |
| 56 | 50 |
| 57 DisconnectMe2Me(); | 51 DisconnectMe2Me(); |
| 58 Cleanup(); | 52 Cleanup(); |
| 59 } | 53 } |
| 60 | 54 |
| 61 IN_PROC_BROWSER_TEST_F(Me2MeBrowserTest, | 55 IN_PROC_BROWSER_TEST_F(Me2MeBrowserTest, |
| 62 MANUAL_Me2Me_Connect_Pinless) { | 56 MANUAL_Me2Me_Connect_Pinless) { |
| 63 VerifyInternetAccess(); | 57 SetUpTestForMe2Me(); |
| 64 Install(); | |
| 65 LaunchChromotingApp(); | |
| 66 | |
| 67 // Authorize, Authenticate, and Approve. | |
| 68 Auth(); | |
| 69 ExpandMe2Me(); | |
| 70 | 58 |
| 71 ASSERT_FALSE(HtmlElementVisible("paired-client-manager-message")) | 59 ASSERT_FALSE(HtmlElementVisible("paired-client-manager-message")) |
| 72 << "The host must have no pairings before running the pinless test."; | 60 << "The host must have no pairings before running the pinless test."; |
| 73 | 61 |
| 74 // Test that cleanup works with either the Delete or Delete all buttons. | 62 // Test that cleanup works with either the Delete or Delete all buttons. |
| 75 ConnectPinlessAndCleanupPairings(false); | 63 ConnectPinlessAndCleanupPairings(false); |
| 76 ConnectPinlessAndCleanupPairings(true); | 64 ConnectPinlessAndCleanupPairings(true); |
| 77 | 65 |
| 78 Cleanup(); | 66 Cleanup(); |
| 79 } | 67 } |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 ClickOnControl("close-paired-client-manager-dialog"); | 144 ClickOnControl("close-paired-client-manager-dialog"); |
| 157 ASSERT_FALSE(HtmlElementVisible("paired-client-manager-dialog")); | 145 ASSERT_FALSE(HtmlElementVisible("paired-client-manager-dialog")); |
| 158 ASSERT_FALSE(HtmlElementVisible("paired-client-manager-message")); | 146 ASSERT_FALSE(HtmlElementVisible("paired-client-manager-message")); |
| 159 } | 147 } |
| 160 | 148 |
| 161 bool Me2MeBrowserTest::IsPairingSpinnerHidden() { | 149 bool Me2MeBrowserTest::IsPairingSpinnerHidden() { |
| 162 return !HtmlElementVisible("paired-client-manager-dialog-working"); | 150 return !HtmlElementVisible("paired-client-manager-dialog-working"); |
| 163 } | 151 } |
| 164 | 152 |
| 165 } // namespace remoting | 153 } // namespace remoting |
| OLD | NEW |