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

Side by Side Diff: chrome/test/remoting/me2me_browsertest.cc

Issue 838543002: Implement browser test for It2Me (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address CL feedback Created 5 years, 11 months 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
OLDNEW
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/files/file_path.h" 5 #include "base/files/file_path.h"
6 #include "base/files/file_util.h" 6 #include "base/files/file_util.h"
7 #include "chrome/browser/ui/browser_window.h" 7 #include "chrome/browser/ui/browser_window.h"
8 #include "chrome/test/remoting/remote_desktop_browsertest.h" 8 #include "chrome/test/remoting/remote_desktop_browsertest.h"
9 #include "chrome/test/remoting/waiter.h" 9 #include "chrome/test/remoting/waiter.h"
10 #include "extensions/browser/app_window/app_window.h" 10 #include "extensions/browser/app_window/app_window.h"
11 11
12 namespace remoting { 12 namespace remoting {
13 13
14 class Me2MeBrowserTest : public RemoteDesktopBrowserTest { 14 class Me2MeBrowserTest : public RemoteDesktopBrowserTest {
15 protected: 15 protected:
16 void TestKeyboardInput(); 16 void TestKeyboardInput();
17 void TestMouseInput(); 17 void TestMouseInput();
18 18
19 void ConnectPinlessAndCleanupPairings(bool cleanup_all); 19 void ConnectPinlessAndCleanupPairings(bool cleanup_all);
20 bool IsPairingSpinnerHidden(); 20 bool IsPairingSpinnerHidden();
21 21
22 void RestoreApp(); 22 void RestoreApp();
23 void MinimizeApp(); 23 void MinimizeApp();
24 }; 24 };
25 25
26 IN_PROC_BROWSER_TEST_F(Me2MeBrowserTest, 26 IN_PROC_BROWSER_TEST_F(Me2MeBrowserTest,
27 MANUAL_Me2Me_Connect_Local_Host) { 27 MANUAL_Me2Me_Connect_Local_Host) {
28 SetUpTestForMe2Me(); 28 SetUpTest();
29 29
30 ConnectToLocalHost(false); 30 ConnectToLocalHost(false);
31 31
32 // TODO(chaitali): Change the mouse input test to also work in the 32 // TODO(chaitali): Change the mouse input test to also work in the
33 // HTTP server framework 33 // HTTP server framework
34 // TestMouseInput(); 34 // TestMouseInput();
35 35
36 DisconnectMe2Me(); 36 DisconnectMe2Me();
37 Cleanup(); 37 Cleanup();
38 } 38 }
(...skipping 13 matching lines...) Expand all
52 // TODO(weitaosu): Find a way to verify keyboard input injection. 52 // TODO(weitaosu): Find a way to verify keyboard input injection.
53 // We cannot use TestKeyboardInput because it assumes 53 // We cannot use TestKeyboardInput because it assumes
54 // that the client and the host are on the same machine. 54 // that the client and the host are on the same machine.
55 55
56 DisconnectMe2Me(); 56 DisconnectMe2Me();
57 Cleanup(); 57 Cleanup();
58 } 58 }
59 59
60 IN_PROC_BROWSER_TEST_F(Me2MeBrowserTest, 60 IN_PROC_BROWSER_TEST_F(Me2MeBrowserTest,
61 MANUAL_Me2Me_Connect_Pinless) { 61 MANUAL_Me2Me_Connect_Pinless) {
62 SetUpTestForMe2Me(); 62 SetUpTest();
63 63
64 ASSERT_FALSE(HtmlElementVisible("paired-client-manager-message")) 64 ASSERT_FALSE(HtmlElementVisible("paired-client-manager-message"))
65 << "The host must have no pairings before running the pinless test."; 65 << "The host must have no pairings before running the pinless test.";
66 66
67 // Test that cleanup works with either the Delete or Delete all buttons. 67 // Test that cleanup works with either the Delete or Delete all buttons.
68 ConnectPinlessAndCleanupPairings(false); 68 ConnectPinlessAndCleanupPairings(false);
69 ConnectPinlessAndCleanupPairings(true); 69 ConnectPinlessAndCleanupPairings(true);
70 70
71 Cleanup(); 71 Cleanup();
72 } 72 }
73 73
74 IN_PROC_BROWSER_TEST_F(Me2MeBrowserTest, 74 IN_PROC_BROWSER_TEST_F(Me2MeBrowserTest,
75 MANUAL_Me2Me_v2_Alive_OnLostFocus) { 75 MANUAL_Me2Me_v2_Alive_OnLostFocus) {
76 SetUpTestForMe2Me(); 76 SetUpTest();
77 77
78 // Connect to host. 78 // Connect to host.
79 ConnectToLocalHost(false); 79 ConnectToLocalHost(false);
80 80
81 // Minimize the window 81 // Minimize the window
82 MinimizeApp(); 82 MinimizeApp();
83 83
84 // Wait for a few seconds for app to process any notifications it 84 // Wait for a few seconds for app to process any notifications it
85 // would have got from minimizing. 85 // would have got from minimizing.
86 ASSERT_TRUE(TimeoutWaiter(base::TimeDelta::FromSeconds(4)).Wait()); 86 ASSERT_TRUE(TimeoutWaiter(base::TimeDelta::FromSeconds(4)).Wait());
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 void Me2MeBrowserTest::RestoreApp() { 193 void Me2MeBrowserTest::RestoreApp() {
194 extensions::AppWindow* appWindow = GetFirstAppWindow(); 194 extensions::AppWindow* appWindow = GetFirstAppWindow();
195 if (appWindow) { 195 if (appWindow) {
196 appWindow->Restore(); 196 appWindow->Restore();
197 } else { 197 } else {
198 browser()->window()->Restore(); 198 browser()->window()->Restore();
199 } 199 }
200 } 200 }
201 201
202 } // namespace remoting 202 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698