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(ANDROID_JAVA_UI) |
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 #endif | 28 #endif |
29 | 29 |
30 #if defined(OS_CHROMEOS) | 30 #if defined(OS_CHROMEOS) |
31 #include "base/process/process_metrics.h" | 31 #include "base/process/process_metrics.h" |
32 #include "chromeos/chromeos_paths.h" | 32 #include "chromeos/chromeos_paths.h" |
33 #endif | 33 #endif |
34 | 34 |
35 #if defined(OS_MACOSX) | 35 #if defined(OS_MACOSX) |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 #if !defined(OS_IOS) | 75 #if !defined(OS_IOS) |
76 chrome_browser_application_mac::RegisterBrowserCrApp(); | 76 chrome_browser_application_mac::RegisterBrowserCrApp(); |
77 #endif // !defined(OS_IOS) | 77 #endif // !defined(OS_IOS) |
78 #endif | 78 #endif |
79 | 79 |
80 if (!browser_dir_.empty()) { | 80 if (!browser_dir_.empty()) { |
81 PathService::Override(base::DIR_EXE, browser_dir_); | 81 PathService::Override(base::DIR_EXE, browser_dir_); |
82 PathService::Override(base::DIR_MODULE, browser_dir_); | 82 PathService::Override(base::DIR_MODULE, browser_dir_); |
83 } | 83 } |
84 | 84 |
85 #if defined(OS_ANDROID) | 85 #if defined(ANDROID_JAVA_UI) |
86 ASSERT_TRUE(chrome::android::RegisterBrowserJNI( | 86 ASSERT_TRUE(chrome::android::RegisterBrowserJNI( |
87 base::android::AttachCurrentThread())); | 87 base::android::AttachCurrentThread())); |
88 #endif | 88 #endif |
89 | 89 |
90 #if !defined(OS_IOS) | 90 #if !defined(OS_IOS) |
91 // Disable external libraries load if we are under python process in | 91 // Disable external libraries load if we are under python process in |
92 // ChromeOS. That means we are autotest and, if ASAN is used, | 92 // ChromeOS. That means we are autotest and, if ASAN is used, |
93 // external libraries load crashes. | 93 // external libraries load crashes. |
94 if (!IsCrosPythonProcess()) | 94 if (!IsCrosPythonProcess()) |
95 media::InitializeMediaLibrary(); | 95 media::InitializeMediaLibrary(); |
(...skipping 15 matching lines...) Expand all Loading... |
111 #endif | 111 #endif |
112 } | 112 } |
113 | 113 |
114 void ChromeTestSuite::Shutdown() { | 114 void ChromeTestSuite::Shutdown() { |
115 #if defined(OS_MACOSX) && !defined(OS_IOS) | 115 #if defined(OS_MACOSX) && !defined(OS_IOS) |
116 base::mac::SetOverrideFrameworkBundle(NULL); | 116 base::mac::SetOverrideFrameworkBundle(NULL); |
117 #endif | 117 #endif |
118 | 118 |
119 content::ContentTestSuiteBase::Shutdown(); | 119 content::ContentTestSuiteBase::Shutdown(); |
120 } | 120 } |
OLD | NEW |