| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_UI_UI_TEST_H_ | 5 #ifndef CHROME_TEST_UI_UI_TEST_H_ |
| 6 #define CHROME_TEST_UI_UI_TEST_H_ | 6 #define CHROME_TEST_UI_UI_TEST_H_ |
| 7 | 7 |
| 8 // This file provides a common base for running UI unit tests, which operate | 8 // This file provides a common base for running UI unit tests, which operate |
| 9 // the entire browser application in a separate process for holistic | 9 // the entire browser application in a separate process for holistic |
| 10 // functional testing. | 10 // functional testing. |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 void set_action_timeout_ms(int timeout); | 64 void set_action_timeout_ms(int timeout); |
| 65 | 65 |
| 66 // Overridable so that derived classes can provide their own ProxyLauncher. | 66 // Overridable so that derived classes can provide their own ProxyLauncher. |
| 67 virtual ProxyLauncher* CreateProxyLauncher(); | 67 virtual ProxyLauncher* CreateProxyLauncher(); |
| 68 | 68 |
| 69 // Closes the browser and IPC testing server. | 69 // Closes the browser and IPC testing server. |
| 70 void CloseBrowserAndServer(); | 70 void CloseBrowserAndServer(); |
| 71 | 71 |
| 72 // Launches the browser with the given command line. | 72 // Launches the browser with the given command line. |
| 73 // TODO(phajdan.jr): Make LaunchBrowser private. | 73 // TODO(phajdan.jr): Make LaunchBrowser private. |
| 74 void LaunchBrowser(const CommandLine& cmdline, bool clear_profile); | 74 void LaunchBrowser(const base::CommandLine& cmdline, bool clear_profile); |
| 75 | 75 |
| 76 // Exits out browser instance. | 76 // Exits out browser instance. |
| 77 void QuitBrowser(); | 77 void QuitBrowser(); |
| 78 | 78 |
| 79 // Tells the browser to navigate to the given URL in the active tab | 79 // Tells the browser to navigate to the given URL in the active tab |
| 80 // of the first app window. | 80 // of the first app window. |
| 81 // This method doesn't return until the navigation is complete. | 81 // This method doesn't return until the navigation is complete. |
| 82 void NavigateToURL(const GURL& url); | 82 void NavigateToURL(const GURL& url); |
| 83 | 83 |
| 84 // Navigate to the given URL in the active tab of the given app window. | 84 // Navigate to the given URL in the active tab of the given app window. |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 | 272 |
| 273 // ********* Member variables ********* | 273 // ********* Member variables ********* |
| 274 | 274 |
| 275 // Path to the browser executable. | 275 // Path to the browser executable. |
| 276 base::FilePath browser_directory_; | 276 base::FilePath browser_directory_; |
| 277 | 277 |
| 278 // Path to the unit test data. | 278 // Path to the unit test data. |
| 279 base::FilePath test_data_directory_; | 279 base::FilePath test_data_directory_; |
| 280 | 280 |
| 281 // Command to launch the browser | 281 // Command to launch the browser |
| 282 CommandLine launch_arguments_; | 282 base::CommandLine launch_arguments_; |
| 283 | 283 |
| 284 // The number of errors expected during the run (generally 0). | 284 // The number of errors expected during the run (generally 0). |
| 285 size_t expected_errors_; | 285 size_t expected_errors_; |
| 286 | 286 |
| 287 // The number of crashes expected during the run (generally 0). | 287 // The number of crashes expected during the run (generally 0). |
| 288 int expected_crashes_; | 288 int expected_crashes_; |
| 289 | 289 |
| 290 // Homepage used for testing. | 290 // Homepage used for testing. |
| 291 std::string homepage_; | 291 std::string homepage_; |
| 292 | 292 |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 420 #ifdef UNIT_TEST | 420 #ifdef UNIT_TEST |
| 421 std::ostream& operator<<(std::ostream& out, const std::wstring& wstr); | 421 std::ostream& operator<<(std::ostream& out, const std::wstring& wstr); |
| 422 | 422 |
| 423 template<typename T> | 423 template<typename T> |
| 424 std::ostream& operator<<(std::ostream& out, const ::scoped_ptr<T>& ptr) { | 424 std::ostream& operator<<(std::ostream& out, const ::scoped_ptr<T>& ptr) { |
| 425 return out << ptr.get(); | 425 return out << ptr.get(); |
| 426 } | 426 } |
| 427 #endif // UNIT_TEST | 427 #endif // UNIT_TEST |
| 428 | 428 |
| 429 #endif // CHROME_TEST_UI_UI_TEST_H_ | 429 #endif // CHROME_TEST_UI_UI_TEST_H_ |
| OLD | NEW |