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

Unified Diff: chrome/browser/content_settings/content_settings_browsertest.cc

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/browser/content_settings/content_settings_browsertest.cc
diff --git a/chrome/browser/content_settings/content_settings_browsertest.cc b/chrome/browser/content_settings/content_settings_browsertest.cc
index eecbe968a36f8ee19b69091523a81082b4515a0e..776cd501fb7d1cb762d73a40afc066ef9f263cf3 100644
--- a/chrome/browser/content_settings/content_settings_browsertest.cc
+++ b/chrome/browser/content_settings/content_settings_browsertest.cc
@@ -74,24 +74,11 @@ class ContentSettingsTest : public InProcessBrowserTest {
ASSERT_TRUE(content::GetCookies(browser()->profile(), url).empty());
// Ensure cookies get wiped after last incognito window closes.
- content::WindowedNotificationObserver signal(
- chrome::NOTIFICATION_BROWSER_CLOSED,
- content::Source<Browser>(incognito));
-
- chrome::CloseWindow(incognito);
-
-#if defined(OS_MACOSX)
- // BrowserWindowController depends on the auto release pool being recycled
- // in the message loop to delete itself, which frees the Browser object
- // which fires this event.
- AutoreleasePool()->Recycle();
-#endif
-
- signal.Wait();
+ CloseBrowserSynchronously(incognito);
incognito = CreateIncognitoBrowser();
ASSERT_TRUE(content::GetCookies(incognito->profile(), url).empty());
- chrome::CloseWindow(incognito);
+ CloseBrowserSynchronously(incognito);
}
void PreBasic(const GURL& url) {
« no previous file with comments | « chrome/browser/app_controller_mac_browsertest.mm ('k') | chrome/browser/extensions/app_background_page_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698