Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(71)

Side by Side Diff: chrome/test/base/ui_test_utils.h

Issue 1225093003: mac: Flush the autorelease pool after making a browser window in browser tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@browser_test_base
Patch Set: Comments from jhawkins, round two. Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/test/base/in_process_browser_test_mac.cc ('k') | chrome/test/base/ui_test_utils.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_BASE_UI_TEST_UTILS_H_ 5 #ifndef CHROME_TEST_BASE_UI_TEST_UTILS_H_
6 #define CHROME_TEST_BASE_UI_TEST_UTILS_H_ 6 #define CHROME_TEST_BASE_UI_TEST_UTILS_H_
7 7
8 #include <map> 8 #include <map>
9 #include <queue> 9 #include <queue>
10 #include <set> 10 #include <set>
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 BROWSER_TEST_WAIT_FOR_NAVIGATION = 1 << 2, // Wait for navigation to finish. 67 BROWSER_TEST_WAIT_FOR_NAVIGATION = 1 << 2, // Wait for navigation to finish.
68 68
69 BROWSER_TEST_MASK = BROWSER_TEST_WAIT_FOR_BROWSER | 69 BROWSER_TEST_MASK = BROWSER_TEST_WAIT_FOR_BROWSER |
70 BROWSER_TEST_WAIT_FOR_TAB | 70 BROWSER_TEST_WAIT_FOR_TAB |
71 BROWSER_TEST_WAIT_FOR_NAVIGATION 71 BROWSER_TEST_WAIT_FOR_NAVIGATION
72 }; 72 };
73 73
74 // Puts the current tab title in |title|. Returns true on success. 74 // Puts the current tab title in |title|. Returns true on success.
75 bool GetCurrentTabTitle(const Browser* browser, base::string16* title); 75 bool GetCurrentTabTitle(const Browser* browser, base::string16* title);
76 76
77 // Opens |url| in an incognito browser window with the incognito profile of
78 // |profile|, blocking until the navigation finishes. This will create a new
79 // browser if a browser with the incognito profile does not exist. Returns the
80 // incognito window Browser.
81 Browser* OpenURLOffTheRecord(Profile* profile, const GURL& url);
82
83 // Performs the provided navigation process, blocking until the navigation 77 // Performs the provided navigation process, blocking until the navigation
84 // finishes. May change the params in some cases (i.e. if the navigation 78 // finishes. May change the params in some cases (i.e. if the navigation
85 // opens a new browser window). Uses chrome::Navigate. 79 // opens a new browser window). Uses chrome::Navigate.
86 void NavigateToURL(chrome::NavigateParams* params); 80 void NavigateToURL(chrome::NavigateParams* params);
87 81
88 // Navigates the selected tab of |browser| to |url|, blocking until the 82 // Navigates the selected tab of |browser| to |url|, blocking until the
89 // navigation finishes. Simulates a POST and uses chrome::Navigate. 83 // navigation finishes. Simulates a POST and uses chrome::Navigate.
90 void NavigateToURLWithPost(Browser* browser, const GURL& url); 84 void NavigateToURLWithPost(Browser* browser, const GURL& url);
91 85
92 // Navigates the selected tab of |browser| to |url|, blocking until the 86 // Navigates the selected tab of |browser| to |url|, blocking until the
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 std::vector<GURL> urls_; 287 std::vector<GURL> urls_;
294 288
295 base::CancelableTaskTracker tracker_; 289 base::CancelableTaskTracker tracker_;
296 290
297 DISALLOW_COPY_AND_ASSIGN(HistoryEnumerator); 291 DISALLOW_COPY_AND_ASSIGN(HistoryEnumerator);
298 }; 292 };
299 293
300 } // namespace ui_test_utils 294 } // namespace ui_test_utils
301 295
302 #endif // CHROME_TEST_BASE_UI_TEST_UTILS_H_ 296 #endif // CHROME_TEST_BASE_UI_TEST_UTILS_H_
OLDNEW
« no previous file with comments | « chrome/test/base/in_process_browser_test_mac.cc ('k') | chrome/test/base/ui_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698