| 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 #ifndef CHROME_TEST_REMOTING_REMOTE_DESKTOP_BROWSERTEST_H_ | 5 #ifndef CHROME_TEST_REMOTING_REMOTE_DESKTOP_BROWSERTEST_H_ |
| 6 #define CHROME_TEST_REMOTING_REMOTE_DESKTOP_BROWSERTEST_H_ | 6 #define CHROME_TEST_REMOTING_REMOTE_DESKTOP_BROWSERTEST_H_ |
| 7 | 7 |
| 8 #include "base/debug/stack_trace.h" | 8 #include "base/debug/stack_trace.h" |
| 9 #include "chrome/browser/apps/app_browsertest_util.h" | 9 #include "chrome/browser/apps/app_browsertest_util.h" |
| 10 #include "chrome/browser/chrome_notification_types.h" | 10 #include "chrome/browser/chrome_notification_types.h" |
| 11 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 11 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 12 #include "chrome/test/base/ui_test_utils.h" | 12 #include "chrome/test/base/ui_test_utils.h" |
| 13 #include "chrome/test/remoting/remote_test_helper.h" | 13 #include "chrome/test/remoting/remote_test_helper.h" |
| 14 #include "content/public/browser/notification_service.h" | 14 #include "content/public/browser/notification_service.h" |
| 15 #include "content/public/test/browser_test_utils.h" | 15 #include "content/public/test/browser_test_utils.h" |
| 16 #include "net/dns/mock_host_resolver.h" | 16 #include "net/dns/mock_host_resolver.h" |
| 17 #include "ui/events/keycodes/dom/dom_code.h" |
| 18 #include "ui/events/keycodes/dom/dom_key.h" |
| 17 | 19 |
| 18 namespace { | 20 namespace { |
| 19 // Command line arguments specific to the chromoting browser tests. | 21 // Command line arguments specific to the chromoting browser tests. |
| 20 const char kOverrideUserDataDir[] = "override-user-data-dir"; | 22 const char kOverrideUserDataDir[] = "override-user-data-dir"; |
| 21 const char kNoCleanup[] = "no-cleanup"; | 23 const char kNoCleanup[] = "no-cleanup"; |
| 22 const char kNoInstall[] = "no-install"; | 24 const char kNoInstall[] = "no-install"; |
| 23 const char kWebAppCrx[] = "webapp-crx"; | 25 const char kWebAppCrx[] = "webapp-crx"; |
| 24 const char kWebAppUnpacked[] = "webapp-unpacked"; | 26 const char kWebAppUnpacked[] = "webapp-unpacked"; |
| 25 const char kUserName[] = "username"; | 27 const char kUserName[] = "username"; |
| 26 const char kUserPassword[] = "password"; | 28 const char kUserPassword[] = "password"; |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 // Click on "Get Started" in the Me2Me section and show the host list. | 105 // Click on "Get Started" in the Me2Me section and show the host list. |
| 104 void ExpandMe2Me(); | 106 void ExpandMe2Me(); |
| 105 | 107 |
| 106 // Disconnect the active Me2Me session. | 108 // Disconnect the active Me2Me session. |
| 107 void DisconnectMe2Me(); | 109 void DisconnectMe2Me(); |
| 108 | 110 |
| 109 // Simulate a key event. | 111 // Simulate a key event. |
| 110 void SimulateKeyPressWithCode(ui::KeyboardCode keyCode, | 112 void SimulateKeyPressWithCode(ui::KeyboardCode keyCode, |
| 111 const std::string& code); | 113 const std::string& code); |
| 112 | 114 |
| 113 void SimulateKeyPressWithCode(ui::KeyboardCode keyCode, | 115 void SimulateKeyPressWithCode(ui::DomKey key, |
| 114 const std::string& code, | 116 ui::DomCode code, |
| 117 ui::KeyboardCode keyCode, |
| 115 bool control, | 118 bool control, |
| 116 bool shift, | 119 bool shift, |
| 117 bool alt, | 120 bool alt, |
| 118 bool command); | 121 bool command); |
| 119 | 122 |
| 120 // Simulate typing a character | 123 // Simulate typing a character |
| 121 void SimulateCharInput(char c); | 124 void SimulateCharInput(char c); |
| 122 | 125 |
| 123 // Simulate typing a string | 126 // Simulate typing a string |
| 124 void SimulateStringInput(const std::string& input); | 127 void SimulateStringInput(const std::string& input); |
| (...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 394 std::string password_; | 397 std::string password_; |
| 395 std::string me2me_pin_; | 398 std::string me2me_pin_; |
| 396 std::string remote_host_name_; | 399 std::string remote_host_name_; |
| 397 std::string extension_name_; | 400 std::string extension_name_; |
| 398 std::string http_server_; | 401 std::string http_server_; |
| 399 }; | 402 }; |
| 400 | 403 |
| 401 } // namespace remoting | 404 } // namespace remoting |
| 402 | 405 |
| 403 #endif // CHROME_TEST_REMOTING_REMOTE_DESKTOP_BROWSERTEST_H_ | 406 #endif // CHROME_TEST_REMOTING_REMOTE_DESKTOP_BROWSERTEST_H_ |
| OLD | NEW |