| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 // Tells the browser to navigato to the givne URL in the active tab | 82 // Tells the browser to navigato to the givne URL in the active tab |
| 83 // of the first app window. | 83 // of the first app window. |
| 84 // Does not wait for the navigation to complete to return. | 84 // Does not wait for the navigation to complete to return. |
| 85 void NavigateToURLAsync(const GURL& url); | 85 void NavigateToURLAsync(const GURL& url); |
| 86 | 86 |
| 87 // Tells the browser to navigate to the given URL in the active tab | 87 // Tells the browser to navigate to the given URL in the active tab |
| 88 // of the first app window. | 88 // of the first app window. |
| 89 // This method doesn't return until the navigation is complete. | 89 // This method doesn't return until the navigation is complete. |
| 90 void NavigateToURL(const GURL& url); | 90 void NavigateToURL(const GURL& url); |
| 91 | 91 |
| 92 // Tells the browser to navigate to the given URL in the active tab |
| 93 // of the first app window. |
| 94 // This method doesn't return until the |number_of_navigations| navigations |
| 95 // complete. |
| 96 void NavigateToURLBlockUntilNavigationsComplete(const GURL& url, |
| 97 int number_of_navigations); |
| 98 |
| 92 // Returns the URL of the currently active tab. Only looks in the first | 99 // Returns the URL of the currently active tab. Only looks in the first |
| 93 // window, for backward compatibility. If there is no active tab, or some | 100 // window, for backward compatibility. If there is no active tab, or some |
| 94 // other error, the returned URL will be empty. | 101 // other error, the returned URL will be empty. |
| 95 GURL GetActiveTabURL() { return GetActiveTabURL(0); } | 102 GURL GetActiveTabURL() { return GetActiveTabURL(0); } |
| 96 | 103 |
| 97 // Like above, but looks at the window at the given index. | 104 // Like above, but looks at the window at the given index. |
| 98 GURL GetActiveTabURL(int window_index); | 105 GURL GetActiveTabURL(int window_index); |
| 99 | 106 |
| 100 // Returns the title of the currently active tab. Only looks in the first | 107 // Returns the title of the currently active tab. Only looks in the first |
| 101 // window, for backward compatibility. | 108 // window, for backward compatibility. |
| (...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 525 #ifdef UNIT_TEST | 532 #ifdef UNIT_TEST |
| 526 std::ostream& operator<<(std::ostream& out, const std::wstring& wstr); | 533 std::ostream& operator<<(std::ostream& out, const std::wstring& wstr); |
| 527 | 534 |
| 528 template<typename T> | 535 template<typename T> |
| 529 std::ostream& operator<<(std::ostream& out, const ::scoped_ptr<T>& ptr) { | 536 std::ostream& operator<<(std::ostream& out, const ::scoped_ptr<T>& ptr) { |
| 530 return out << ptr.get(); | 537 return out << ptr.get(); |
| 531 } | 538 } |
| 532 #endif // UNIT_TEST | 539 #endif // UNIT_TEST |
| 533 | 540 |
| 534 #endif // CHROME_TEST_UI_UI_TEST_H_ | 541 #endif // CHROME_TEST_UI_UI_TEST_H_ |
| OLD | NEW |