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 "content/public/browser/notification_service.h" | 14 #include "content/public/browser/notification_service.h" |
14 #include "content/public/test/browser_test_utils.h" | 15 #include "content/public/test/browser_test_utils.h" |
15 #include "net/dns/mock_host_resolver.h" | 16 #include "net/dns/mock_host_resolver.h" |
16 | 17 |
17 namespace { | 18 namespace { |
18 // Command line arguments specific to the chromoting browser tests. | 19 // Command line arguments specific to the chromoting browser tests. |
19 const char kOverrideUserDataDir[] = "override-user-data-dir"; | 20 const char kOverrideUserDataDir[] = "override-user-data-dir"; |
20 const char kNoCleanup[] = "no-cleanup"; | 21 const char kNoCleanup[] = "no-cleanup"; |
21 const char kNoInstall[] = "no-install"; | 22 const char kNoInstall[] = "no-install"; |
22 const char kWebAppCrx[] = "webapp-crx"; | 23 const char kWebAppCrx[] = "webapp-crx"; |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
206 | 207 |
207 // The client WebContents instance the test needs to interact with. | 208 // The client WebContents instance the test needs to interact with. |
208 content::WebContents* client_web_content() { | 209 content::WebContents* client_web_content() { |
209 return client_web_content_; | 210 return client_web_content_; |
210 } | 211 } |
211 | 212 |
212 content::WebContents* app_web_content() { | 213 content::WebContents* app_web_content() { |
213 return app_web_content_; | 214 return app_web_content_; |
214 } | 215 } |
215 | 216 |
217 RemoteTestHelper remote_test_helper() { | |
218 return remote_test_helper_; | |
219 } | |
Jamie
2014/12/17 03:15:40
This returns an implicit copy of the helper, which
Mike Meade
2014/12/18 18:54:24
Done.
| |
220 | |
216 // Whether to perform the cleanup tasks (uninstalling chromoting, etc). | 221 // Whether to perform the cleanup tasks (uninstalling chromoting, etc). |
217 // This is useful for diagnostic purposes. | 222 // This is useful for diagnostic purposes. |
218 bool NoCleanup() { return no_cleanup_; } | 223 bool NoCleanup() { return no_cleanup_; } |
219 | 224 |
220 // Whether to install the chromoting extension before running the test cases. | 225 // Whether to install the chromoting extension before running the test cases. |
221 // This is useful for diagnostic purposes. | 226 // This is useful for diagnostic purposes. |
222 bool NoInstall() { return no_install_; } | 227 bool NoInstall() { return no_install_; } |
223 | 228 |
224 // Helper to construct the starting URL of the installed chromoting webapp. | 229 // Helper to construct the starting URL of the installed chromoting webapp. |
225 GURL Chromoting_Main_URL() { | 230 GURL Chromoting_Main_URL() { |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
363 // push it onto the stack and that becomes the active instance. | 368 // push it onto the stack and that becomes the active instance. |
364 // And once we are done with the current WebContents instance | 369 // And once we are done with the current WebContents instance |
365 // we pop it off the stack, returning to the previous instance. | 370 // we pop it off the stack, returning to the previous instance. |
366 std::vector<content::WebContents*> web_contents_stack_; | 371 std::vector<content::WebContents*> web_contents_stack_; |
367 | 372 |
368 // WebContent of the client page that facilitates communication with | 373 // WebContent of the client page that facilitates communication with |
369 // the HTTP server. This is how the remoting browser tests | 374 // the HTTP server. This is how the remoting browser tests |
370 // will get acknowledgments of actions completed on the host. | 375 // will get acknowledgments of actions completed on the host. |
371 content::WebContents* client_web_content_; | 376 content::WebContents* client_web_content_; |
372 | 377 |
378 // Helper class to assist in performing and verifying remote operations. | |
379 RemoteTestHelper remote_test_helper_; | |
380 | |
373 // WebContent of the landing page in the chromoting app. | 381 // WebContent of the landing page in the chromoting app. |
374 content::WebContents* app_web_content_; | 382 content::WebContents* app_web_content_; |
375 | 383 |
376 bool no_cleanup_; | 384 bool no_cleanup_; |
377 bool no_install_; | 385 bool no_install_; |
378 const Extension* extension_; | 386 const Extension* extension_; |
379 base::FilePath webapp_crx_; | 387 base::FilePath webapp_crx_; |
380 base::FilePath webapp_unpacked_; | 388 base::FilePath webapp_unpacked_; |
381 std::string username_; | 389 std::string username_; |
382 std::string password_; | 390 std::string password_; |
383 std::string me2me_pin_; | 391 std::string me2me_pin_; |
384 std::string remote_host_name_; | 392 std::string remote_host_name_; |
385 std::string extension_name_; | 393 std::string extension_name_; |
386 std::string http_server_; | 394 std::string http_server_; |
387 }; | 395 }; |
388 | 396 |
389 } // namespace remoting | 397 } // namespace remoting |
390 | 398 |
391 #endif // CHROME_TEST_REMOTING_REMOTE_DESKTOP_BROWSERTEST_H_ | 399 #endif // CHROME_TEST_REMOTING_REMOTE_DESKTOP_BROWSERTEST_H_ |
OLD | NEW |