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

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: Add missing include. 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
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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 116
117 // Closes the browser without waiting for it to release all its resources. 117 // Closes the browser without waiting for it to release all its resources.
118 // WARNING: This may leave tasks posted, but not yet run, in the message 118 // WARNING: This may leave tasks posted, but not yet run, in the message
119 // loops. Prefer CloseBrowserSynchronously over this method. 119 // loops. Prefer CloseBrowserSynchronously over this method.
120 void CloseBrowserAsynchronously(Browser* browser); 120 void CloseBrowserAsynchronously(Browser* browser);
121 121
122 // Closes all browsers. No guarantees are made about the destruction of 122 // Closes all browsers. No guarantees are made about the destruction of
123 // outstanding resources. 123 // outstanding resources.
124 void CloseAllBrowsers(); 124 void CloseAllBrowsers();
125 125
126 // Ensures that no devtools are open, and then opens the devtools.
127 void OpenDevToolsWindow(content::WebContents* web_contents);
James Hawkins 2015/07/10 23:01:20 The CL description doesn't mention OpenDevToolsWin
128
129 // Similar to ui_test_utils::OpenURLOffTheRecord, but also flushes the
James Hawkins 2015/07/13 18:22:23 So we're now going to have two methods that do rou
erikchen 2015/07/13 19:39:21 I moved the method here, but forgot to update the
130 // Autoreleasepool on Mac.
131 Browser* OpenURLOffTheRecord(Profile* profile, const GURL& url);
132
126 // Convenience methods for adding tabs to a Browser. 133 // Convenience methods for adding tabs to a Browser.
127 void AddTabAtIndexToBrowser(Browser* browser, 134 void AddTabAtIndexToBrowser(Browser* browser,
128 int index, 135 int index,
129 const GURL& url, 136 const GURL& url,
130 ui::PageTransition transition, 137 ui::PageTransition transition,
131 bool check_navigation_success); 138 bool check_navigation_success);
132 void AddTabAtIndex(int index, 139 void AddTabAtIndex(int index,
133 const GURL& url, 140 const GURL& url,
134 ui::PageTransition transition); 141 ui::PageTransition transition);
135 142
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 base::mac::ScopedNSAutoreleasePool* autorelease_pool_; 248 base::mac::ScopedNSAutoreleasePool* autorelease_pool_;
242 scoped_ptr<ScopedBundleSwizzlerMac> bundle_swizzler_; 249 scoped_ptr<ScopedBundleSwizzlerMac> bundle_swizzler_;
243 #endif // OS_MACOSX 250 #endif // OS_MACOSX
244 251
245 #if defined(OS_WIN) 252 #if defined(OS_WIN)
246 scoped_ptr<base::win::ScopedCOMInitializer> com_initializer_; 253 scoped_ptr<base::win::ScopedCOMInitializer> com_initializer_;
247 #endif 254 #endif
248 }; 255 };
249 256
250 #endif // CHROME_TEST_BASE_IN_PROCESS_BROWSER_TEST_H_ 257 #endif // CHROME_TEST_BASE_IN_PROCESS_BROWSER_TEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698