OLD | NEW |
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 #include "ui/test/test_suite.h" | 5 #include "ui/test/test_suite.h" |
6 | 6 |
7 #include "base/file_path.h" | 7 #include "base/file_path.h" |
8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
10 #include "ui/base/resource/resource_bundle.h" | 10 #include "ui/base/resource/resource_bundle.h" |
11 #include "ui/base/resource/resource_handle.h" | 11 #include "ui/base/resource/resource_handle.h" |
12 #include "ui/base/ui_base_paths.h" | 12 #include "ui/base/ui_base_paths.h" |
13 #include "ui/gfx/gfx_paths.h" | 13 #include "ui/gfx/gfx_paths.h" |
14 | 14 |
| 15 #if defined(OS_ANDROID) |
| 16 #include "base/android/jni_android.h" |
| 17 #include "ui/android/ui_jni_registrar.h" |
| 18 #endif |
| 19 |
15 #if defined(OS_MACOSX) && !defined(OS_IOS) | 20 #if defined(OS_MACOSX) && !defined(OS_IOS) |
16 #include "base/mac/bundle_locations.h" | 21 #include "base/mac/bundle_locations.h" |
17 #endif | 22 #endif |
18 | 23 |
19 namespace ui { | 24 namespace ui { |
20 namespace test { | 25 namespace test { |
21 | 26 |
22 UITestSuite::UITestSuite(int argc, char** argv) : base::TestSuite(argc, argv) {} | 27 UITestSuite::UITestSuite(int argc, char** argv) : base::TestSuite(argc, argv) {} |
23 | 28 |
24 void UITestSuite::Initialize() { | 29 void UITestSuite::Initialize() { |
25 base::TestSuite::Initialize(); | 30 base::TestSuite::Initialize(); |
26 | 31 |
| 32 #if defined(OS_ANDROID) |
| 33 // Register JNI bindings for android. |
| 34 ui::android::RegisterJni(base::android::AttachCurrentThread()); |
| 35 #endif |
| 36 |
27 ui::RegisterPathProvider(); | 37 ui::RegisterPathProvider(); |
28 gfx::RegisterPathProvider(); | 38 gfx::RegisterPathProvider(); |
29 | 39 |
30 #if defined(OS_MACOSX) && !defined(OS_IOS) | 40 #if defined(OS_MACOSX) && !defined(OS_IOS) |
31 // Look in the framework bundle for resources. | 41 // Look in the framework bundle for resources. |
32 // TODO(port): make a resource bundle for non-app exes. What's done here | 42 // TODO(port): make a resource bundle for non-app exes. What's done here |
33 // isn't really right because this code needs to depend on chrome_dll | 43 // isn't really right because this code needs to depend on chrome_dll |
34 // being built. This is inappropriate in app. | 44 // being built. This is inappropriate in app. |
35 FilePath path; | 45 FilePath path; |
36 PathService::Get(base::DIR_EXE, &path); | 46 PathService::Get(base::DIR_EXE, &path); |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 ui::ResourceBundle::CleanupSharedInstance(); | 78 ui::ResourceBundle::CleanupSharedInstance(); |
69 | 79 |
70 #if defined(OS_MACOSX) && !defined(OS_IOS) | 80 #if defined(OS_MACOSX) && !defined(OS_IOS) |
71 base::mac::SetOverrideFrameworkBundle(NULL); | 81 base::mac::SetOverrideFrameworkBundle(NULL); |
72 #endif | 82 #endif |
73 base::TestSuite::Shutdown(); | 83 base::TestSuite::Shutdown(); |
74 } | 84 } |
75 | 85 |
76 } // namespace test | 86 } // namespace test |
77 } // namespace ui | 87 } // namespace ui |
OLD | NEW |