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

Unified Diff: chrome/test/base/in_process_browser_test.h

Issue 1228723002: Extract duplicated code in browser_tests for closing a browser. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: s/WithoutWaiting/Asynchronously 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 side-by-side diff with in-line comments
Download patch
Index: chrome/test/base/in_process_browser_test.h
diff --git a/chrome/test/base/in_process_browser_test.h b/chrome/test/base/in_process_browser_test.h
index e516f4ead1ae3bbd538eb9276b2ec54bb09d6b6f..84049ec0c7a454997ecab25c7c834bda3304df6e 100644
--- a/chrome/test/base/in_process_browser_test.h
+++ b/chrome/test/base/in_process_browser_test.h
@@ -111,6 +111,18 @@ class InProcessBrowserTest : public content::BrowserTestBase {
// Returns the browser created by CreateBrowser.
Browser* browser() const { return browser_; }
+ // Closes the given browser and waits for it to release all its resources.
+ void CloseBrowserSynchronously(Browser* browser);
+
+ // Closes the browser without waiting for it to release all its resources.
+ // WARNING: This may leave tasks posted, but not yet run, in the message
+ // loops. Prefer CloseBrowserSynchronously over this method.
+ void CloseBrowserAsynchronously(Browser* browser);
+
+ // Closes all browsers. No guarantees are made about the destruction of
+ // outstanding resources.
+ void CloseAllBrowsers();
+
// Convenience methods for adding tabs to a Browser.
void AddTabAtIndexToBrowser(Browser* browser,
int index,
« no previous file with comments | « chrome/browser/ui/startup/startup_browser_creator_browsertest.cc ('k') | chrome/test/base/in_process_browser_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698