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

Side by Side Diff: chrome/test/base/in_process_browser_test.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/BUILD.gn ('k') | chrome/test/base/in_process_browser_test.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_IN_PROCESS_BROWSER_TEST_H_ 5 #ifndef CHROME_TEST_BASE_IN_PROCESS_BROWSER_TEST_H_
6 #define CHROME_TEST_BASE_IN_PROCESS_BROWSER_TEST_H_ 6 #define CHROME_TEST_BASE_IN_PROCESS_BROWSER_TEST_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/files/scoped_temp_dir.h" 9 #include "base/files/scoped_temp_dir.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 // Initializes the contents of the user data directory. Called by SetUp() 136 // Initializes the contents of the user data directory. Called by SetUp()
137 // after creating the user data directory, but before any browser is launched. 137 // after creating the user data directory, but before any browser is launched.
138 // If a test wishes to set up some initial non-empty state in the user data 138 // If a test wishes to set up some initial non-empty state in the user data
139 // directory before the browser starts up, it can do so here. Returns true if 139 // directory before the browser starts up, it can do so here. Returns true if
140 // successful. 140 // successful.
141 virtual bool SetUpUserDataDirectory() WARN_UNUSED_RESULT; 141 virtual bool SetUpUserDataDirectory() WARN_UNUSED_RESULT;
142 142
143 // BrowserTestBase: 143 // BrowserTestBase:
144 void RunTestOnMainThreadLoop() override; 144 void RunTestOnMainThreadLoop() override;
145 145
146 // Ensures that no devtools are open, and then opens the devtools.
147 void OpenDevToolsWindow(content::WebContents* web_contents);
148
149 // Opens |url| in an incognito browser window with the incognito profile of
150 // |profile|, blocking until the navigation finishes. This will create a new
151 // browser if a browser with the incognito profile does not exist. Returns the
152 // incognito window Browser.
153 Browser* OpenURLOffTheRecord(Profile* profile, const GURL& url);
154
146 // Creates a browser with a single tab (about:blank), waits for the tab to 155 // Creates a browser with a single tab (about:blank), waits for the tab to
147 // finish loading and shows the browser. 156 // finish loading and shows the browser.
148 // 157 //
149 // This is invoked from Setup. 158 // This is invoked from Setup.
150 Browser* CreateBrowser(Profile* profile); 159 Browser* CreateBrowser(Profile* profile);
151 160
152 // Similar to |CreateBrowser|, but creates an incognito browser. 161 // Similar to |CreateBrowser|, but creates an incognito browser.
153 Browser* CreateIncognitoBrowser(); 162 Browser* CreateIncognitoBrowser();
154 163
155 // Creates a browser for a popup window with a single tab (about:blank), waits 164 // Creates a browser for a popup window with a single tab (about:blank), waits
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 base::mac::ScopedNSAutoreleasePool* autorelease_pool_; 250 base::mac::ScopedNSAutoreleasePool* autorelease_pool_;
242 scoped_ptr<ScopedBundleSwizzlerMac> bundle_swizzler_; 251 scoped_ptr<ScopedBundleSwizzlerMac> bundle_swizzler_;
243 #endif // OS_MACOSX 252 #endif // OS_MACOSX
244 253
245 #if defined(OS_WIN) 254 #if defined(OS_WIN)
246 scoped_ptr<base::win::ScopedCOMInitializer> com_initializer_; 255 scoped_ptr<base::win::ScopedCOMInitializer> com_initializer_;
247 #endif 256 #endif
248 }; 257 };
249 258
250 #endif // CHROME_TEST_BASE_IN_PROCESS_BROWSER_TEST_H_ 259 #endif // CHROME_TEST_BASE_IN_PROCESS_BROWSER_TEST_H_
OLDNEW
« no previous file with comments | « chrome/test/BUILD.gn ('k') | chrome/test/base/in_process_browser_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698