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 |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 if (!browser_dir_.empty()) { | 75 if (!browser_dir_.empty()) { |
76 PathService::Override(base::DIR_EXE, browser_dir_); | 76 PathService::Override(base::DIR_EXE, browser_dir_); |
77 PathService::Override(base::DIR_MODULE, browser_dir_); | 77 PathService::Override(base::DIR_MODULE, browser_dir_); |
78 } | 78 } |
79 | 79 |
80 #if !defined(OS_IOS) | 80 #if !defined(OS_IOS) |
81 // Disable external libraries load if we are under python process in | 81 // Disable external libraries load if we are under python process in |
82 // ChromeOS. That means we are autotest and, if ASAN is used, | 82 // ChromeOS. That means we are autotest and, if ASAN is used, |
83 // external libraries load crashes. | 83 // external libraries load crashes. |
84 if (!IsCrosPythonProcess()) | 84 if (!IsCrosPythonProcess()) |
85 media::InitializeMediaLibraryForTesting(); | 85 media::InitializeMediaLibrary(); |
86 #endif | 86 #endif |
87 | 87 |
88 // Initialize after overriding paths as some content paths depend on correct | 88 // Initialize after overriding paths as some content paths depend on correct |
89 // values for DIR_EXE and DIR_MODULE. | 89 // values for DIR_EXE and DIR_MODULE. |
90 content::ContentTestSuiteBase::Initialize(); | 90 content::ContentTestSuiteBase::Initialize(); |
91 | 91 |
92 ContentSettingsPattern::SetNonWildcardDomainNonPortScheme( | 92 ContentSettingsPattern::SetNonWildcardDomainNonPortScheme( |
93 extensions::kExtensionScheme); | 93 extensions::kExtensionScheme); |
94 | 94 |
95 #if defined(OS_MACOSX) && !defined(OS_IOS) | 95 #if defined(OS_MACOSX) && !defined(OS_IOS) |
96 // Look in the framework bundle for resources. | 96 // Look in the framework bundle for resources. |
97 base::FilePath path; | 97 base::FilePath path; |
98 PathService::Get(base::DIR_EXE, &path); | 98 PathService::Get(base::DIR_EXE, &path); |
99 path = path.Append(chrome::kFrameworkName); | 99 path = path.Append(chrome::kFrameworkName); |
100 base::mac::SetOverrideFrameworkBundlePath(path); | 100 base::mac::SetOverrideFrameworkBundlePath(path); |
101 #endif | 101 #endif |
102 } | 102 } |
103 | 103 |
104 void ChromeTestSuite::Shutdown() { | 104 void ChromeTestSuite::Shutdown() { |
105 #if defined(OS_MACOSX) && !defined(OS_IOS) | 105 #if defined(OS_MACOSX) && !defined(OS_IOS) |
106 base::mac::SetOverrideFrameworkBundle(NULL); | 106 base::mac::SetOverrideFrameworkBundle(NULL); |
107 #endif | 107 #endif |
108 | 108 |
109 content::ContentTestSuiteBase::Shutdown(); | 109 content::ContentTestSuiteBase::Shutdown(); |
110 } | 110 } |
OLD | NEW |