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