OLD | NEW |
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 APP_TEST_SUITE_H_ | 5 #ifndef APP_TEST_SUITE_H_ |
6 #define APP_TEST_SUITE_H_ | 6 #define APP_TEST_SUITE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
10 | 10 |
11 #include "app/app_paths.h" | 11 #include "app/app_paths.h" |
12 #include "app/resource_bundle.h" | 12 #include "app/resource_bundle.h" |
13 #include "base/path_service.h" | 13 #include "base/path_service.h" |
14 #if defined(OS_MACOSX) | 14 #if defined(OS_MACOSX) |
15 #include "base/mac_util.h" | 15 #include "base/mac_util.h" |
16 #endif | 16 #endif |
17 #include "base/scoped_nsautorelease_pool.h" | 17 #include "base/mac/scoped_nsautorelease_pool.h" |
18 #include "base/test/test_suite.h" | 18 #include "base/test/test_suite.h" |
19 | 19 |
20 class AppTestSuite : public base::TestSuite { | 20 class AppTestSuite : public base::TestSuite { |
21 public: | 21 public: |
22 AppTestSuite(int argc, char** argv) : TestSuite(argc, argv) { | 22 AppTestSuite(int argc, char** argv) : TestSuite(argc, argv) { |
23 } | 23 } |
24 | 24 |
25 protected: | 25 protected: |
26 | 26 |
27 virtual void Initialize() { | 27 virtual void Initialize() { |
28 base::ScopedNSAutoreleasePool autorelease_pool; | 28 base::mac::ScopedNSAutoreleasePool autorelease_pool; |
29 | 29 |
30 TestSuite::Initialize(); | 30 TestSuite::Initialize(); |
31 | 31 |
32 app::RegisterPathProvider(); | 32 app::RegisterPathProvider(); |
33 #if defined(OS_MACOSX) | 33 #if defined(OS_MACOSX) |
34 // Look in the framework bundle for resources. | 34 // Look in the framework bundle for resources. |
35 // TODO(port): make a resource bundle for non-app exes. What's done here | 35 // TODO(port): make a resource bundle for non-app exes. What's done here |
36 // isn't really right because this code needs to depend on chrome_dll | 36 // isn't really right because this code needs to depend on chrome_dll |
37 // being built. This is inappropriate in app. | 37 // being built. This is inappropriate in app. |
38 FilePath path; | 38 FilePath path; |
(...skipping 24 matching lines...) Expand all Loading... |
63 ResourceBundle::CleanupSharedInstance(); | 63 ResourceBundle::CleanupSharedInstance(); |
64 | 64 |
65 #if defined(OS_MACOSX) | 65 #if defined(OS_MACOSX) |
66 mac_util::SetOverrideAppBundle(NULL); | 66 mac_util::SetOverrideAppBundle(NULL); |
67 #endif | 67 #endif |
68 TestSuite::Shutdown(); | 68 TestSuite::Shutdown(); |
69 } | 69 } |
70 }; | 70 }; |
71 | 71 |
72 #endif // APP_TEST_SUITE_H_ | 72 #endif // APP_TEST_SUITE_H_ |
OLD | NEW |