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 "content/public/test/content_test_suite_base.h" | 5 #include "content/public/test/content_test_suite_base.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/test/test_suite.h" | 10 #include "base/test/test_suite.h" |
11 #include "base/threading/sequenced_worker_pool.h" | 11 #include "base/threading/sequenced_worker_pool.h" |
12 #include "content/browser/browser_thread_impl.h" | 12 #include "content/browser/browser_thread_impl.h" |
| 13 #include "content/browser/gpu/gpu_process_host.h" |
13 #include "content/common/url_schemes.h" | 14 #include "content/common/url_schemes.h" |
| 15 #include "content/gpu/gpu_main_thread.h" |
| 16 #include "content/public/browser/render_process_host.h" |
| 17 #include "content/public/browser/utility_process_host.h" |
14 #include "content/public/common/content_client.h" | 18 #include "content/public/common/content_client.h" |
15 #include "content/public/common/content_paths.h" | 19 #include "content/public/common/content_paths.h" |
| 20 #include "content/renderer/renderer_main_thread.h" |
| 21 #include "content/utility/utility_main_thread.h" |
16 #include "media/base/media.h" | 22 #include "media/base/media.h" |
17 #include "testing/gtest/include/gtest/gtest.h" | 23 #include "testing/gtest/include/gtest/gtest.h" |
18 #include "ui/base/ui_base_paths.h" | 24 #include "ui/base/ui_base_paths.h" |
19 | 25 |
20 #if defined(OS_ANDROID) | 26 #if defined(OS_ANDROID) |
21 #include "base/android/jni_android.h" | 27 #include "base/android/jni_android.h" |
22 #include "content/browser/android/browser_jni_registrar.h" | 28 #include "content/browser/android/browser_jni_registrar.h" |
23 #include "content/common/android/common_jni_registrar.h" | 29 #include "content/common/android/common_jni_registrar.h" |
24 #include "media/base/android/media_jni_registrar.h" | 30 #include "media/base/android/media_jni_registrar.h" |
25 #include "net/android/net_jni_registrar.h" | 31 #include "net/android/net_jni_registrar.h" |
(...skipping 27 matching lines...) Expand all Loading... |
53 // Register JNI bindings for android. | 59 // Register JNI bindings for android. |
54 JNIEnv* env = base::android::AttachCurrentThread(); | 60 JNIEnv* env = base::android::AttachCurrentThread(); |
55 content::android::RegisterCommonJni(env); | 61 content::android::RegisterCommonJni(env); |
56 content::android::RegisterBrowserJni(env); | 62 content::android::RegisterBrowserJni(env); |
57 media::RegisterJni(env); | 63 media::RegisterJni(env); |
58 net::android::RegisterJni(env); | 64 net::android::RegisterJni(env); |
59 ui::android::RegisterJni(env); | 65 ui::android::RegisterJni(env); |
60 ui::shell_dialogs::RegisterJni(env); | 66 ui::shell_dialogs::RegisterJni(env); |
61 #endif | 67 #endif |
62 | 68 |
| 69 #if !defined(OS_IOS) |
| 70 UtilityProcessHost::RegisterUtilityMainThreadFactory(CreateUtilityMainThread); |
| 71 RenderProcessHost::RegisterRendererMainThreadFactory( |
| 72 CreateRendererMainThread); |
| 73 GpuProcessHost::RegisterGpuMainThreadFactory(CreateGpuMainThread); |
| 74 #endif |
| 75 |
63 if (external_libraries_enabled_) | 76 if (external_libraries_enabled_) |
64 media::InitializeMediaLibraryForTesting(); | 77 media::InitializeMediaLibraryForTesting(); |
65 | 78 |
66 scoped_ptr<ContentClient> client_for_init(CreateClientForInitialization()); | 79 scoped_ptr<ContentClient> client_for_init(CreateClientForInitialization()); |
67 SetContentClient(client_for_init.get()); | 80 SetContentClient(client_for_init.get()); |
68 RegisterContentSchemes(false); | 81 RegisterContentSchemes(false); |
69 SetContentClient(NULL); | 82 SetContentClient(NULL); |
70 | 83 |
71 RegisterPathProvider(); | 84 RegisterPathProvider(); |
72 ui::RegisterPathProvider(); | 85 ui::RegisterPathProvider(); |
73 | 86 |
74 testing::UnitTest::GetInstance()->listeners().Append( | 87 testing::UnitTest::GetInstance()->listeners().Append( |
75 new ContentTestSuiteBaseListener); | 88 new ContentTestSuiteBaseListener); |
76 } | 89 } |
77 | 90 |
78 } // namespace content | 91 } // namespace content |
OLD | NEW |