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 "chrome/test/base/chrome_test_suite.h" | 5 #include "chrome/test/base/chrome_test_suite.h" |
6 | 6 |
7 #if defined(OS_CHROMEOS) | 7 #if defined(OS_CHROMEOS) |
8 #include <stdio.h> | 8 #include <stdio.h> |
9 #include <unistd.h> | 9 #include <unistd.h> |
10 #endif | 10 #endif |
11 | 11 |
12 #include "base/command_line.h" | 12 #include "base/command_line.h" |
13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
14 #include "base/path_service.h" | 14 #include "base/path_service.h" |
15 #include "base/strings/utf_string_conversions.h" | 15 #include "base/strings/utf_string_conversions.h" |
16 #include "chrome/browser/browser_process.h" | 16 #include "chrome/browser/browser_process.h" |
17 #include "chrome/common/chrome_constants.h" | 17 #include "chrome/common/chrome_constants.h" |
18 #include "chrome/common/chrome_paths.h" | 18 #include "chrome/common/chrome_paths.h" |
19 #include "chrome/common/url_constants.h" | 19 #include "chrome/common/url_constants.h" |
20 #include "components/content_settings/core/common/content_settings_pattern.h" | 20 #include "components/content_settings/core/common/content_settings_pattern.h" |
21 #include "content/public/test/test_launcher.h" | 21 #include "content/public/test/test_launcher.h" |
22 #include "extensions/common/constants.h" | 22 #include "extensions/common/constants.h" |
23 #include "testing/gtest/include/gtest/gtest.h" | 23 #include "testing/gtest/include/gtest/gtest.h" |
24 | 24 |
25 #if defined(OS_ANDROID) | 25 #if defined(OS_ANDROID) |
26 #include "base/android/jni_android.h" | 26 #include "base/android/jni_android.h" |
27 #include "chrome/browser/android/chrome_jni_registrar.h" | 27 #include "chrome/browser/android/chrome_jni_registrar.h" |
28 #include "net/android/net_jni_registrar.h" | 28 #include "net/android/net_jni_registrar.h" |
| 29 #include "ui/android/ui_android_jni_registrar.h" |
29 #include "ui/base/android/ui_base_jni_registrar.h" | 30 #include "ui/base/android/ui_base_jni_registrar.h" |
30 #include "ui/gfx/android/gfx_jni_registrar.h" | 31 #include "ui/gfx/android/gfx_jni_registrar.h" |
31 #include "ui/gl/android/gl_jni_registrar.h" | 32 #include "ui/gl/android/gl_jni_registrar.h" |
32 #endif | 33 #endif |
33 | 34 |
34 #if defined(OS_CHROMEOS) | 35 #if defined(OS_CHROMEOS) |
35 #include "base/process/process_metrics.h" | 36 #include "base/process/process_metrics.h" |
36 #include "chromeos/chromeos_paths.h" | 37 #include "chromeos/chromeos_paths.h" |
37 #endif | 38 #endif |
38 | 39 |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 #if !defined(OS_IOS) | 81 #if !defined(OS_IOS) |
81 chrome_browser_application_mac::RegisterBrowserCrApp(); | 82 chrome_browser_application_mac::RegisterBrowserCrApp(); |
82 #endif // !defined(OS_IOS) | 83 #endif // !defined(OS_IOS) |
83 #endif | 84 #endif |
84 | 85 |
85 #if defined(OS_ANDROID) | 86 #if defined(OS_ANDROID) |
86 // Register JNI bindings for android. | 87 // Register JNI bindings for android. |
87 gfx::android::RegisterJni(base::android::AttachCurrentThread()); | 88 gfx::android::RegisterJni(base::android::AttachCurrentThread()); |
88 net::android::RegisterJni(base::android::AttachCurrentThread()); | 89 net::android::RegisterJni(base::android::AttachCurrentThread()); |
89 ui::android::RegisterJni(base::android::AttachCurrentThread()); | 90 ui::android::RegisterJni(base::android::AttachCurrentThread()); |
| 91 ui::android::RegisterUIAndroidJni(base::android::AttachCurrentThread()); |
90 ui::gl::android::RegisterJni(base::android::AttachCurrentThread()); | 92 ui::gl::android::RegisterJni(base::android::AttachCurrentThread()); |
91 chrome::android::RegisterJni(base::android::AttachCurrentThread()); | 93 chrome::android::RegisterJni(base::android::AttachCurrentThread()); |
92 #endif | 94 #endif |
93 | 95 |
94 if (!browser_dir_.empty()) { | 96 if (!browser_dir_.empty()) { |
95 PathService::Override(base::DIR_EXE, browser_dir_); | 97 PathService::Override(base::DIR_EXE, browser_dir_); |
96 PathService::Override(base::DIR_MODULE, browser_dir_); | 98 PathService::Override(base::DIR_MODULE, browser_dir_); |
97 } | 99 } |
98 | 100 |
99 #if !defined(OS_IOS) | 101 #if !defined(OS_IOS) |
(...skipping 20 matching lines...) Expand all Loading... |
120 #endif | 122 #endif |
121 } | 123 } |
122 | 124 |
123 void ChromeTestSuite::Shutdown() { | 125 void ChromeTestSuite::Shutdown() { |
124 #if defined(OS_MACOSX) && !defined(OS_IOS) | 126 #if defined(OS_MACOSX) && !defined(OS_IOS) |
125 base::mac::SetOverrideFrameworkBundle(NULL); | 127 base::mac::SetOverrideFrameworkBundle(NULL); |
126 #endif | 128 #endif |
127 | 129 |
128 content::ContentTestSuiteBase::Shutdown(); | 130 content::ContentTestSuiteBase::Shutdown(); |
129 } | 131 } |
OLD | NEW |