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

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

Issue 1229473002: mac: Fix five browser_tests on Yosemite. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add ifdefs. 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
« no previous file with comments | « chrome/browser/ui/startup/startup_browser_creator_browsertest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/base/in_process_browser_test.cc
diff --git a/chrome/test/base/in_process_browser_test.cc b/chrome/test/base/in_process_browser_test.cc
index cb63fb1464cc312a393a082090aa012a62868974..1448b70c8c45aa18fe979023a48c8095e26ac78e 100644
--- a/chrome/test/base/in_process_browser_test.cc
+++ b/chrome/test/base/in_process_browser_test.cc
@@ -411,6 +411,9 @@ bool InProcessBrowserTest::SetUpUserDataDirectory() {
// Creates a browser with a single tab (about:blank), waits for the tab to
// finish loading and shows the browser.
Browser* InProcessBrowserTest::CreateBrowser(Profile* profile) {
+#if defined(OS_MACOSX)
+ base::mac::ScopedNSAutoreleasePool pool;
+#endif // defined(OS_MACOSX)
Browser* browser = new Browser(
Browser::CreateParams(profile, chrome::GetActiveDesktop()));
AddBlankTabAndShow(browser);
@@ -418,6 +421,9 @@ Browser* InProcessBrowserTest::CreateBrowser(Profile* profile) {
}
Browser* InProcessBrowserTest::CreateIncognitoBrowser() {
+#if defined(OS_MACOSX)
+ base::mac::ScopedNSAutoreleasePool pool;
+#endif // defined(OS_MACOSX)
// Create a new browser with using the incognito profile.
Browser* incognito = new Browser(
Browser::CreateParams(browser()->profile()->GetOffTheRecordProfile(),
@@ -427,6 +433,9 @@ Browser* InProcessBrowserTest::CreateIncognitoBrowser() {
}
Browser* InProcessBrowserTest::CreateBrowserForPopup(Profile* profile) {
+#if defined(OS_MACOSX)
+ base::mac::ScopedNSAutoreleasePool pool;
+#endif // defined(OS_MACOSX)
Browser* browser =
new Browser(Browser::CreateParams(Browser::TYPE_POPUP, profile,
chrome::GetActiveDesktop()));
@@ -437,6 +446,9 @@ Browser* InProcessBrowserTest::CreateBrowserForPopup(Profile* profile) {
Browser* InProcessBrowserTest::CreateBrowserForApp(
const std::string& app_name,
Profile* profile) {
+#if defined(OS_MACOSX)
+ base::mac::ScopedNSAutoreleasePool pool;
+#endif // defined(OS_MACOSX)
Browser* browser = new Browser(
Browser::CreateParams::CreateForApp(
app_name, false /* trusted_source */, gfx::Rect(), profile,
« no previous file with comments | « chrome/browser/ui/startup/startup_browser_creator_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698