OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_TEST_UTILS_H_ | 5 #ifndef CHROME_TEST_UI_TEST_UTILS_H_ |
6 #define CHROME_TEST_UI_TEST_UTILS_H_ | 6 #define CHROME_TEST_UI_TEST_UTILS_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <queue> | 10 #include <queue> |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 | 114 |
115 // Waits for a new browser to be created, returning the browser. | 115 // Waits for a new browser to be created, returning the browser. |
116 Browser* WaitForNewBrowser(); | 116 Browser* WaitForNewBrowser(); |
117 | 117 |
118 // Waits for a new browser to be created, returning the browser. | 118 // Waits for a new browser to be created, returning the browser. |
119 // Pass in the number of browsers that exist before the navigation starts in | 119 // Pass in the number of browsers that exist before the navigation starts in |
120 // |start_count|, and it will exit even if the notification occurs before it's | 120 // |start_count|, and it will exit even if the notification occurs before it's |
121 // called. | 121 // called. |
122 Browser* WaitForNewBrowserWithCount(size_t start_count); | 122 Browser* WaitForNewBrowserWithCount(size_t start_count); |
123 | 123 |
124 // Opens |url| in an incognito browser window with the off the record profile of | 124 // Opens |url| in an incognito browser window with the incognito profile of |
125 // |profile|, blocking until the navigation finishes. This will create a new | 125 // |profile|, blocking until the navigation finishes. This will create a new |
126 // browser if a browser with the off the record profile does not exist. | 126 // browser if a browser with the incognito profile does not exist. |
127 void OpenURLOffTheRecord(Profile* profile, const GURL& url); | 127 void OpenURLOffTheRecord(Profile* profile, const GURL& url); |
128 | 128 |
129 // Navigates the selected tab of |browser| to |url|, blocking until the | 129 // Navigates the selected tab of |browser| to |url|, blocking until the |
130 // navigation finishes. | 130 // navigation finishes. |
131 void NavigateToURL(Browser* browser, const GURL& url); | 131 void NavigateToURL(Browser* browser, const GURL& url); |
132 | 132 |
133 // Navigates the specified tab of |browser| to |url|, blocking until the | 133 // Navigates the specified tab of |browser| to |url|, blocking until the |
134 // navigation finishes. | 134 // navigation finishes. |
135 // |disposition| indicates what tab the navigation occurs in, and | 135 // |disposition| indicates what tab the navigation occurs in, and |
136 // |browser_test_flags| controls what to wait for before continuing. | 136 // |browser_test_flags| controls what to wait for before continuing. |
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
555 | 555 |
556 // Takes a snapshot of the entire page, according to the width and height | 556 // Takes a snapshot of the entire page, according to the width and height |
557 // properties of the DOM's document. Returns true on success. DOMAutomation | 557 // properties of the DOM's document. Returns true on success. DOMAutomation |
558 // must be enabled. | 558 // must be enabled. |
559 bool TakeEntirePageSnapshot(RenderViewHost* rvh, | 559 bool TakeEntirePageSnapshot(RenderViewHost* rvh, |
560 SkBitmap* bitmap) WARN_UNUSED_RESULT; | 560 SkBitmap* bitmap) WARN_UNUSED_RESULT; |
561 | 561 |
562 } // namespace ui_test_utils | 562 } // namespace ui_test_utils |
563 | 563 |
564 #endif // CHROME_TEST_UI_TEST_UTILS_H_ | 564 #endif // CHROME_TEST_UI_TEST_UTILS_H_ |
OLD | NEW |