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

Side by Side Diff: chrome/test/base/in_process_browser_test.h

Issue 1211213003: mac: Swizzle out +[NSBundle mainBundle] for in process browser tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove blank line. 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 16 matching lines...) Expand all
27 27
28 #if defined(OS_WIN) 28 #if defined(OS_WIN)
29 namespace win { 29 namespace win {
30 class ScopedCOMInitializer; 30 class ScopedCOMInitializer;
31 } 31 }
32 #endif // defined(OS_WIN) 32 #endif // defined(OS_WIN)
33 } // namespace base 33 } // namespace base
34 34
35 class Browser; 35 class Browser;
36 class Profile; 36 class Profile;
37 #if defined(OS_MACOSX)
38 class ScopedBundleSwizzlerMac;
39 #endif // defined(OS_MACOSX)
37 40
38 namespace content { 41 namespace content {
39 class ContentRendererClient; 42 class ContentRendererClient;
40 } 43 }
41 44
42 // Base class for tests wanting to bring up a browser in the unit test process. 45 // Base class for tests wanting to bring up a browser in the unit test process.
43 // Writing tests with InProcessBrowserTest is slightly different than that of 46 // Writing tests with InProcessBrowserTest is slightly different than that of
44 // other tests. This is necessitated by InProcessBrowserTest running a message 47 // other tests. This is necessitated by InProcessBrowserTest running a message
45 // loop. To use InProcessBrowserTest do the following: 48 // loop. To use InProcessBrowserTest do the following:
46 // . Use the macro IN_PROC_BROWSER_TEST_F to define your test. 49 // . Use the macro IN_PROC_BROWSER_TEST_F to define your test.
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 // True if this is a multi-desktop test (in which case this browser test will 220 // True if this is a multi-desktop test (in which case this browser test will
218 // not ensure that Browsers are only created on the tested desktop). 221 // not ensure that Browsers are only created on the tested desktop).
219 bool multi_desktop_test_; 222 bool multi_desktop_test_;
220 223
221 // True if the accessibility test should run for a particular test case. 224 // True if the accessibility test should run for a particular test case.
222 // This is reset for every test case. 225 // This is reset for every test case.
223 bool run_accessibility_checks_for_test_case_; 226 bool run_accessibility_checks_for_test_case_;
224 227
225 #if defined(OS_MACOSX) 228 #if defined(OS_MACOSX)
226 base::mac::ScopedNSAutoreleasePool* autorelease_pool_; 229 base::mac::ScopedNSAutoreleasePool* autorelease_pool_;
230 scoped_ptr<ScopedBundleSwizzlerMac> bundle_swizzler_;
Paweł Hajdan Jr. 2015/07/08 10:01:13 Wouldn't the same apply to say content_browsertest
erikchen 2015/07/08 17:48:38 I don't believe so. If you look at content_browse
227 #endif // OS_MACOSX 231 #endif // OS_MACOSX
228 232
229 #if defined(OS_WIN) 233 #if defined(OS_WIN)
230 scoped_ptr<base::win::ScopedCOMInitializer> com_initializer_; 234 scoped_ptr<base::win::ScopedCOMInitializer> com_initializer_;
231 #endif 235 #endif
232 }; 236 };
233 237
234 #endif // CHROME_TEST_BASE_IN_PROCESS_BROWSER_TEST_H_ 238 #endif // CHROME_TEST_BASE_IN_PROCESS_BROWSER_TEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698