| 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 15 matching lines...) Expand all Loading... |
| 26 #include "chrome/test/base/testing_browser_process.h" | 26 #include "chrome/test/base/testing_browser_process.h" |
| 27 #include "net/base/mock_host_resolver.h" | 27 #include "net/base/mock_host_resolver.h" |
| 28 #include "net/base/net_errors.h" | 28 #include "net/base/net_errors.h" |
| 29 #include "net/base/net_util.h" | 29 #include "net/base/net_util.h" |
| 30 #include "testing/gtest/include/gtest/gtest.h" | 30 #include "testing/gtest/include/gtest/gtest.h" |
| 31 #include "ui/base/resource/resource_bundle.h" | 31 #include "ui/base/resource/resource_bundle.h" |
| 32 #include "ui/base/resource/resource_handle.h" | 32 #include "ui/base/resource/resource_handle.h" |
| 33 | 33 |
| 34 #if defined(OS_ANDROID) | 34 #if defined(OS_ANDROID) |
| 35 #include "base/android/jni_android.h" | 35 #include "base/android/jni_android.h" |
| 36 #include "chrome/browser/android/chrome_jni_registrar.h" |
| 36 #include "net/android/net_jni_registrar.h" | 37 #include "net/android/net_jni_registrar.h" |
| 37 #endif | 38 #endif |
| 38 | 39 |
| 39 #if defined(OS_MACOSX) | 40 #if defined(OS_MACOSX) |
| 40 #include "base/mac/bundle_locations.h" | 41 #include "base/mac/bundle_locations.h" |
| 41 #include "base/mac/mac_util.h" | 42 #include "base/mac/mac_util.h" |
| 42 #include "base/mac/scoped_nsautorelease_pool.h" | 43 #include "base/mac/scoped_nsautorelease_pool.h" |
| 43 #include "chrome/browser/chrome_browser_application_mac.h" | 44 #include "chrome/browser/chrome_browser_application_mac.h" |
| 44 #endif | 45 #endif |
| 45 | 46 |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 | 184 |
| 184 void ChromeTestSuite::Initialize() { | 185 void ChromeTestSuite::Initialize() { |
| 185 #if defined(OS_MACOSX) | 186 #if defined(OS_MACOSX) |
| 186 base::mac::ScopedNSAutoreleasePool autorelease_pool; | 187 base::mac::ScopedNSAutoreleasePool autorelease_pool; |
| 187 chrome_browser_application_mac::RegisterBrowserCrApp(); | 188 chrome_browser_application_mac::RegisterBrowserCrApp(); |
| 188 #endif | 189 #endif |
| 189 | 190 |
| 190 #if defined(OS_ANDROID) | 191 #if defined(OS_ANDROID) |
| 191 // Register JNI bindings for android. | 192 // Register JNI bindings for android. |
| 192 net::android::RegisterJni(base::android::AttachCurrentThread()); | 193 net::android::RegisterJni(base::android::AttachCurrentThread()); |
| 194 chrome::android::RegisterJni(base::android::AttachCurrentThread()); |
| 193 #endif | 195 #endif |
| 194 | 196 |
| 195 chrome::RegisterPathProvider(); | 197 chrome::RegisterPathProvider(); |
| 196 if (!browser_dir_.empty()) { | 198 if (!browser_dir_.empty()) { |
| 197 PathService::Override(base::DIR_EXE, browser_dir_); | 199 PathService::Override(base::DIR_EXE, browser_dir_); |
| 198 PathService::Override(base::DIR_MODULE, browser_dir_); | 200 PathService::Override(base::DIR_MODULE, browser_dir_); |
| 199 } | 201 } |
| 200 | 202 |
| 201 // Disable external libraries load if we are under python process in | 203 // Disable external libraries load if we are under python process in |
| 202 // ChromeOS. That means we are autotest and, if ASAN is used, | 204 // ChromeOS. That means we are autotest and, if ASAN is used, |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 247 #if defined(OS_MACOSX) | 249 #if defined(OS_MACOSX) |
| 248 base::mac::SetOverrideFrameworkBundle(NULL); | 250 base::mac::SetOverrideFrameworkBundle(NULL); |
| 249 #endif | 251 #endif |
| 250 | 252 |
| 251 base::StatsTable::set_current(NULL); | 253 base::StatsTable::set_current(NULL); |
| 252 stats_table_.reset(); | 254 stats_table_.reset(); |
| 253 RemoveSharedMemoryFile(stats_filename_); | 255 RemoveSharedMemoryFile(stats_filename_); |
| 254 | 256 |
| 255 base::TestSuite::Shutdown(); | 257 base::TestSuite::Shutdown(); |
| 256 } | 258 } |
| OLD | NEW |