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

Side by Side Diff: gfx/test_suite.h

Issue 6046009: Move base/mac_util.h to base/mac and use the base::mac namespace.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « gfx/scoped_image_unittest.cc ('k') | net/proxy/proxy_config_service_mac.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 GFX_TEST_SUITE_H_ 5 #ifndef GFX_TEST_SUITE_H_
6 #define GFX_TEST_SUITE_H_ 6 #define GFX_TEST_SUITE_H_
7 #pragma once 7 #pragma once
8 8
9 #include "build/build_config.h"
10
11 #include <string> 9 #include <string>
12 10
13 #include "gfx/gfx_paths.h" 11 #include "gfx/gfx_paths.h"
14 #include "base/file_path.h" 12 #include "base/file_path.h"
15 #include "base/path_service.h" 13 #include "base/path_service.h"
16 #if defined(OS_MACOSX)
17 #include "base/mac_util.h"
18 #endif
19 #include "base/mac/scoped_nsautorelease_pool.h" 14 #include "base/mac/scoped_nsautorelease_pool.h"
20 #include "base/test/test_suite.h" 15 #include "base/test/test_suite.h"
16 #include "build/build_config.h"
17
18 #if defined(OS_MACOSX)
19 #include "base/mac/mac_util.h"
20 #endif
21 21
22 class GfxTestSuite : public base::TestSuite { 22 class GfxTestSuite : public base::TestSuite {
23 public: 23 public:
24 GfxTestSuite(int argc, char** argv) : TestSuite(argc, argv) { 24 GfxTestSuite(int argc, char** argv) : TestSuite(argc, argv) {
25 } 25 }
26 26
27 protected: 27 protected:
28 28
29 virtual void Initialize() { 29 virtual void Initialize() {
30 base::mac::ScopedNSAutoreleasePool autorelease_pool; 30 base::mac::ScopedNSAutoreleasePool autorelease_pool;
31 31
32 TestSuite::Initialize(); 32 TestSuite::Initialize();
33 33
34 gfx::RegisterPathProvider(); 34 gfx::RegisterPathProvider();
35 35
36 #if defined(OS_MACOSX) 36 #if defined(OS_MACOSX)
37 // Look in the framework bundle for resources. 37 // Look in the framework bundle for resources.
38 // TODO(port): make a resource bundle for non-app exes. What's done here 38 // TODO(port): make a resource bundle for non-app exes. What's done here
39 // isn't really right because this code needs to depend on chrome_dll 39 // isn't really right because this code needs to depend on chrome_dll
40 // being built. This is inappropriate in app. 40 // being built. This is inappropriate in app.
41 FilePath path; 41 FilePath path;
42 PathService::Get(base::DIR_EXE, &path); 42 PathService::Get(base::DIR_EXE, &path);
43 #if defined(GOOGLE_CHROME_BUILD) 43 #if defined(GOOGLE_CHROME_BUILD)
44 path = path.AppendASCII("Google Chrome Framework.framework"); 44 path = path.AppendASCII("Google Chrome Framework.framework");
45 #elif defined(CHROMIUM_BUILD) 45 #elif defined(CHROMIUM_BUILD)
46 path = path.AppendASCII("Chromium Framework.framework"); 46 path = path.AppendASCII("Chromium Framework.framework");
47 #else 47 #else
48 #error Unknown branding 48 #error Unknown branding
49 #endif 49 #endif
50 mac_util::SetOverrideAppBundlePath(path); 50 base::mac::SetOverrideAppBundlePath(path);
51 #endif // OS_MACOSX 51 #endif // OS_MACOSX
52 } 52 }
53 53
54 virtual void Shutdown() { 54 virtual void Shutdown() {
55 #if defined(OS_MACOSX) 55 #if defined(OS_MACOSX)
56 mac_util::SetOverrideAppBundle(NULL); 56 base::mac::SetOverrideAppBundle(NULL);
57 #endif 57 #endif
58 TestSuite::Shutdown(); 58 TestSuite::Shutdown();
59 } 59 }
60 }; 60 };
61 61
62 #endif // GFX_TEST_SUITE_H_ 62 #endif // GFX_TEST_SUITE_H_
OLDNEW
« no previous file with comments | « gfx/scoped_image_unittest.cc ('k') | net/proxy/proxy_config_service_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698