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

Side by Side Diff: content/public/test/content_test_suite_base.cc

Issue 18777006: Remove dependencies on /media for iOS. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 5 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
« no previous file with comments | « content/content_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 "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/common/url_schemes.h" 13 #include "content/common/url_schemes.h"
14 #include "content/public/common/content_client.h" 14 #include "content/public/common/content_client.h"
15 #include "content/public/common/content_paths.h" 15 #include "content/public/common/content_paths.h"
16 #include "media/base/media.h"
17 #include "testing/gtest/include/gtest/gtest.h" 16 #include "testing/gtest/include/gtest/gtest.h"
18 #include "ui/base/ui_base_paths.h" 17 #include "ui/base/ui_base_paths.h"
19 #include "ui/compositor/compositor_setup.h" 18 #include "ui/compositor/compositor_setup.h"
20 19
21 #if defined(OS_ANDROID) 20 #if defined(OS_ANDROID)
22 #include "base/android/jni_android.h" 21 #include "base/android/jni_android.h"
23 #include "content/browser/android/browser_jni_registrar.h" 22 #include "content/browser/android/browser_jni_registrar.h"
24 #include "content/common/android/common_jni_registrar.h" 23 #include "content/common/android/common_jni_registrar.h"
25 #include "media/base/android/media_jni_registrar.h" 24 #include "media/base/android/media_jni_registrar.h"
26 #include "net/android/net_jni_registrar.h" 25 #include "net/android/net_jni_registrar.h"
27 #include "ui/android/ui_jni_registrar.h" 26 #include "ui/android/ui_jni_registrar.h"
28 #include "ui/gl/android/gl_jni_registrar.h" 27 #include "ui/gl/android/gl_jni_registrar.h"
29 #include "ui/shell_dialogs/android/shell_dialogs_jni_registrar.h" 28 #include "ui/shell_dialogs/android/shell_dialogs_jni_registrar.h"
30 #endif 29 #endif
31 30
31 #if !defined(OS_IOS)
32 #include "media/base/media.h"
33 #endif
34
32 namespace content { 35 namespace content {
33 36
34 class ContentTestSuiteBaseListener : public testing::EmptyTestEventListener { 37 class ContentTestSuiteBaseListener : public testing::EmptyTestEventListener {
35 public: 38 public:
36 ContentTestSuiteBaseListener() { 39 ContentTestSuiteBaseListener() {
37 } 40 }
38 virtual void OnTestEnd(const testing::TestInfo& test_info) OVERRIDE { 41 virtual void OnTestEnd(const testing::TestInfo& test_info) OVERRIDE {
39 BrowserThreadImpl::FlushThreadPoolHelper(); 42 BrowserThreadImpl::FlushThreadPoolHelper();
40 } 43 }
41 private: 44 private:
(...skipping 12 matching lines...) Expand all
54 // Register JNI bindings for android. 57 // Register JNI bindings for android.
55 JNIEnv* env = base::android::AttachCurrentThread(); 58 JNIEnv* env = base::android::AttachCurrentThread();
56 content::android::RegisterCommonJni(env); 59 content::android::RegisterCommonJni(env);
57 content::android::RegisterBrowserJni(env); 60 content::android::RegisterBrowserJni(env);
58 media::RegisterJni(env); 61 media::RegisterJni(env);
59 net::android::RegisterJni(env); 62 net::android::RegisterJni(env);
60 ui::android::RegisterJni(env); 63 ui::android::RegisterJni(env);
61 ui::shell_dialogs::RegisterJni(env); 64 ui::shell_dialogs::RegisterJni(env);
62 #endif 65 #endif
63 66
67 #if !defined(OS_IOS)
64 if (external_libraries_enabled_) 68 if (external_libraries_enabled_)
65 media::InitializeMediaLibraryForTesting(); 69 media::InitializeMediaLibraryForTesting();
70 #endif
66 71
67 scoped_ptr<ContentClient> client_for_init(CreateClientForInitialization()); 72 scoped_ptr<ContentClient> client_for_init(CreateClientForInitialization());
68 SetContentClient(client_for_init.get()); 73 SetContentClient(client_for_init.get());
69 RegisterContentSchemes(false); 74 RegisterContentSchemes(false);
70 SetContentClient(NULL); 75 SetContentClient(NULL);
71 76
72 RegisterPathProvider(); 77 RegisterPathProvider();
73 ui::RegisterPathProvider(); 78 ui::RegisterPathProvider();
74 79
75 // Mock out the compositor on platforms that use it. 80 // Mock out the compositor on platforms that use it.
76 ui::SetupTestCompositor(); 81 ui::SetupTestCompositor();
77 82
78 testing::UnitTest::GetInstance()->listeners().Append( 83 testing::UnitTest::GetInstance()->listeners().Append(
79 new ContentTestSuiteBaseListener); 84 new ContentTestSuiteBaseListener);
80 } 85 }
81 86
82 } // namespace content 87 } // namespace content
OLDNEW
« no previous file with comments | « content/content_tests.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698