Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(283)

Side by Side Diff: chrome/test/base/chrome_test_suite.cc

Issue 10827134: Include chromium_net.jar in unit_tests_apk. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Moved to chrome_test_suite.cc Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 13 matching lines...) Expand all
24 #include "chrome/common/chrome_paths.h" 24 #include "chrome/common/chrome_paths.h"
25 #include "chrome/common/url_constants.h" 25 #include "chrome/common/url_constants.h"
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)
35 #include "base/android/jni_android.h"
36 #include "net/android/net_jni_registrar.h"
37 #endif
38
34 #if defined(OS_MACOSX) 39 #if defined(OS_MACOSX)
35 #include "base/mac/bundle_locations.h" 40 #include "base/mac/bundle_locations.h"
36 #include "base/mac/mac_util.h" 41 #include "base/mac/mac_util.h"
37 #include "base/mac/scoped_nsautorelease_pool.h" 42 #include "base/mac/scoped_nsautorelease_pool.h"
38 #include "chrome/browser/chrome_browser_application_mac.h" 43 #include "chrome/browser/chrome_browser_application_mac.h"
39 #endif 44 #endif
40 45
41 #if defined(OS_POSIX) 46 #if defined(OS_POSIX)
42 #include "base/shared_memory.h" 47 #include "base/shared_memory.h"
43 #endif 48 #endif
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 181
177 ChromeTestSuite::~ChromeTestSuite() { 182 ChromeTestSuite::~ChromeTestSuite() {
178 } 183 }
179 184
180 void ChromeTestSuite::Initialize() { 185 void ChromeTestSuite::Initialize() {
181 #if defined(OS_MACOSX) 186 #if defined(OS_MACOSX)
182 base::mac::ScopedNSAutoreleasePool autorelease_pool; 187 base::mac::ScopedNSAutoreleasePool autorelease_pool;
183 chrome_browser_application_mac::RegisterBrowserCrApp(); 188 chrome_browser_application_mac::RegisterBrowserCrApp();
184 #endif 189 #endif
185 190
191 #if defined(OS_ANDROID)
192 // Register JNI bindings for android.
193 net::android::RegisterJni(base::android::AttachCurrentThread());
194 #endif
195
186 chrome::RegisterPathProvider(); 196 chrome::RegisterPathProvider();
187 if (!browser_dir_.empty()) { 197 if (!browser_dir_.empty()) {
188 PathService::Override(base::DIR_EXE, browser_dir_); 198 PathService::Override(base::DIR_EXE, browser_dir_);
189 PathService::Override(base::DIR_MODULE, browser_dir_); 199 PathService::Override(base::DIR_MODULE, browser_dir_);
190 } 200 }
191 201
192 // Disable external libraries load if we are under python process in 202 // Disable external libraries load if we are under python process in
193 // ChromeOS. That means we are autotest and, if ASAN is used, 203 // ChromeOS. That means we are autotest and, if ASAN is used,
194 // external libraries load crashes. 204 // external libraries load crashes.
195 content::ContentTestSuiteBase::set_external_libraries_enabled( 205 content::ContentTestSuiteBase::set_external_libraries_enabled(
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 #if defined(OS_MACOSX) 248 #if defined(OS_MACOSX)
239 base::mac::SetOverrideFrameworkBundle(NULL); 249 base::mac::SetOverrideFrameworkBundle(NULL);
240 #endif 250 #endif
241 251
242 base::StatsTable::set_current(NULL); 252 base::StatsTable::set_current(NULL);
243 stats_table_.reset(); 253 stats_table_.reset();
244 RemoveSharedMemoryFile(stats_filename_); 254 RemoveSharedMemoryFile(stats_filename_);
245 255
246 base::TestSuite::Shutdown(); 256 base::TestSuite::Shutdown();
247 } 257 }
OLDNEW
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698